summaryrefslogtreecommitdiff
path: root/tools/dhcp-test.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2010-07-29 15:29:57 -0700
committerMarcel Holtmann <marcel@holtmann.org>2010-07-29 15:29:57 -0700
commitfe57f3b830d591f0771229ae91f7eb04fdb9c3fb (patch)
tree5c3ea5fbd397b34627155fa464af6905255842ea /tools/dhcp-test.c
parent48021d34b3f567993a550bc7a714f7999bbb2545 (diff)
downloadconnman-fe57f3b830d591f0771229ae91f7eb04fdb9c3fb.tar.gz
connman-fe57f3b830d591f0771229ae91f7eb04fdb9c3fb.tar.bz2
connman-fe57f3b830d591f0771229ae91f7eb04fdb9c3fb.zip
Add domain name support to DHCP test tool
Diffstat (limited to 'tools/dhcp-test.c')
-rw-r--r--tools/dhcp-test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/dhcp-test.c b/tools/dhcp-test.c
index beb9aed6..1fbf1f9d 100644
--- a/tools/dhcp-test.c
+++ b/tools/dhcp-test.c
@@ -113,6 +113,10 @@ static void lease_available_cb(GDHCPClient *dhcp_client, gpointer user_data)
for (list = option_value; list; list = list->next)
printf("domain-name-servers %s\n", (char *) list->data);
+ option_value = g_dhcp_client_get_option(dhcp_client, G_DHCP_DOMAIN_NAME);
+ for (list = option_value; list; list = list->next)
+ printf("domain-name %s\n", (char *) list->data);
+
option_value = g_dhcp_client_get_option(dhcp_client, G_DHCP_ROUTER);
for (list = option_value; list; list = list->next)
printf("routers %s\n", (char *) list->data);
@@ -149,6 +153,7 @@ int main(int argc, char *argv[])
g_dhcp_client_set_request(dhcp_client, G_DHCP_HOST_NAME);
g_dhcp_client_set_request(dhcp_client, G_DHCP_SUBNET);
g_dhcp_client_set_request(dhcp_client, G_DHCP_DNS_SERVER);
+ g_dhcp_client_set_request(dhcp_client, G_DHCP_DOMAIN_NAME);
g_dhcp_client_set_request(dhcp_client, G_DHCP_NTP_SERVER);
g_dhcp_client_set_request(dhcp_client, G_DHCP_ROUTER);