This will be useful later on for the Peer API. --- gdhcp/client.c | 8 ++++++++ gdhcp/gdhcp.h | 1 + 2 files changed, 9 insertions(+)
diff --git a/gdhcp/client.c b/gdhcp/client.c index ec61731..49d6351 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -2989,6 +2989,14 @@ int g_dhcp_client_get_index(GDHCPClient *dhcp_client) return dhcp_client->ifindex; } +char *g_dhcp_client_get_server_address(GDHCPClient *dhcp_client) +{ + if (!dhcp_client) + return NULL; + + return get_ip(dhcp_client->server_ip); +} + char *g_dhcp_client_get_address(GDHCPClient *dhcp_client) { return g_strdup(dhcp_client->assigned_ip); diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h index 7525eb2..0ed7fa5 100644 --- a/gdhcp/gdhcp.h +++ b/gdhcp/gdhcp.h @@ -150,6 +150,7 @@ GDHCPClientError g_dhcp_client_set_send(GDHCPClient *client, unsigned char option_code, const char *option_value); +char *g_dhcp_client_get_server_address(GDHCPClient *client); char *g_dhcp_client_get_address(GDHCPClient *client); char *g_dhcp_client_get_netmask(GDHCPClient *client); GList *g_dhcp_client_get_option(GDHCPClient *client, -- 2.0.5 _______________________________________________ connman mailing list connman@connman.net https://lists.connman.net/mailman/listinfo/connman