From: Marcel Holtmann Date: Mon, 7 Dec 2009 06:58:29 +0000 (+0100) Subject: Add parsing of Domainname, Hostname and Timeserver results X-Git-Tag: 0.48~155 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=93a5ff49828eda5435d79f56c954562144fcf88b;p=platform%2Fupstream%2Fconnman.git Add parsing of Domainname, Hostname and Timeserver results --- diff --git a/plugins/dhclient.c b/plugins/dhclient.c index cb70ef7..6a0530f 100644 --- a/plugins/dhclient.c +++ b/plugins/dhclient.c @@ -301,8 +301,12 @@ static DBusHandlerResult dhclient_filter(DBusConnection *conn, } else if (g_strcmp0(key, "new_domain_name_servers") == 0) { connman_dhcp_set_value(task->dhcp, "Nameserver", value); } else if (g_ascii_strcasecmp(key, "new_domain_name") == 0) { + connman_dhcp_set_value(task->dhcp, "Domainname", value); } else if (g_ascii_strcasecmp(key, "new_domain_search") == 0) { } else if (g_ascii_strcasecmp(key, "new_host_name") == 0) { + connman_dhcp_set_value(task->dhcp, "Hostname", value); + } else if (g_ascii_strcasecmp(key, "new_ntp_servers") == 0) { + connman_dhcp_set_value(task->dhcp, "Timeserver", value); } dbus_message_iter_next(&dict); diff --git a/scripts/dhclient.conf b/scripts/dhclient.conf index 4b206a3..dc116ef 100644 --- a/scripts/dhclient.conf +++ b/scripts/dhclient.conf @@ -1,3 +1,5 @@ send host-name ""; -request subnet-mask, broadcast-address, time-offset, routers, - domain-name, domain-name-servers, host-name; +request subnet-mask, broadcast-address, routers, host-name, + domain-search, domain-name, domain-name-servers, + time-offset, time-servers, ntp-servers, interface-mtu; +require subnet-mask, domain-name-servers; diff --git a/src/dhcp.c b/src/dhcp.c index 19fab9c..d34b8f5 100644 --- a/src/dhcp.c +++ b/src/dhcp.c @@ -114,6 +114,9 @@ void connman_dhcp_set_value(struct connman_dhcp *dhcp, } else if (g_strcmp0(key, "Nameserver") == 0) { g_free(dhcp->element->ipv4.nameserver); dhcp->element->ipv4.nameserver = g_strdup(value); + } else if (g_strcmp0(key, "Domainname") == 0) { + } else if (g_strcmp0(key, "Hostname") == 0) { + } else if (g_strcmp0(key, "Timeserver") == 0) { } }