Lines Matching refs:cmd
23 static int hostapd_cli_cmd(struct wpa_ctrl *ctrl, const char *cmd, in hostapd_cli_cmd() argument
41 "required.\n", cmd, min_args, in hostapd_cli_cmd()
46 if (write_cmd(buf, CMD_BUF_LEN, cmd, argc, argv) < 0){ in hostapd_cli_cmd()
63 char cmd[256]; in hostapd_cli_cmd_set() local
67 res = os_snprintf(cmd, sizeof(cmd), "SET %s ", argv[0]); in hostapd_cli_cmd_set()
68 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_set()
72 return hostapd_cli_cmd(ctrl, cmd, 0, argc, argv); in hostapd_cli_cmd_set()
237 char cmd[256]; in hostapd_cli_cmd_chan_switch() local
252 res = os_snprintf(cmd, sizeof(cmd), "CHAN_SWITCH %s %s", in hostapd_cli_cmd_chan_switch()
254 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_chan_switch()
261 tmp = cmd + total; in hostapd_cli_cmd_chan_switch()
262 res = os_snprintf(tmp, sizeof(cmd) - total, " %s", argv[i]); in hostapd_cli_cmd_chan_switch()
263 if (os_snprintf_error(sizeof(cmd) - total, res)) { in hostapd_cli_cmd_chan_switch()
269 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_chan_switch()
351 char cmd[256]; in hostapd_cli_cmd_wps_check_pin() local
361 res = os_snprintf(cmd, sizeof(cmd), "WPS_CHECK_PIN %s %s", in hostapd_cli_cmd_wps_check_pin()
364 res = os_snprintf(cmd, sizeof(cmd), "WPS_CHECK_PIN %s", in hostapd_cli_cmd_wps_check_pin()
366 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_wps_check_pin()
370 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_wps_check_pin()
418 char cmd[64]; in hostapd_cli_cmd_wps_nfc_config_token() local
427 res = os_snprintf(cmd, sizeof(cmd), "WPS_NFC_CONFIG_TOKEN %s", in hostapd_cli_cmd_wps_nfc_config_token()
429 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_wps_nfc_config_token()
433 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_wps_nfc_config_token()
440 char cmd[64]; in hostapd_cli_cmd_wps_nfc_token() local
449 res = os_snprintf(cmd, sizeof(cmd), "WPS_NFC_TOKEN %s", argv[0]); in hostapd_cli_cmd_wps_nfc_token()
450 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_wps_nfc_token()
454 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_wps_nfc_token()
461 char cmd[64]; in hostapd_cli_cmd_nfc_get_handover_sel() local
470 res = os_snprintf(cmd, sizeof(cmd), "NFC_GET_HANDOVER_SEL %s %s", in hostapd_cli_cmd_nfc_get_handover_sel()
472 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_nfc_get_handover_sel()
476 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_nfc_get_handover_sel()
629 static int wpa_ctrl_command_sta(struct wpa_ctrl *ctrl, const char *cmd, in wpa_ctrl_command_sta() argument
637 ret = wpa_ctrl_request(ctrl, cmd, strlen(cmd), buf, &len, in wpa_ctrl_command_sta()
640 printf("'%s' command timed out.\n", cmd); in wpa_ctrl_command_sta()
643 printf("'%s' command failed.\n", cmd); in wpa_ctrl_command_sta()
665 char addr[32], cmd[64]; in hostapd_cli_cmd_all_sta() local
670 os_snprintf(cmd, sizeof(cmd), "STA-NEXT %s", addr); in hostapd_cli_cmd_all_sta()
671 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 1) == 0); in hostapd_cli_cmd_all_sta()
680 char addr[32], cmd[64]; in hostapd_cli_cmd_list_sta() local
687 os_snprintf(cmd, sizeof(cmd), "STA-NEXT %s", addr); in hostapd_cli_cmd_list_sta()
688 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 0) == 0); in hostapd_cli_cmd_list_sta()
780 char cmd[256]; in hostapd_cli_cmd_get() local
789 res = os_snprintf(cmd, sizeof(cmd), "GET %s", argv[0]); in hostapd_cli_cmd_get()
790 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_get()
794 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_get()
826 char cmd[256]; in hostapd_cli_cmd_fst() local
836 total = os_snprintf(cmd, sizeof(cmd), "FST-MANAGER"); in hostapd_cli_cmd_fst()
839 res = os_snprintf(cmd + total, sizeof(cmd) - total, " %s", in hostapd_cli_cmd_fst()
841 if (os_snprintf_error(sizeof(cmd) - total, res)) { in hostapd_cli_cmd_fst()
847 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_fst()
854 char cmd[256]; in hostapd_cli_cmd_vendor() local
863 res = os_snprintf(cmd, sizeof(cmd), "VENDOR %s %s %s%s%s", argv[0], in hostapd_cli_cmd_vendor()
866 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_vendor()
870 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_vendor()
884 char cmd[256]; in hostapd_cli_cmd_log_level() local
887 res = os_snprintf(cmd, sizeof(cmd), "LOG_LEVEL%s%s%s%s", in hostapd_cli_cmd_log_level()
892 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_log_level()
896 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_log_level()
924 char cmd[2048]; in hostapd_cli_cmd_set_neighbor() local
932 res = os_snprintf(cmd, sizeof(cmd), "SET_NEIGHBOR %s %s %s %s %s %s", in hostapd_cli_cmd_set_neighbor()
935 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_set_neighbor()
939 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_set_neighbor()
960 char cmd[256]; in hostapd_cli_cmd_req_lci() local
968 res = os_snprintf(cmd, sizeof(cmd), "REQ_LCI %s", argv[0]); in hostapd_cli_cmd_req_lci()
969 if (os_snprintf_error(sizeof(cmd), res)) { in hostapd_cli_cmd_req_lci()
973 return hostapd_ctrl_command(ctrl, cmd); in hostapd_cli_cmd_req_lci()
1172 const char *cmd; member
1357 const struct hostapd_cli_cmd *cmd, *match = NULL; in hostapd_request() local
1362 cmd = hostapd_cli_commands; in hostapd_request()
1363 while (cmd->cmd) { in hostapd_request()
1364 if (strncasecmp(cmd->cmd, argv[0], strlen(argv[0])) == 0) { in hostapd_request()
1365 match = cmd; in hostapd_request()
1366 if (os_strcasecmp(cmd->cmd, argv[0]) == 0) { in hostapd_request()
1373 cmd++; in hostapd_request()
1378 cmd = hostapd_cli_commands; in hostapd_request()
1379 while (cmd->cmd) { in hostapd_request()
1380 if (strncasecmp(cmd->cmd, argv[0], strlen(argv[0])) == in hostapd_request()
1382 printf(" %s", cmd->cmd); in hostapd_request()
1384 cmd++; in hostapd_request()