summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/dhcp.h3
-rw-r--r--src/dhcp.c23
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;
diff --git a/src/dhcp.c b/src/dhcp.c
index 0c0fc30a..68bbc423 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)