This will be useful for the Peer API.
---
src/connman.h | 1 +
src/dhcp.c | 11 +++++++++++
2 files changed, 12 insertions(+)
diff --git a/src/connman.h b/src/connman.h
index 2524f07..8d4a692 100644
--- a/src/connman.h
+++ b/src/connman.h
@@ -451,6 +451,7 @@ typedef void (* dhcpv6_cb) (struct connman_network *network,
typedef void (* dhcp_cb) (struct connman_ipconfig *ipconfig,
struct connman_network *opt_network,
bool success, gpointer data);
+char *__connman_dhcp_get_server_address(struct connman_ipconfig *ipconfig);
int __connman_dhcp_start(struct connman_ipconfig *ipconfig,
struct connman_network *network, dhcp_cb callback,
gpointer user_data);
diff --git a/src/dhcp.c b/src/dhcp.c
index 841b0c7..09f462b 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -582,6 +582,17 @@ static int dhcp_release(struct connman_dhcp *dhcp)
return 0;
}
+char *__connman_dhcp_get_server_address(struct connman_ipconfig *ipconfig)
+{
+ struct connman_dhcp *dhcp;
+
+ dhcp = g_hash_table_lookup(ipconfig_table, ipconfig);
+ if (!dhcp)
+ return NULL;
+
+ return g_dhcp_client_get_server_address(dhcp->dhcp_client);
+}
+
int __connman_dhcp_start(struct connman_ipconfig *ipconfig,
struct connman_network *network, dhcp_cb callback,
gpointer user_data)
--
2.0.5
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman