From 31be7cf4c7aef140f2a576975a7fd31e062f6964 Mon Sep 17 00:00:00 2001 From: Irfan Sheriff Date: Thu, 28 Apr 2011 10:25:31 -0700 Subject: 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 --- core/java/android/net/NetworkUtils.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'core/java/android/net/NetworkUtils.java') 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 -- cgit v1.1