aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@qca.qualcomm.com>2013-03-17 14:03:42 (GMT)
committerJouni Malinen <j@w1.fi>2014-02-25 23:24:24 (GMT)
commit3fb17a95307c19427c707813051e4043745df6ba (patch)
tree0471a6b28899c536350d6ddda0002dfa4df0bd8b /hostapd/hostapd_cli.c
parentd5d24784e6eb6d41dafbdf9878b5632a5ec068ad (diff)
downloadhostap-3fb17a95307c19427c707813051e4043745df6ba.zip
hostap-3fb17a95307c19427c707813051e4043745df6ba.tar.gz
hostap-3fb17a95307c19427c707813051e4043745df6ba.tar.bz2
HS 2.0R2 AP: Add WNM-Notification Request for Subscription Remediation
Subscription remediation notification can now be sent from hostapd with: hostapd_cli hs20_wnm_notif 02:00:00:00:00:00 http://example.com/foo/ Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
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 eee8504..4d5f269 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -743,6 +743,26 @@ static int hostapd_cli_cmd_send_qos_map_conf(struct wpa_ctrl *ctrl,
}
+static int hostapd_cli_cmd_hs20_wnm_notif(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ char buf[300];
+ int res;
+
+ if (argc < 2) {
+ printf("Invalid 'hs20_wnm_notif' command - two arguments (STA "
+ "addr and URL) are needed\n");
+ return -1;
+ }
+
+ res = os_snprintf(buf, sizeof(buf), "HS20_WNM_NOTIF %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_quit(struct wpa_ctrl *ctrl, int argc, char *argv[])
{
hostapd_cli_quit = 1;
@@ -941,6 +961,7 @@ static struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "set_qos_map_set", hostapd_cli_cmd_set_qos_map_set },
{ "send_qos_map_conf", hostapd_cli_cmd_send_qos_map_conf },
{ "chan_switch", hostapd_cli_cmd_chan_switch },
+ { "hs20_wnm_notif", hostapd_cli_cmd_hs20_wnm_notif },
{ NULL, NULL }
};