aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_cli.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2013-03-31 17:31:07 (GMT)
committerJouni Malinen <j@w1.fi>2013-03-31 17:31:07 (GMT)
commitacb546436aa670c3ca3b5204041e7194e8171aea (patch)
tree4d2f5ff304cd877f6e7624686ba1971287b60435 /wpa_supplicant/wpa_cli.c
parent97236cee6a52ca15c488af548ae7be31f854a85d (diff)
downloadhostap-acb546436aa670c3ca3b5204041e7194e8171aea.zip
hostap-acb546436aa670c3ca3b5204041e7194e8171aea.tar.gz
hostap-acb546436aa670c3ca3b5204041e7194e8171aea.tar.bz2
Add ctrl_iface command FLUSH for clearing wpa_supplicant state
This is mainly for testing purposes where it is convenient to have an easy way of getting wpa_supplicant state cleared between test cases. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'wpa_supplicant/wpa_cli.c')
-rw-r--r--wpa_supplicant/wpa_cli.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index 9fb9d0b..3765c4e 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -2279,6 +2279,12 @@ static int wpa_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[])
}
+static int wpa_cli_cmd_flush(struct wpa_ctrl *ctrl, int argc, char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "FLUSH");
+}
+
+
enum wpa_cli_cmd_flags {
cli_cmd_flag_none = 0x00,
cli_cmd_flag_sensitive = 0x01
@@ -2726,6 +2732,8 @@ static struct wpa_cli_cmd wpa_cli_commands[] = {
#endif /* CONFIG_WNM */
{ "raw", wpa_cli_cmd_raw, NULL, cli_cmd_flag_sensitive,
"<params..> = Sent unprocessed command" },
+ { "flush", wpa_cli_cmd_flush, NULL, cli_cmd_flag_none,
+ "= flush wpa_supplicant state" },
{ NULL, NULL, NULL, cli_cmd_flag_none, NULL }
};