]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Add DPP_CONTROLLER commands to hostapd_cli and wpa_cli
authorDisha Das <dishad@codeaurora.org>
Thu, 10 Dec 2020 06:05:32 +0000 (11:35 +0530)
committerJouni Malinen <j@w1.fi>
Wed, 16 Dec 2020 16:04:15 +0000 (18:04 +0200)
Add the DPP control interface DPP_CONTROLLER_START and
DPP_CONTROLLER_STOP commands to the CLIs.

Signed-off-by: Disha Das <dishad@codeaurora.org>
hostapd/hostapd_cli.c
wpa_supplicant/wpa_cli.c

index dac00e01abfdf09ea459540616184d969a661b03..249e46699273485c6186acbb36236fd52585d38b 100644 (file)
@@ -1475,6 +1475,20 @@ static int hostapd_cli_cmd_dpp_pkex_remove(struct wpa_ctrl *ctrl, int argc,
 
 #ifdef CONFIG_DPP2
 
+static int hostapd_cli_cmd_dpp_controller_start(struct wpa_ctrl *ctrl, int argc,
+                                               char *argv[])
+{
+       return hostapd_cli_cmd(ctrl, "DPP_CONTROLLER_START", 1, argc, argv);
+}
+
+
+static int hostapd_cli_cmd_dpp_controller_stop(struct wpa_ctrl *ctrl, int argc,
+                                              char *argv[])
+{
+       return wpa_ctrl_command(ctrl, "DPP_CONTROLLER_STOP");
+}
+
+
 static int hostapd_cli_cmd_dpp_chirp(struct wpa_ctrl *ctrl, int argc,
                                     char *argv[])
 {
@@ -1698,6 +1712,10 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
        { "dpp_pkex_remove", hostapd_cli_cmd_dpp_pkex_remove, NULL,
          "*|<id> = remove DPP pkex information" },
 #ifdef CONFIG_DPP2
+       { "dpp_controller_start", hostapd_cli_cmd_dpp_controller_start, NULL,
+         "[tcp_port=<port>] [role=..] = start DPP controller" },
+       { "dpp_controller_stop", hostapd_cli_cmd_dpp_controller_stop, NULL,
+         "= stop DPP controller" },
        { "dpp_chirp", hostapd_cli_cmd_dpp_chirp, NULL,
          "own=<BI ID> iter=<count> = start DPP chirp" },
        { "dpp_stop_chirp", hostapd_cli_cmd_dpp_stop_chirp, NULL,
index 813e4b3cfda4ae6e8d042f0c51f881e596f36038..9f2f903cc8b07a335a1da69d67fb732863a593e7 100644 (file)
@@ -3066,6 +3066,20 @@ static int wpa_cli_cmd_dpp_pkex_remove(struct wpa_ctrl *ctrl, int argc,
 
 #ifdef CONFIG_DPP2
 
+static int wpa_cli_cmd_dpp_controller_start(struct wpa_ctrl *ctrl, int argc,
+                                           char *argv[])
+{
+       return wpa_cli_cmd(ctrl, "DPP_CONTROLLER_START", 1, argc, argv);
+}
+
+
+static int wpa_cli_cmd_dpp_controller_stop(struct wpa_ctrl *ctrl, int argc,
+                                           char *argv[])
+{
+       return wpa_ctrl_command(ctrl, "DPP_CONTROLLER_STOP");
+}
+
+
 static int wpa_cli_cmd_dpp_chirp(struct wpa_ctrl *ctrl, int argc,
                                 char *argv[])
 {
@@ -3820,6 +3834,12 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
          cli_cmd_flag_none,
          "*|<id> = remove DPP pkex information" },
 #ifdef CONFIG_DPP2
+       { "dpp_controller_start", wpa_cli_cmd_dpp_controller_start, NULL,
+         cli_cmd_flag_none,
+         "[tcp_port=<port>] [role=..] = start DPP controller" },
+       { "dpp_controller_stop", wpa_cli_cmd_dpp_controller_stop, NULL,
+         cli_cmd_flag_none,
+         "= stop DPP controller" },
        { "dpp_chirp", wpa_cli_cmd_dpp_chirp, NULL,
          cli_cmd_flag_none,
          "own=<BI ID> iter=<count> = start DPP chirp" },