Home | History | Annotate | Download | only in hostapd

Lines Matching defs:cmd

81 "   wps_ap_pin <cmd> [params..]  enable/disable AP PIN\n"
174 static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, char *cmd, int print)
185 ret = wpa_ctrl_request(ctrl, cmd, strlen(cmd), buf, &len,
188 printf("'%s' command timed out.\n", cmd);
191 printf("'%s' command failed.\n", cmd);
202 static inline int wpa_ctrl_command(struct wpa_ctrl *ctrl, char *cmd)
204 return _wpa_ctrl_command(ctrl, cmd, 1);
382 char cmd[256];
392 res = os_snprintf(cmd, sizeof(cmd), "WPS_CHECK_PIN %s %s",
395 res = os_snprintf(cmd, sizeof(cmd), "WPS_CHECK_PIN %s",
397 if (os_snprintf_error(sizeof(cmd), res)) {
401 return wpa_ctrl_command(ctrl, cmd);
449 char cmd[64];
458 res = os_snprintf(cmd, sizeof(cmd), "WPS_NFC_CONFIG_TOKEN %s",
460 if (os_snprintf_error(sizeof(cmd), res)) {
464 return wpa_ctrl_command(ctrl, cmd);
471 char cmd[64];
480 res = os_snprintf(cmd, sizeof(cmd), "WPS_NFC_TOKEN %s", argv[0]);
481 if (os_snprintf_error(sizeof(cmd), res)) {
485 return wpa_ctrl_command(ctrl, cmd);
492 char cmd[64];
501 res = os_snprintf(cmd, sizeof(cmd), "NFC_GET_HANDOVER_SEL %s %s",
503 if (os_snprintf_error(sizeof(cmd), res)) {
507 return wpa_ctrl_command(ctrl, cmd);
660 static int wpa_ctrl_command_sta(struct wpa_ctrl *ctrl, char *cmd,
672 ret = wpa_ctrl_request(ctrl, cmd, strlen(cmd), buf, &len,
675 printf("'%s' command timed out.\n", cmd);
678 printf("'%s' command failed.\n", cmd);
699 char addr[32], cmd[64];
704 snprintf(cmd, sizeof(cmd), "STA-NEXT %s", addr);
705 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr)) == 0);
821 char cmd[256];
827 snprintf(cmd, sizeof(cmd), "LEVEL %s", argv[0]);
828 return wpa_ctrl_command(ctrl, cmd);
887 char cmd[256];
896 res = os_snprintf(cmd, sizeof(cmd), "SET %s %s", argv[0], argv[1]);
897 if (os_snprintf_error(sizeof(cmd), res)) {
901 return wpa_ctrl_command(ctrl, cmd);
907 char cmd[256];
916 res = os_snprintf(cmd, sizeof(cmd), "GET %s", argv[0]);
917 if (os_snprintf_error(sizeof(cmd), res)) {
921 return wpa_ctrl_command(ctrl, cmd);
928 char cmd[256];
943 res = os_snprintf(cmd, sizeof(cmd), "CHAN_SWITCH %s %s",
945 if (os_snprintf_error(sizeof(cmd), res)) {
952 tmp = cmd + total;
953 res = os_snprintf(tmp, sizeof(cmd) - total, " %s", argv[i]);
954 if (os_snprintf_error(sizeof(cmd) - total, res)) {
960 return wpa_ctrl_command(ctrl, cmd);
987 char cmd[256];
996 res = os_snprintf(cmd, sizeof(cmd), "VENDOR %s %s %s", argv[0], argv[1],
998 if (os_snprintf_error(sizeof(cmd), res)) {
1002 return wpa_ctrl_command(ctrl, cmd);
1014 const char *cmd;
1073 const struct hostapd_cli_cmd *cmd, *match = NULL;
1077 cmd = hostapd_cli_commands;
1078 while (cmd->cmd) {
1079 if (strncasecmp(cmd->cmd, argv[0], strlen(argv[0])) == 0) {
1080 match = cmd;
1081 if (os_strcasecmp(cmd->cmd, argv[0]) == 0) {
1088 cmd++;
1093 cmd = hostapd_cli_commands;
1094 while (cmd->cmd) {
1095 if (strncasecmp(cmd->cmd, argv[0], strlen(argv[0])) ==
1097 printf(" %s", cmd->cmd);
1099 cmd++;
1139 static int tokenize_cmd(char *cmd, char *argv[])
1144 pos = cmd;
1199 static void hostapd_cli_edit_cmd_cb(void *ctx, char *cmd)
1203 argc = tokenize_cmd(cmd, argv);