aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hostapd_cli.c
diff options
context:
space:
mode:
authorAnton Nayshtut <qca_antonn@qca.qualcomm.com>2015-01-21 13:30:48 (GMT)
committerJouni Malinen <j@w1.fi>2015-07-16 15:26:15 (GMT)
commitee039107770ee8dd4c8c54fc762796e74c34e601 (patch)
tree1d85e76c6e50859e034d9f1fbd3fea62bf2436b7 /hostapd/hostapd_cli.c
parent8cf53ec9f76d9700d515b1edba960f8c637cf7e7 (diff)
downloadhostap-ee039107770ee8dd4c8c54fc762796e74c34e601.zip
hostap-ee039107770ee8dd4c8c54fc762796e74c34e601.tar.gz
hostap-ee039107770ee8dd4c8c54fc762796e74c34e601.tar.bz2
FST: Add hostapd_cli fst command
This can be used to issue FST-MANAGER control interface commands. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'hostapd/hostapd_cli.c')
-rw-r--r--hostapd/hostapd_cli.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index e299183..42f8bd4 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -922,6 +922,35 @@ static int hostapd_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[])
}
+#ifdef CONFIG_FST
+static int hostapd_cli_cmd_fst(struct wpa_ctrl *ctrl, int argc, char *argv[])
+{
+ char cmd[256];
+ int res;
+ int i;
+ int total;
+
+ if (argc <= 0) {
+ printf("FST command: parameters are required.\n");
+ return -1;
+ }
+
+ total = os_snprintf(cmd, sizeof(cmd), "FST-MANAGER");
+
+ for (i = 0; i < argc; i++) {
+ res = os_snprintf(cmd + total, sizeof(cmd) - total, " %s",
+ argv[i]);
+ if (os_snprintf_error(sizeof(cmd) - total, res)) {
+ printf("Too long fst command.\n");
+ return -1;
+ }
+ total += res;
+ }
+ return wpa_ctrl_command(ctrl, cmd);
+}
+#endif /* CONFIG_FST */
+
+
static int hostapd_cli_cmd_chan_switch(struct wpa_ctrl *ctrl,
int argc, char *argv[])
{
@@ -1049,6 +1078,9 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
{ "get_config", hostapd_cli_cmd_get_config },
{ "help", hostapd_cli_cmd_help },
{ "interface", hostapd_cli_cmd_interface },
+#ifdef CONFIG_FST
+ { "fst", hostapd_cli_cmd_fst },
+#endif /* CONFIG_FST */
{ "level", hostapd_cli_cmd_level },
{ "license", hostapd_cli_cmd_license },
{ "quit", hostapd_cli_cmd_quit },