summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/dhcp.h1
-rw-r--r--src/dhcp.c11
2 files changed, 12 insertions, 0 deletions
diff --git a/include/dhcp.h b/include/dhcp.h
index 7651293e..2d6704ca 100644
--- a/include/dhcp.h
+++ b/include/dhcp.h
@@ -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);
diff --git a/src/dhcp.c b/src/dhcp.c
index 93401d7b..f0f28e42 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -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
*