diff options
author | Erik Kline <ek@google.com> | 2015-02-19 19:15:34 +0900 |
---|---|---|
committer | Erik Kline <ek@google.com> | 2015-03-02 12:26:53 +0900 |
commit | c2291a7ed34edeae230a57607a964209f6932357 (patch) | |
tree | 3c0d422f98a6f7fde8a17b920e91f927bd8f5a8a /include | |
parent | 317b4024a2a46b8c57abfa08f2a649df13572bd3 (diff) | |
download | system_core-c2291a7ed34edeae230a57607a964209f6932357.zip system_core-c2291a7ed34edeae230a57607a964209f6932357.tar.gz system_core-c2291a7ed34edeae230a57607a964209f6932357.tar.bz2 |
Refactor dhcp_utils for more flexible uses.
Separate out fetching DHCP results from starting the daemon
(for either discover or renew).
Renamed dhcp_do_request() to dhcp_start().
Renamed dhcp_do_request_renew() to dhcp_start_renew().
Added new dhcp_get_results().
Callers of the prior versions of dhcp_do_request* now separately
call dhcp_get_results().
Bug: 19422416
Change-Id: I05447853d444015e6014661dda1bb177b58fe463
Diffstat (limited to 'include')
-rw-r--r-- | include/netutils/dhcp.h | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/include/netutils/dhcp.h b/include/netutils/dhcp.h index de6bc82..008dbd8 100644 --- a/include/netutils/dhcp.h +++ b/include/netutils/dhcp.h @@ -23,26 +23,18 @@ __BEGIN_DECLS extern int do_dhcp(char *iname); -extern int dhcp_do_request(const char *ifname, - char *ipaddr, - char *gateway, - uint32_t *prefixLength, - char *dns[], - char *server, - uint32_t *lease, - char *vendorInfo, - char *domain, - char *mtu); -extern int dhcp_do_request_renew(const char *ifname, - char *ipaddr, - char *gateway, - uint32_t *prefixLength, - char *dns[], - char *server, - uint32_t *lease, - char *vendorInfo, - char *domain, - char *mtu); +extern int dhcp_start(const char *ifname); +extern int dhcp_start_renew(const char *ifname); +extern int dhcp_get_results(const char *ifname, + char *ipaddr, + char *gateway, + uint32_t *prefixLength, + char *dns[], + char *server, + uint32_t *lease, + char *vendorInfo, + char *domain, + char *mtu); extern int dhcp_stop(const char *ifname); extern int dhcp_release_lease(const char *ifname); extern char *dhcp_get_errmsg(); |