summaryrefslogtreecommitdiff
path: root/tools/supplicant-test.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-31 01:31:45 -0800
committerMarcel Holtmann <marcel@holtmann.org>2009-12-31 01:31:45 -0800
commit2b1e2d01d040dceac55aa3efca707a7ce8521f9c (patch)
treeb50f254d852c4cebd465c908151ec91ffc220628 /tools/supplicant-test.c
parentcd07fbeb1af81232dfb452ec7494bdc33051371e (diff)
downloadconnman-2b1e2d01d040dceac55aa3efca707a7ce8521f9c.tar.gz
connman-2b1e2d01d040dceac55aa3efca707a7ce8521f9c.tar.bz2
connman-2b1e2d01d040dceac55aa3efca707a7ce8521f9c.zip
Add interface creation function to supplicant test program
Diffstat (limited to 'tools/supplicant-test.c')
-rw-r--r--tools/supplicant-test.c27
1 files changed, 19 insertions, 8 deletions
diff --git a/tools/supplicant-test.c b/tools/supplicant-test.c
index e7fa4d67..87dff6fe 100644
--- a/tools/supplicant-test.c
+++ b/tools/supplicant-test.c
@@ -37,46 +37,57 @@
syslog(LOG_DEBUG, "%s() " fmt, __FUNCTION__ , ## arg); \
} while (0)
+static void create_callback(int result, struct supplicant_interface *interface,
+ void *user_data)
+{
+ DBG("* result %d ifname %s", result,
+ supplicant_interface_get_ifname(interface));
+
+ if (result < 0)
+ return;
+}
+
static void system_ready(void)
{
- DBG("");
+ DBG("*");
- //supplicant_set_debug_level(1);
+ supplicant_interface_create("wlan0", "nl80211",
+ create_callback, NULL);
}
static void system_killed(void)
{
- DBG("");
+ DBG("*");
}
static void interface_added(struct supplicant_interface *interface)
{
const char *ifname = supplicant_interface_get_ifname(interface);
- DBG("ifname %s", ifname);
+ DBG("* ifname %s", ifname);
}
static void interface_removed(struct supplicant_interface *interface)
{
const char *ifname = supplicant_interface_get_ifname(interface);
- DBG("ifname %s", ifname);
+ DBG("* ifname %s", ifname);
}
static void network_added(struct supplicant_network *network)
{
const char *name = supplicant_network_get_name(network);
- DBG("name %s", name);
+ DBG("* name %s", name);
- DBG("%s", supplicant_network_get_identifier(network));
+ DBG("* %s", supplicant_network_get_identifier(network));
}
static void network_removed(struct supplicant_network *network)
{
const char *name = supplicant_network_get_name(network);
- DBG("name %s", name);
+ DBG("* name %s", name);
}
static const struct supplicant_callbacks callbacks = {