From: Marcel Holtmann Date: Mon, 7 Dec 2009 06:06:19 +0000 (+0100) Subject: Add function to get index value from DHCP structure X-Git-Tag: 2.0_alpha~3106 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=217e0391609f18725d7d6267045b21960bd81faa;p=framework%2Fconnectivity%2Fconnman.git Add function to get index value from DHCP structure --- diff --git a/include/dhcp.h b/include/dhcp.h index 7651293..2d6704c 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 93401d7..f0f28e4 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 *