Home | History | Annotate | Download | only in hostapd

Lines Matching defs:argv

207 static int hostapd_cli_cmd_ping(struct wpa_ctrl *ctrl, int argc, char *argv[])
213 static int hostapd_cli_cmd_relog(struct wpa_ctrl *ctrl, int argc, char *argv[])
219 static int hostapd_cli_cmd_mib(struct wpa_ctrl *ctrl, int argc, char *argv[])
270 static int hostapd_cli_cmd_sta(struct wpa_ctrl *ctrl, int argc, char *argv[])
278 snprintf(buf, sizeof(buf), "STA %s", argv[0]);
284 char *argv[])
292 snprintf(buf, sizeof(buf), "NEW_STA %s", argv[0]);
298 char *argv[])
308 argv[0], argv[1]);
310 os_snprintf(buf, sizeof(buf), "DEAUTHENTICATE %s", argv[0]);
316 char *argv[])
326 argv[0], argv[1]);
328 os_snprintf(buf, sizeof(buf), "DISASSOCIATE %s", argv[0]);
335 char *argv[])
343 snprintf(buf, sizeof(buf), "SA_QUERY %s", argv[0]);
351 char *argv[])
361 argv[0], argv[1], argv[2], argv[3]);
364 argv[0], argv[1], argv[2]);
366 snprintf(buf, sizeof(buf), "WPS_PIN %s %s", argv[0], argv[1]);
372 char *argv[])
385 argv[0], argv[1]);
388 argv[0]);
398 char *argv[])
405 char *argv[])
413 char *argv[])
425 buflen = 18 + os_strlen(argv[0]);
429 os_snprintf(buf, buflen, "WPS_NFC_TAG_READ %s", argv[0]);
439 int argc, char *argv[])
451 argv[0]);
461 int argc, char *argv[])
472 res = os_snprintf(cmd, sizeof(cmd), "WPS_NFC_TOKEN %s", argv[0]);
482 int argc, char *argv[])
494 argv[0], argv[1]);
506 char *argv[])
516 argv[0], argv[1], argv[2]);
519 argv[0], argv[1]);
521 snprintf(buf, sizeof(buf), "WPS_AP_PIN %s", argv[0]);
527 char *argv[])
534 char *argv[])
549 if (argv[0][i] == '\0')
551 os_snprintf(&ssid_hex[i * 2], 3, "%02x", argv[0][i]);
557 if (argv[3][i] == '\0')
560 argv[3][i]);
566 ssid_hex, argv[1], argv[2], key_hex);
569 ssid_hex, argv[1], argv[2]);
572 ssid_hex, argv[1]);
579 char *argv[])
591 argv[0], argv[1]);
599 char *argv[])
611 argv[0], argv[1], argv[2]);
619 char *argv[])
662 char *argv[])
676 static int hostapd_cli_cmd_help(struct wpa_ctrl *ctrl, int argc, char *argv[])
684 char *argv[])
691 static int hostapd_cli_cmd_quit(struct wpa_ctrl *ctrl, int argc, char *argv[])
700 static int hostapd_cli_cmd_level(struct wpa_ctrl *ctrl, int argc, char *argv[])
708 snprintf(cmd, sizeof(cmd), "LEVEL %s", argv[0]);
737 char *argv[])
746 ctrl_ifname = strdup(argv[0]);
764 static int hostapd_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[])
775 res = os_snprintf(cmd, sizeof(cmd), "SET %s %s", argv[0], argv[1]);
784 static int hostapd_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[])
795 res = os_snprintf(cmd, sizeof(cmd), "GET %s", argv[0]);
806 int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
850 static void wpa_request(struct wpa_ctrl *ctrl, int argc, char *argv[])
858 if (strncasecmp(cmd->cmd, argv[0], strlen(argv[0])) == 0) {
860 if (os_strcasecmp(cmd->cmd, argv[0]) == 0) {
871 printf("Ambiguous command '%s'; possible commands:", argv[0]);
874 if (strncasecmp(cmd->cmd, argv[0], strlen(argv[0])) ==
882 printf("Unknown command '%s'\n", argv[0]);
884 match->handler(ctrl, argc - 1, &argv[1]);
918 static int tokenize_cmd(char *cmd, char *argv[])
929 argv[argc] = pos;
980 char *argv[max_args];
982 argc = tokenize_cmd(cmd, argv);
984 wpa_request(ctrl_conn, argc, argv);
1057 int main(int argc, char *argv[])
1067 c = getopt(argc, argv, "a:BhG:i:p:v");
1166 wpa_request(ctrl_conn, argc - optind, &argv[optind]);