summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortaesub kim <taesub.kim@samsung.com>2017-04-13 05:54:41 (GMT)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2017-04-13 05:54:41 (GMT)
commite364c80f2171034e785c3f776d74feb2b06a2802 (patch)
treec35126795cb4eacce697e3ae625fd6c6d8631380
parent1a8bd8384824f7b4b6e513c7eff6a6f4f02769cd (diff)
parente625f6110aabbcd192274bf1e00e3a6a4927bd27 (diff)
downloadconnman-e364c80f2171034e785c3f776d74feb2b06a2802.zip
connman-e364c80f2171034e785c3f776d74feb2b06a2802.tar.gz
connman-e364c80f2171034e785c3f776d74feb2b06a2802.tar.bz2
Merge "Provide DHCP Server address to upper layer while appending IPv4 Data" into tizen
-rwxr-xr-xgdhcp/client.c4
-rwxr-xr-xsrc/ipconfig.c12
2 files changed, 16 insertions, 0 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c
index 7e04176..ff4539b 100755
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -3029,7 +3029,11 @@ char *g_dhcp_client_get_server_address(GDHCPClient *dhcp_client)
if (!dhcp_client)
return NULL;
+#if defined TIZEN_EXT
+ return get_ip(htonl(dhcp_client->server_ip));
+#else
return get_ip(dhcp_client->server_ip);
+#endif
}
char *g_dhcp_client_get_address(GDHCPClient *dhcp_client)
diff --git a/src/ipconfig.c b/src/ipconfig.c
index 46239fe..8d1db29 100755
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -1890,6 +1890,18 @@ void __connman_ipconfig_append_ipv4(struct connman_ipconfig *ipconfig,
if (append_addr->gateway)
connman_dbus_dict_append_basic(iter, "Gateway",
DBUS_TYPE_STRING, &append_addr->gateway);
+
+#if defined TIZEN_EXT
+ if (ipconfig->method == CONNMAN_IPCONFIG_METHOD_DHCP) {
+ char *server_ip;
+ server_ip = __connman_dhcp_get_server_address(ipconfig);
+ if (server_ip) {
+ connman_dbus_dict_append_basic(iter, "DHCPServerIP",
+ DBUS_TYPE_STRING, &server_ip);
+ g_free(server_ip);
+ }
+ }
+#endif
}
void __connman_ipconfig_append_ipv6(struct connman_ipconfig *ipconfig,