Add function to get index value from DHCP structure
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 7 Dec 2009 06:06:19 +0000 (07:06 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 7 Dec 2009 06:06:19 +0000 (07:06 +0100)
include/dhcp.h
src/dhcp.c

index 7651293..2d6704c 100644 (file)
@@ -45,6 +45,7 @@ struct connman_dhcp;
 struct connman_dhcp *connman_dhcp_ref(struct connman_dhcp *dhcp);
 void connman_dhcp_unref(struct connman_dhcp *dhcp);
 
+int connman_dhcp_get_index(struct connman_dhcp *dhcp);
 char *connman_dhcp_get_interface(struct connman_dhcp *dhcp);
 
 void connman_dhcp_bound(struct connman_dhcp *dhcp);
index 93401d7..f0f28e4 100644 (file)
@@ -64,6 +64,17 @@ void connman_dhcp_unref(struct connman_dhcp *dhcp)
 }
 
 /**
+ * connman_dhcp_get_index:
+ * @dhcp: DHCP structure
+ *
+ * Get network index of DHCP
+ */
+int connman_dhcp_get_index(struct connman_dhcp *dhcp)
+{
+       return dhcp->index;
+}
+
+/**
  * connman_dhcp_get_interface:
  * @dhcp: DHCP structure
  *