Lines Matching refs:argc
226 static int write_cmd(char *buf, size_t buflen, const char *cmd, int argc,
240 for (i = 0; i < argc; i++) {
257 int min_args, int argc, char *argv[])
261 if (argc < min_args) {
266 if (write_cmd(buf, sizeof(buf), cmd, argc, argv) < 0)
272 static int hostapd_cli_cmd_ping(struct wpa_ctrl *ctrl, int argc, char *argv[])
278 static int hostapd_cli_cmd_relog(struct wpa_ctrl *ctrl, int argc, char *argv[])
284 static int hostapd_cli_cmd_status(struct wpa_ctrl *ctrl, int argc, char *argv[])
286 if (argc > 0 && os_strcmp(argv[0], "driver") == 0)
292 static int hostapd_cli_cmd_mib(struct wpa_ctrl *ctrl, int argc, char *argv[])
294 if (argc > 0) {
339 static int hostapd_cli_cmd_sta(struct wpa_ctrl *ctrl, int argc, char *argv[])
342 if (argc < 1) {
347 if (argc > 1)
355 static int hostapd_cli_cmd_new_sta(struct wpa_ctrl *ctrl, int argc,
359 if (argc != 1) {
369 static int hostapd_cli_cmd_deauthenticate(struct wpa_ctrl *ctrl, int argc,
373 if (argc < 1) {
378 if (argc > 1)
387 static int hostapd_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc,
391 if (argc < 1) {
396 if (argc > 1)
406 static int hostapd_cli_cmd_sa_query(struct wpa_ctrl *ctrl, int argc,
410 if (argc != 1) {
422 static int hostapd_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc,
426 if (argc < 2) {
431 if (argc > 3)
434 else if (argc > 2)
443 static int hostapd_cli_cmd_wps_check_pin(struct wpa_ctrl *ctrl, int argc,
449 if (argc != 1 && argc != 2) {
455 if (argc == 2)
469 static int hostapd_cli_cmd_wps_pbc(struct wpa_ctrl *ctrl, int argc,
476 static int hostapd_cli_cmd_wps_cancel(struct wpa_ctrl *ctrl, int argc,
484 static int hostapd_cli_cmd_wps_nfc_tag_read(struct wpa_ctrl *ctrl, int argc,
491 if (argc != 1) {
511 int argc, char *argv[])
516 if (argc != 1) {
533 int argc, char *argv[])
538 if (argc != 1) {
554 int argc, char *argv[])
559 if (argc != 2) {
577 static int hostapd_cli_cmd_wps_ap_pin(struct wpa_ctrl *ctrl, int argc,
581 if (argc < 1) {
586 if (argc > 2)
589 else if (argc > 1)
598 static int hostapd_cli_cmd_wps_get_status(struct wpa_ctrl *ctrl, int argc,
605 static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc,
613 if (argc < 1) {
627 if (argc > 3) {
636 if (argc > 3)
639 else if (argc > 2)
650 static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc,
656 if (argc < 2) {
670 static int hostapd_cli_cmd_ess_disassoc(struct wpa_ctrl *ctrl, int argc,
676 if (argc < 3) {
690 static int hostapd_cli_cmd_bss_tm_req(struct wpa_ctrl *ctrl, int argc,
696 if (argc < 1) {
706 for (i = 1; i < argc; i++) {
717 static int hostapd_cli_cmd_get_config(struct wpa_ctrl *ctrl, int argc,
760 static int hostapd_cli_cmd_all_sta(struct wpa_ctrl *ctrl, int argc,
775 static int hostapd_cli_cmd_help(struct wpa_ctrl *ctrl, int argc, char *argv[])
782 static int hostapd_cli_cmd_license(struct wpa_ctrl *ctrl, int argc,
791 int argc, char *argv[])
796 if (argc != 1) {
811 int argc, char *argv[])
816 if (argc != 1) {
829 static int hostapd_cli_cmd_hs20_wnm_notif(struct wpa_ctrl *ctrl, int argc,
835 if (argc < 2) {
849 static int hostapd_cli_cmd_hs20_deauth_req(struct wpa_ctrl *ctrl, int argc,
855 if (argc < 3) {
860 if (argc > 3)
874 static int hostapd_cli_cmd_quit(struct wpa_ctrl *ctrl, int argc, char *argv[])
883 static int hostapd_cli_cmd_level(struct wpa_ctrl *ctrl, int argc, char *argv[])
886 if (argc != 1) {
919 static int hostapd_cli_cmd_interface(struct wpa_ctrl *ctrl, int argc,
922 if (argc < 1) {
949 static int hostapd_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[])
954 if (argc != 2) {
969 static int hostapd_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[])
974 if (argc != 1) {
990 static int hostapd_cli_cmd_fst(struct wpa_ctrl *ctrl, int argc, char *argv[])
997 if (argc <= 0) {
1004 for (i = 0; i < argc; i++) {
1019 int argc, char *argv[])
1027 if (argc < 2) {
1044 for (i = 2; i < argc; i++) {
1057 static int hostapd_cli_cmd_enable(struct wpa_ctrl *ctrl, int argc,
1064 static int hostapd_cli_cmd_reload(struct wpa_ctrl *ctrl, int argc,
1071 static int hostapd_cli_cmd_disable(struct wpa_ctrl *ctrl, int argc,
1078 static int hostapd_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
1083 if (argc < 2 || argc > 3) {
1090 argc == 3 ? argv[2] : "");
1099 static int hostapd_cli_cmd_erp_flush(struct wpa_ctrl *ctrl, int argc,
1106 static int hostapd_cli_cmd_log_level(struct wpa_ctrl *ctrl, int argc,
1113 argc >= 1 ? " " : "",
1114 argc >= 1 ? argv[0] : "",
1115 argc == 2 ? " " : "",
1116 argc == 2 ? argv[1] : "");
1125 static int hostapd_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[])
1127 if (argc == 0)
1129 return hostapd_cli_cmd(ctrl, argv[0], 0, argc - 1, &argv[1]);
1133 static int hostapd_cli_cmd_pmksa(struct wpa_ctrl *ctrl, int argc, char *argv[])
1139 static int hostapd_cli_cmd_pmksa_flush(struct wpa_ctrl *ctrl, int argc,
1148 int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
1211 static void wpa_request(struct wpa_ctrl *ctrl, int argc, char *argv[])
1245 match->handler(ctrl, argc - 1, &argv[1]);
1282 int argc = 0;
1290 argv[argc] = pos;
1291 argc++;
1292 if (argc == max_args)
1305 return argc;
1342 int argc;
1343 argc = tokenize_cmd(cmd, argv);
1344 if (argc)
1345 wpa_request(ctrl_conn, argc, argv);
1418 int main(int argc, char *argv[])
1428 c = getopt(argc, argv, "a:BhG:i:p:P:s:v");
1466 interactive = (argc == optind) && (action_file == NULL);
1533 wpa_request(ctrl_conn, argc - optind, &argv[optind]);
1543 int main(int argc, char *argv[])