Add support for initial IPv4 address retrieval
authorMarcel Holtmann <marcel@holtmann.org>
Mon, 24 Dec 2007 00:29:59 +0000 (01:29 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Mon, 24 Dec 2007 00:29:59 +0000 (01:29 +0100)
src/iface.c

index ce6ab38..39de81d 100644 (file)
@@ -24,6 +24,7 @@
 #endif
 
 #include <string.h>
+#include <arpa/inet.h>
 
 #include <glib.h>
 #include <gdbus.h>
@@ -116,6 +117,13 @@ static int probe_device(LibHalContext *ctx,
 
        interfaces = g_slist_append(interfaces, iface);
 
+       if ((iface->flags & CONNMAN_IFACE_FLAGS_IPV4) &&
+                                               driver->get_ipv4) {
+               driver->get_ipv4(iface, &iface->ipv4);
+
+               DBG("address %s", inet_ntoa(iface->ipv4.address));
+       }
+
        return 0;
 }