Add support for exporting Broadcast and Nameserver properties
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 26 Jun 2009 10:13:03 +0000 (12:13 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 26 Jun 2009 10:13:03 +0000 (12:13 +0200)
src/element.c

index e670864..71a60c6 100644 (file)
@@ -939,6 +939,7 @@ int __connman_element_append_ipv4(struct connman_element *element,
 {
        const char *method = NULL;
        const char *address = NULL, *netmask = NULL, *gateway = NULL;
+       const char *broadcast = NULL, *nameserver = NULL;
 
        connman_element_get_value(element,
                                CONNMAN_PROPERTY_ID_IPV4_METHOD, &method);
@@ -949,6 +950,10 @@ int __connman_element_append_ipv4(struct connman_element *element,
                                CONNMAN_PROPERTY_ID_IPV4_NETMASK, &netmask);
        connman_element_get_value(element,
                                CONNMAN_PROPERTY_ID_IPV4_GATEWAY, &gateway);
+       connman_element_get_value(element,
+                       CONNMAN_PROPERTY_ID_IPV4_BROADCAST, &broadcast);
+       connman_element_get_value(element,
+                       CONNMAN_PROPERTY_ID_IPV4_NAMESERVER, &nameserver);
 
        if (method != NULL)
                connman_dbus_dict_append_variant(dict, "IPv4.Method",
@@ -966,6 +971,14 @@ int __connman_element_append_ipv4(struct connman_element *element,
                connman_dbus_dict_append_variant(dict, "IPv4.Gateway",
                                                DBUS_TYPE_STRING, &gateway);
 
+       if (broadcast != NULL)
+               connman_dbus_dict_append_variant(dict, "IPv4.Broadcast",
+                                               DBUS_TYPE_STRING, &broadcast);
+
+       if (nameserver != NULL)
+               connman_dbus_dict_append_variant(dict, "IPv4.Nameserver",
+                                               DBUS_TYPE_STRING, &nameserver);
+
        return 0;
 }