diff options
author | Jean-Baptiste Queru <jbq@google.com> | 2010-08-18 11:16:00 -0700 |
---|---|---|
committer | Jean-Baptiste Queru <jbq@google.com> | 2010-08-18 11:16:00 -0700 |
commit | 58b64acef07e6426914a8cb2d972778fbe138655 (patch) | |
tree | 62a31bcf71d748419086767014c834c37d10af1a /nexus | |
parent | 838336fa61f2f06898322f059570708def823398 (diff) | |
download | system_core-58b64acef07e6426914a8cb2d972778fbe138655.zip system_core-58b64acef07e6426914a8cb2d972778fbe138655.tar.gz system_core-58b64acef07e6426914a8cb2d972778fbe138655.tar.bz2 |
Revert "- creates proper ifc.h and dhcp.h headers for libnetutils"
This reverts commit c88e09cb98fb3690c3cf49f5a825532e0d9bf300.
Diffstat (limited to 'nexus')
-rw-r--r-- | nexus/DhcpClient.cpp | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/nexus/DhcpClient.cpp b/nexus/DhcpClient.cpp index 713059d..a5654d2 100644 --- a/nexus/DhcpClient.cpp +++ b/nexus/DhcpClient.cpp @@ -27,15 +27,35 @@ #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(); |