diff options
author | Irfan Sheriff <isheriff@google.com> | 2011-05-06 16:07:58 -0700 |
---|---|---|
committer | Irfan Sheriff <isheriff@google.com> | 2011-05-12 14:10:11 -0700 |
commit | fe3b33d4ead06c546202753e38188db5e2eaa7fa (patch) | |
tree | 18d7228fe4b46a3e28fa188023f342d3ffbe1448 /core/java/android/net/NetworkUtils.java | |
parent | fba19ff5e8135878a1d87ed696e0a89cc776f37e (diff) | |
download | frameworks_base-fe3b33d4ead06c546202753e38188db5e2eaa7fa.zip frameworks_base-fe3b33d4ead06c546202753e38188db5e2eaa7fa.tar.gz frameworks_base-fe3b33d4ead06c546202753e38188db5e2eaa7fa.tar.bz2 |
DO NOT MERGE Add DhcpStateMachine
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: I5324814b19ff19863aa6fa89f1e3f0a202930c98
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 |