diff options
author | Irfan Sheriff <isheriff@google.com> | 2011-04-28 10:25:31 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2011-04-30 12:58:51 -0700 |
commit | 31be7cf4c7aef140f2a576975a7fd31e062f6964 (patch) | |
tree | ad002254acb7038445b58a5f8723b18341ad009a /core/java/android/net/NetworkUtils.java | |
parent | d7f739b13e0336d6dd02df18d16a73636a795c3f (diff) | |
download | frameworks_base-31be7cf4c7aef140f2a576975a7fd31e062f6964.zip frameworks_base-31be7cf4c7aef140f2a576975a7fd31e062f6964.tar.gz frameworks_base-31be7cf4c7aef140f2a576975a7fd31e062f6964.tar.bz2 |
Add DhcpStateMachine for interation with dhcpcd
- Supports wakeup and renewal on dhcp
- Supports multiple controllers to use the state machine
simultaneously
- Optionally, a controller can request a notification prior
to DHCP request/renewal being sent
Change-Id: I3a9d7e6a02ff26be3a86ddca6964683ad3c28f93
Diffstat (limited to 'core/java/android/net/NetworkUtils.java')
-rw-r--r-- | core/java/android/net/NetworkUtils.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/java/android/net/NetworkUtils.java b/core/java/android/net/NetworkUtils.java index b3f3988..823d10f 100644 --- a/core/java/android/net/NetworkUtils.java +++ b/core/java/android/net/NetworkUtils.java @@ -80,6 +80,16 @@ public class NetworkUtils { public native static boolean runDhcp(String interfaceName, DhcpInfoInternal ipInfo); /** + * Initiate renewal on the Dhcp client daemon. This call blocks until it obtains + * a result (either success or failure) from the daemon. + * @param interfaceName the name of the interface to configure + * @param ipInfo if the request succeeds, this object is filled in with + * the IP address information. + * @return {@code true} for success, {@code false} for failure + */ + public native static boolean runDhcpRenew(String interfaceName, DhcpInfoInternal ipInfo); + + /** * Shut down the DHCP client daemon. * @param interfaceName the name of the interface for which the daemon * should be stopped |