aboutsummaryrefslogtreecommitdiffstats
path: root/wlantest/ctrl.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-11-18 15:36:08 (GMT)
committerJouni Malinen <j@w1.fi>2010-11-18 15:36:08 (GMT)
commitd356bd630b6876866ca70e177a2b9eca13fb1e35 (patch)
treeb70652d7f2843e301b0277ae59fac0cd77f728da /wlantest/ctrl.c
parent6f2346c144f8f7ee8973f0db841558e339fb9b15 (diff)
downloadhostap-d356bd630b6876866ca70e177a2b9eca13fb1e35.zip
hostap-d356bd630b6876866ca70e177a2b9eca13fb1e35.tar.gz
hostap-d356bd630b6876866ca70e177a2b9eca13fb1e35.tar.bz2
wlantest: Add flush command for dropping all BSS data
Diffstat (limited to 'wlantest/ctrl.c')
-rw-r--r--wlantest/ctrl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/wlantest/ctrl.c b/wlantest/ctrl.c
index 3f88029..f2526eb 100644
--- a/wlantest/ctrl.c
+++ b/wlantest/ctrl.c
@@ -149,6 +149,14 @@ static void ctrl_list_sta(struct wlantest *wt, int sock, u8 *cmd, size_t clen)
}
+static void ctrl_flush(struct wlantest *wt, int sock)
+{
+ wpa_printf(MSG_DEBUG, "Drop all collected BSS data");
+ bss_flush(wt);
+ ctrl_send_simple(wt, sock, WLANTEST_CTRL_SUCCESS);
+}
+
+
static void ctrl_read(int sock, void *eloop_ctx, void *sock_ctx)
{
struct wlantest *wt = eloop_ctx;
@@ -193,6 +201,9 @@ static void ctrl_read(int sock, void *eloop_ctx, void *sock_ctx)
case WLANTEST_CTRL_LIST_STA:
ctrl_list_sta(wt, sock, buf + 4, len - 4);
break;
+ case WLANTEST_CTRL_FLUSH:
+ ctrl_flush(wt, sock);
+ break;
default:
ctrl_send_simple(wt, sock, WLANTEST_CTRL_UNKNOWN_CMD);
break;