aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2011-10-07 10:33:04 (GMT)
committerJouni Malinen <j@w1.fi>2011-10-16 20:55:34 (GMT)
commit71269b37080909cd8fd64366c9b9f22a1cf8e723 (patch)
treebec42f40e66a33c3e80ec412b7211423f3e445fe /hostapd/hostapd_cli.c
parent4fe9fa0d2928430eda09cc8aad86c60898393d45 (diff)
downloadhostap-71269b37080909cd8fd64366c9b9f22a1cf8e723.zip
hostap-71269b37080909cd8fd64366c9b9f22a1cf8e723.tar.gz
hostap-71269b37080909cd8fd64366c9b9f22a1cf8e723.tar.bz2
WNM: Add BSS Transition Management Request for ESS Disassoc Imminent
"hostapd_cli ess_disassoc (STA addr) (URL)" can now be used to send an ESS Dissassociation Imminent notification to the STA. This event is shown in wpa_supplicant ctrl_iface monitors (e.g., wpa_cli): "WNM: ESS Disassociation Imminent - session_info_url=http://example.com/session/"
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r--hostapd/hostapd_cli.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 0071261..527860c 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -515,6 +515,26 @@ static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc,
#endif /* CONFIG_WPS */
+static int hostapd_cli_cmd_ess_disassoc(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ char buf[300];
+ int res;
+
+ if (argc < 2) {
+ printf("Invalid 'ess_disassoc' command - two arguments (STA "
+ "addr and URL) are needed\n");
+ return -1;
+ }
+
+ res = os_snprintf(buf, sizeof(buf), "ESS_DISASSOC %s %s",
+ argv[0], argv[1]);
+ if (res < 0 || res >= (int) sizeof(buf))
+ return -1;
+ return wpa_ctrl_command(ctrl, buf);
+}
+
+
static int hostapd_cli_cmd_get_config(struct wpa_ctrl *ctrl, int argc,
char *argv[])
{
@@ -728,6 +748,7 @@ static struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "wps_ap_pin", hostapd_cli_cmd_wps_ap_pin },
{ "wps_config", hostapd_cli_cmd_wps_config },
#endif /* CONFIG_WPS */
+ { "ess_disassoc", hostapd_cli_cmd_ess_disassoc },
{ "get_config", hostapd_cli_cmd_get_config },
{ "help", hostapd_cli_cmd_help },
{ "interface", hostapd_cli_cmd_interface },