summaryrefslogtreecommitdiffstats
path: root/nexus
diff options
context:
space:
mode:
authorSzymon Jakubczak <szym@google.com>2010-06-09 16:11:09 -0400
committerJean-Baptiste Queru <jbq@google.com>2010-08-25 08:13:42 -0700
commit8c85a00db6da092ec3766facd49132fa4fc319a1 (patch)
tree4d7015b3de6955bb0ef9b10efeef039fd9e0a542 /nexus
parent2c72df998799738662a77cef3f522fdc6ae22fde (diff)
downloadsystem_core-8c85a00db6da092ec3766facd49132fa4fc319a1.zip
system_core-8c85a00db6da092ec3766facd49132fa4fc319a1.tar.gz
system_core-8c85a00db6da092ec3766facd49132fa4fc319a1.tar.bz2
- creates proper ifc.h and dhcp.h headers for libnetutils
- adds ifc_set_hwaddr - adds hwaddr command to netcfg - code reuse: dhcp_configure calls ifc_configure; inet_ntoa is used for printing - consistency: use net.XXX.dnsX properties in favor of dhcp.XXX.dnsX properties (see related change to WifiStateTracker) - updated system/core/nexus to use new headers, although not sure if anybody still uses nexus Change-Id: Idd70c0ac6e89b38e86816578c33eff805d30cac4
Diffstat (limited to 'nexus')
-rw-r--r--nexus/DhcpClient.cpp26
1 files changed, 3 insertions, 23 deletions
diff --git a/nexus/DhcpClient.cpp b/nexus/DhcpClient.cpp
index a5654d2..713059d 100644
--- a/nexus/DhcpClient.cpp
+++ b/nexus/DhcpClient.cpp
@@ -27,35 +27,15 @@
#include <sysutils/ServiceManager.h>
+#include <netutils/ifc.h>
+#include <netutils/dhcp.h>
+
#include "DhcpClient.h"
#include "DhcpState.h"
#include "DhcpListener.h"
#include "IDhcpEventHandlers.h"
#include "Controller.h"
-extern "C" {
-int ifc_disable(const char *ifname);
-int ifc_add_host_route(const char *ifname, uint32_t addr);
-int ifc_remove_host_routes(const char *ifname);
-int ifc_set_default_route(const char *ifname, uint32_t gateway);
-int ifc_get_default_route(const char *ifname);
-int ifc_remove_default_route(const char *ifname);
-int ifc_reset_connections(const char *ifname);
-int ifc_configure(const char *ifname, in_addr_t ipaddr, in_addr_t netmask, in_addr_t gateway, in_addr_t dns1, in_addr_t dns2);
-
-int dhcp_do_request(const char *ifname,
- in_addr_t *ipaddr,
- in_addr_t *gateway,
- in_addr_t *mask,
- in_addr_t *dns1,
- in_addr_t *dns2,
- in_addr_t *server,
- uint32_t *lease);
-int dhcp_stop(const char *ifname);
-int dhcp_release_lease(const char *ifname);
-char *dhcp_get_errmsg();
-}
-
DhcpClient::DhcpClient(IDhcpEventHandlers *handlers) :
mState(DhcpState::INIT), mHandlers(handlers) {
mServiceManager = new ServiceManager();