dhcp: Add function to clear DHCP configuration
authorJulien Massot <jmassot@aldebaran-robotics.com>
Fri, 10 Dec 2010 11:00:35 +0000 (11:00 +0000)
committerSamuel Ortiz <sameo@linux.intel.com>
Tue, 14 Dec 2010 00:42:38 +0000 (01:42 +0100)
include/dhcp.h
src/dhcp.c

index e10f874..ce3e6f4 100644 (file)
@@ -57,6 +57,7 @@ void connman_dhcp_set_value(struct connman_dhcp *dhcp,
 
 void connman_dhcp_bound(struct connman_dhcp *dhcp);
 void connman_dhcp_renew(struct connman_dhcp *dhcp);
+void connman_dhcp_release(struct connman_dhcp *dhcp);
 void connman_dhcp_fail(struct connman_dhcp *dhcp);
 
 void *connman_dhcp_get_data(struct connman_dhcp *dhcp);
index 273912b..36e2ff5 100644 (file)
@@ -186,6 +186,19 @@ void connman_dhcp_renew(struct connman_dhcp *dhcp)
 }
 
 /**
+ * connman_dhcp_release:
+ * @dhcp: DHCP structure
+ *
+ * Report DHCP release of the interface
+ */
+void connman_dhcp_release(struct connman_dhcp *dhcp)
+{
+       DBG("dhcp %p", dhcp);
+
+       connman_element_unregister_children(dhcp->element);
+}
+
+/**
  * connman_dhcp_fail:
  * @dhcp: DHCP structure
  *