X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=hostapd%2Fhostapd_cli.c;h=b693fa0531947be92871ccda03ccfe57cdb453f7;hb=a54fa5fb807eaeff45464139b5a7759f060cec68;hp=de1af3bb28be054c4bef686df59a0f461ff0c4bb;hpb=d27fcf69aa1b0e5400526626b3ffdeacc21660b6;p=android-x86%2Fexternal-wpa_supplicant_8.git diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c index de1af3b..b693fa0 100644 --- a/hostapd/hostapd_cli.c +++ b/hostapd/hostapd_cli.c @@ -18,7 +18,7 @@ static const char *hostapd_cli_version = "hostapd_cli v" VERSION_STR "\n" -"Copyright (c) 2004-2012, Jouni Malinen and contributors"; +"Copyright (c) 2004-2013, Jouni Malinen and contributors"; static const char *hostapd_cli_license = @@ -544,6 +544,26 @@ static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc, #endif /* CONFIG_WPS */ +static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc, + char *argv[]) +{ + char buf[300]; + int res; + + if (argc < 2) { + printf("Invalid 'disassoc_imminent' command - two arguments " + "(STA addr and Disassociation Timer) are needed\n"); + return -1; + } + + res = os_snprintf(buf, sizeof(buf), "DISASSOC_IMMINENT %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_ess_disassoc(struct wpa_ctrl *ctrl, int argc, char *argv[]) { @@ -780,6 +800,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 */ + { "disassoc_imminent", hostapd_cli_cmd_disassoc_imminent }, { "ess_disassoc", hostapd_cli_cmd_ess_disassoc }, { "get_config", hostapd_cli_cmd_get_config }, { "help", hostapd_cli_cmd_help },