diff options
-rw-r--r-- | include/dhcp.h | 3 | ||||
-rw-r--r-- | src/dhcp.c | 23 |
2 files changed, 26 insertions, 0 deletions
diff --git a/include/dhcp.h b/include/dhcp.h index e96d83c2..f0be4f40 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; @@ -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) |