From: Marcel Holtmann Date: Mon, 7 Dec 2009 08:03:10 +0000 (+0100) Subject: Add driver data handling for DHCP X-Git-Tag: accepted/2.0alpha-wayland/20121110.002834~3098 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cfbad4c56b9ecb710c2cba35a6c5d72442b611b;p=profile%2Fivi%2Fconnman.git Add driver data handling for DHCP --- diff --git a/include/dhcp.h b/include/dhcp.h index e96d83c..f0be4f4 100644 --- a/include/dhcp.h +++ b/include/dhcp.h @@ -55,6 +55,9 @@ void connman_dhcp_bound(struct connman_dhcp *dhcp); void connman_dhcp_renew(struct connman_dhcp *dhcp); void connman_dhcp_fail(struct connman_dhcp *dhcp); +void *connman_dhcp_get_data(struct connman_dhcp *dhcp); +void connman_dhcp_set_data(struct connman_dhcp *dhcp, void *data); + struct connman_dhcp_driver { const char *name; int priority; diff --git a/src/dhcp.c b/src/dhcp.c index 0c0fc30..68bbc42 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -175,6 +175,29 @@ void connman_dhcp_fail(struct connman_dhcp *dhcp) CONNMAN_ELEMENT_ERROR_FAILED); } +/** + * connman_dhcp_get_data: + * @dhcp: DHCP structure + * + * Get private DHCP data pointer + */ +void *connman_dhcp_get_data(struct connman_dhcp *dhcp) +{ + return dhcp->driver_data; +} + +/** + * connman_dhcp_set_data: + * @dhcp: DHCP structure + * @data: data pointer + * + * Set private DHCP data pointer + */ +void connman_dhcp_set_data(struct connman_dhcp *dhcp, void *data) +{ + dhcp->driver_data = data; +} + static GSList *driver_list = NULL; static gint compare_priority(gconstpointer a, gconstpointer b)