summaryrefslogtreecommitdiff
path: root/tools/supplicant-test.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-29 04:07:06 -0800
committerMarcel Holtmann <marcel@holtmann.org>2009-12-29 04:07:06 -0800
commit3497514256cdbc94a7c72e4f48c1f38e7b1e559a (patch)
tree5627ffcb55cfca759759a0fda6872b71b743981f /tools/supplicant-test.c
parent13e490f8b49927898121d0949aee62913bbebed7 (diff)
downloadconnman-3497514256cdbc94a7c72e4f48c1f38e7b1e559a.tar.gz
connman-3497514256cdbc94a7c72e4f48c1f38e7b1e559a.tar.bz2
connman-3497514256cdbc94a7c72e4f48c1f38e7b1e559a.zip
Add interface and network handling to supplicant test program
Diffstat (limited to 'tools/supplicant-test.c')
-rw-r--r--tools/supplicant-test.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/tools/supplicant-test.c b/tools/supplicant-test.c
index b448a023..47e183b4 100644
--- a/tools/supplicant-test.c
+++ b/tools/supplicant-test.c
@@ -37,19 +37,39 @@
syslog(LOG_DEBUG, "%s() " fmt, __FUNCTION__ , ## arg); \
} while (0)
-static void interface_added(const struct supplicant_interface *interface)
+static void interface_added(struct supplicant_interface *interface)
{
- DBG("interface %p", interface);
+ const char *ifname = supplicant_interface_get_ifname(interface);
+
+ DBG("ifname %s", ifname);
+}
+
+static void interface_removed(struct supplicant_interface *interface)
+{
+ const char *ifname = supplicant_interface_get_ifname(interface);
+
+ DBG("ifname %s", ifname);
}
-static void interface_removed(const struct supplicant_interface *interface)
+static void network_added(struct supplicant_network *network)
{
- DBG("interface %p", interface);
+ const char *name = supplicant_network_get_name(network);
+
+ DBG("name %s", name);
+}
+
+static void network_removed(struct supplicant_network *network)
+{
+ const char *name = supplicant_network_get_name(network);
+
+ DBG("name %s", name);
}
static const struct supplicant_callbacks callbacks = {
.interface_added = interface_added,
.interface_removed = interface_removed,
+ .network_added = network_added,
+ .network_removed = network_removed,
};
static GMainLoop *main_loop = NULL;