- if (g_strcmp0(key, "Address") == 0) {
- g_free(dhcp->element->ipv4.address);
- dhcp->element->ipv4.address = g_strdup(value);
- } else if (g_strcmp0(key, "Netmask") == 0) {
- g_free(dhcp->element->ipv4.netmask);
- dhcp->element->ipv4.netmask = g_strdup(value);
- } else if (g_strcmp0(key, "Gateway") == 0) {
- g_free(dhcp->element->ipv4.gateway);
- dhcp->element->ipv4.gateway = g_strdup(value);
- } else if (g_strcmp0(key, "Network") == 0) {
- g_free(dhcp->element->ipv4.network);
- dhcp->element->ipv4.network = g_strdup(value);
- } else if (g_strcmp0(key, "Broadcast") == 0) {
- g_free(dhcp->element->ipv4.broadcast);
- dhcp->element->ipv4.broadcast = g_strdup(value);
- } else if (g_strcmp0(key, "Nameserver") == 0) {
- g_free(dhcp->element->ipv4.nameserver);
- nameservers = g_strsplit_set(value, " ", 0);
- /* FIXME: The ipv4 structure can only hold one nameserver, so
- * we are only able to pass along the first nameserver sent by
- * the DHCP server. If this situation changes, we should
- * retain all of them.
- */
- dhcp->element->ipv4.nameserver = g_strdup(nameservers[0]);
- g_strfreev(nameservers);
- } else if (g_strcmp0(key, "Domainname") == 0) {
- g_free(dhcp->element->domainname);
- dhcp->element->domainname = g_strdup(value);
-
- __connman_utsname_set_domainname(value);
- } else if (g_strcmp0(key, "Hostname") == 0) {
- g_free(dhcp->element->hostname);
- dhcp->element->hostname = g_strdup(value);
-
- __connman_utsname_set_hostname(value);
- } else if (g_strcmp0(key, "Timeserver") == 0) {
- connman_info("Timeserver %s", value);
-
- g_free(dhcp->element->ipv4.timeserver);
- dhcp->element->ipv4.timeserver = g_strdup(value);
- } else if (g_strcmp0(key, "MTU") == 0) {
- } else if (g_strcmp0(key, "PAC") == 0) {
- connman_info("PAC configuration %s", value);
-
- g_free(dhcp->element->ipv4.pac);
- dhcp->element->ipv4.pac = g_strdup(value);
- }