Home | History | Annotate | Download | only in wpa_supplicant

Lines Matching defs:argc

441 static int write_cmd(char *buf, size_t buflen, const char *cmd, int argc,
455 for (i = 0; i < argc; i++) {
472 int argc, char *argv[])
475 if (argc < min_args) {
481 if (write_cmd(buf, sizeof(buf), cmd, argc, argv) < 0)
487 static int wpa_cli_cmd_ifname(struct wpa_ctrl *ctrl, int argc, char *argv[])
493 static int wpa_cli_cmd_status(struct wpa_ctrl *ctrl, int argc, char *argv[])
495 if (argc > 0 && os_strcmp(argv[0], "verbose") == 0)
497 if (argc > 0 && os_strcmp(argv[0], "wps") == 0)
503 static int wpa_cli_cmd_ping(struct wpa_ctrl *ctrl, int argc, char *argv[])
509 static int wpa_cli_cmd_relog(struct wpa_ctrl *ctrl, int argc, char *argv[])
515 static int wpa_cli_cmd_note(struct wpa_ctrl *ctrl, int argc, char *argv[])
517 return wpa_cli_cmd(ctrl, "NOTE", 1, argc, argv);
521 static int wpa_cli_cmd_mib(struct wpa_ctrl *ctrl, int argc, char *argv[])
527 static int wpa_cli_cmd_pmksa(struct wpa_ctrl *ctrl, int argc, char *argv[])
533 static int wpa_cli_cmd_help(struct wpa_ctrl *ctrl, int argc, char *argv[])
535 print_help(argc > 0 ? argv[0] : NULL);
555 static int wpa_cli_cmd_license(struct wpa_ctrl *ctrl, int argc, char *argv[])
562 static int wpa_cli_cmd_quit(struct wpa_ctrl *ctrl, int argc, char *argv[])
571 static int wpa_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[])
576 if (argc == 1) {
585 return wpa_cli_cmd(ctrl, "SET", 2, argc, argv);
649 static int wpa_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[])
651 return wpa_cli_cmd(ctrl, "GET", 1, argc, argv);
655 static int wpa_cli_cmd_logoff(struct wpa_ctrl *ctrl, int argc, char *argv[])
661 static int wpa_cli_cmd_logon(struct wpa_ctrl *ctrl, int argc, char *argv[])
667 static int wpa_cli_cmd_reassociate(struct wpa_ctrl *ctrl, int argc,
674 static int wpa_cli_cmd_preauthenticate(struct wpa_ctrl *ctrl, int argc,
677 return wpa_cli_cmd(ctrl, "PREAUTH", 1, argc, argv);
681 static int wpa_cli_cmd_ap_scan(struct wpa_ctrl *ctrl, int argc, char *argv[])
683 return wpa_cli_cmd(ctrl, "AP_SCAN", 1, argc, argv);
687 static int wpa_cli_cmd_scan_interval(struct wpa_ctrl *ctrl, int argc,
690 return wpa_cli_cmd(ctrl, "SCAN_INTERVAL", 1, argc, argv);
694 static int wpa_cli_cmd_bss_expire_age(struct wpa_ctrl *ctrl, int argc,
697 return wpa_cli_cmd(ctrl, "BSS_EXPIRE_AGE", 1, argc, argv);
701 static int wpa_cli_cmd_bss_expire_count(struct wpa_ctrl *ctrl, int argc,
704 return wpa_cli_cmd(ctrl, "BSS_EXPIRE_COUNT", 1, argc, argv);
708 static int wpa_cli_cmd_bss_flush(struct wpa_ctrl *ctrl, int argc, char *argv[])
713 if (argc < 1)
725 static int wpa_cli_cmd_stkstart(struct wpa_ctrl *ctrl, int argc,
728 return wpa_cli_cmd(ctrl, "STKSTART", 1, argc, argv);
732 static int wpa_cli_cmd_ft_ds(struct wpa_ctrl *ctrl, int argc, char *argv[])
734 return wpa_cli_cmd(ctrl, "FT_DS", 1, argc, argv);
738 static int wpa_cli_cmd_wps_pbc(struct wpa_ctrl *ctrl, int argc, char *argv[])
740 return wpa_cli_cmd(ctrl, "WPS_PBC", 0, argc, argv);
744 static int wpa_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc, char *argv[])
746 if (argc == 0) {
754 return wpa_cli_cmd(ctrl, "WPS_PIN", 1, argc, argv);
758 static int wpa_cli_cmd_wps_check_pin(struct wpa_ctrl *ctrl, int argc,
761 return wpa_cli_cmd(ctrl, "WPS_CHECK_PIN", 1, argc, argv);
765 static int wpa_cli_cmd_wps_cancel(struct wpa_ctrl *ctrl, int argc,
774 static int wpa_cli_cmd_wps_nfc(struct wpa_ctrl *ctrl, int argc, char *argv[])
776 return wpa_cli_cmd(ctrl, "WPS_NFC", 0, argc, argv);
780 static int wpa_cli_cmd_wps_nfc_config_token(struct wpa_ctrl *ctrl, int argc,
783 return wpa_cli_cmd(ctrl, "WPS_NFC_CONFIG_TOKEN", 1, argc, argv);
787 static int wpa_cli_cmd_wps_nfc_token(struct wpa_ctrl *ctrl, int argc,
790 return wpa_cli_cmd(ctrl, "WPS_NFC_TOKEN", 1, argc, argv);
794 static int wpa_cli_cmd_wps_nfc_tag_read(struct wpa_ctrl *ctrl, int argc,
801 if (argc != 1) {
820 static int wpa_cli_cmd_nfc_get_handover_req(struct wpa_ctrl *ctrl, int argc,
823 return wpa_cli_cmd(ctrl, "NFC_GET_HANDOVER_REQ", 2, argc, argv);
827 static int wpa_cli_cmd_nfc_get_handover_sel(struct wpa_ctrl *ctrl, int argc,
830 return wpa_cli_cmd(ctrl, "NFC_GET_HANDOVER_SEL", 2, argc, argv);
834 static int wpa_cli_cmd_nfc_rx_handover_req(struct wpa_ctrl *ctrl, int argc,
841 if (argc != 1) {
860 static int wpa_cli_cmd_nfc_rx_handover_sel(struct wpa_ctrl *ctrl, int argc,
867 if (argc != 1) {
886 static int wpa_cli_cmd_nfc_report_handover(struct wpa_ctrl *ctrl, int argc,
889 return wpa_cli_cmd(ctrl, "NFC_REPORT_HANDOVER", 4, argc, argv);
895 static int wpa_cli_cmd_wps_reg(struct wpa_ctrl *ctrl, int argc, char *argv[])
900 if (argc == 2)
903 else if (argc == 5 || argc == 6) {
916 if (argc == 6) {
952 static int wpa_cli_cmd_wps_ap_pin(struct wpa_ctrl *ctrl, int argc,
955 return wpa_cli_cmd(ctrl, "WPS_AP_PIN", 1, argc, argv);
959 static int wpa_cli_cmd_wps_er_start(struct wpa_ctrl *ctrl, int argc,
962 return wpa_cli_cmd(ctrl, "WPS_ER_START", 0, argc, argv);
966 static int wpa_cli_cmd_wps_er_stop(struct wpa_ctrl *ctrl, int argc,
974 static int wpa_cli_cmd_wps_er_pin(struct wpa_ctrl *ctrl, int argc,
977 if (argc < 2) {
986 return wpa_cli_cmd(ctrl, "WPS_ER_PIN", 2, argc, argv);
990 static int wpa_cli_cmd_wps_er_pbc(struct wpa_ctrl *ctrl, int argc,
993 return wpa_cli_cmd(ctrl, "WPS_ER_PBC", 1, argc, argv);
997 static int wpa_cli_cmd_wps_er_learn(struct wpa_ctrl *ctrl, int argc,
1000 if (argc != 2) {
1007 return wpa_cli_cmd(ctrl, "WPS_ER_LEARN", 2, argc, argv);
1011 static int wpa_cli_cmd_wps_er_set_config(struct wpa_ctrl *ctrl, int argc,
1014 if (argc != 2) {
1022 return wpa_cli_cmd(ctrl, "WPS_ER_SET_CONFIG", 2, argc, argv);
1026 static int wpa_cli_cmd_wps_er_config(struct wpa_ctrl *ctrl, int argc,
1032 if (argc == 5 || argc == 6) {
1045 if (argc == 6) {
1078 static int wpa_cli_cmd_wps_er_nfc_config_token(struct wpa_ctrl *ctrl, int argc,
1081 if (argc != 2) {
1089 return wpa_cli_cmd(ctrl, "WPS_ER_NFC_CONFIG_TOKEN", 2, argc, argv);
1094 static int wpa_cli_cmd_ibss_rsn(struct wpa_ctrl *ctrl, int argc, char *argv[])
1096 return wpa_cli_cmd(ctrl, "IBSS_RSN", 1, argc, argv);
1100 static int wpa_cli_cmd_level(struct wpa_ctrl *ctrl, int argc, char *argv[])
1102 return wpa_cli_cmd(ctrl, "LEVEL", 1, argc, argv);
1106 static int wpa_cli_cmd_identity(struct wpa_ctrl *ctrl, int argc, char *argv[])
1111 if (argc < 2) {
1126 for (i = 2; i < argc; i++) {
1139 static int wpa_cli_cmd_password(struct wpa_ctrl *ctrl, int argc, char *argv[])
1144 if (argc < 2) {
1159 for (i = 2; i < argc; i++) {
1172 static int wpa_cli_cmd_new_password(struct wpa_ctrl *ctrl, int argc,
1178 if (argc < 2) {
1193 for (i = 2; i < argc; i++) {
1206 static int wpa_cli_cmd_pin(struct wpa_ctrl *ctrl, int argc, char *argv[])
1211 if (argc < 2) {
1226 for (i = 2; i < argc; i++) {
1238 static int wpa_cli_cmd_otp(struct wpa_ctrl *ctrl, int argc, char *argv[])
1243 if (argc < 2) {
1258 for (i = 2; i < argc; i++) {
1271 static int wpa_cli_cmd_passphrase(struct wpa_ctrl *ctrl, int argc,
1277 if (argc < 2) {
1292 for (i = 2; i < argc; i++) {
1305 static int wpa_cli_cmd_bssid(struct wpa_ctrl *ctrl, int argc, char *argv[])
1307 if (argc < 2) {
1313 return wpa_cli_cmd(ctrl, "BSSID", 2, argc, argv);
1317 static int wpa_cli_cmd_blacklist(struct wpa_ctrl *ctrl, int argc, char *argv[])
1319 return wpa_cli_cmd(ctrl, "BLACKLIST", 0, argc, argv);
1323 static int wpa_cli_cmd_log_level(struct wpa_ctrl *ctrl, int argc, char *argv[])
1325 return wpa_cli_cmd(ctrl, "LOG_LEVEL", 0, argc, argv);
1329 static int wpa_cli_cmd_list_networks(struct wpa_ctrl *ctrl, int argc,
1336 static int wpa_cli_cmd_select_network(struct wpa_ctrl *ctrl, int argc,
1339 return wpa_cli_cmd(ctrl, "SELECT_NETWORK", 1, argc, argv);
1343 static int wpa_cli_cmd_enable_network(struct wpa_ctrl *ctrl, int argc,
1346 return wpa_cli_cmd(ctrl, "ENABLE_NETWORK", 1, argc, argv);
1350 static int wpa_cli_cmd_disable_network(struct wpa_ctrl *ctrl, int argc,
1353 return wpa_cli_cmd(ctrl, "DISABLE_NETWORK", 1, argc, argv);
1357 static int wpa_cli_cmd_add_network(struct wpa_ctrl *ctrl, int argc,
1364 static int wpa_cli_cmd_remove_network(struct wpa_ctrl *ctrl, int argc,
1367 return wpa_cli_cmd(ctrl, "REMOVE_NETWORK", 1, argc, argv);
1392 argc,
1395 if (argc == 0) {
1400 if (argc < 3) {
1406 return wpa_cli_cmd(ctrl, "SET_NETWORK", 3, argc, argv);
1410 static int wpa_cli_cmd_get_network(struct wpa_ctrl *ctrl, int argc,
1413 if (argc == 0) {
1418 if (argc != 2) {
1424 return wpa_cli_cmd(ctrl, "GET_NETWORK", 2, argc, argv);
1428 static int wpa_cli_cmd_list_creds(struct wpa_ctrl *ctrl, int argc,
1435 static int wpa_cli_cmd_add_cred(struct wpa_ctrl *ctrl, int argc, char *argv[])
1441 static int wpa_cli_cmd_remove_cred(struct wpa_ctrl *ctrl, int argc,
1444 return wpa_cli_cmd(ctrl, "REMOVE_CRED", 1, argc, argv);
1448 static int wpa_cli_cmd_set_cred(struct wpa_ctrl *ctrl, int argc, char *argv[])
1450 if (argc != 3) {
1456 return wpa_cli_cmd(ctrl, "SET_CRED", 3, argc, argv);
1460 static int wpa_cli_cmd_disconnect(struct wpa_ctrl *ctrl, int argc,
1467 static int wpa_cli_cmd_reconnect(struct wpa_ctrl *ctrl, int argc,
1474 static int wpa_cli_cmd_save_config(struct wpa_ctrl *ctrl, int argc,
1481 static int wpa_cli_cmd_scan(struct wpa_ctrl *ctrl, int argc, char *argv[])
1483 return wpa_cli_cmd(ctrl, "SCAN", 0, argc, argv);
1487 static int wpa_cli_cmd_scan_results(struct wpa_ctrl *ctrl, int argc,
1494 static int wpa_cli_cmd_bss(struct wpa_ctrl *ctrl, int argc, char *argv[])
1496 return wpa_cli_cmd(ctrl, "BSS", 1, argc, argv);
1515 static int wpa_cli_cmd_get_capability(struct wpa_ctrl *ctrl, int argc,
1518 if (argc < 1 || argc > 2) {
1524 if ((argc == 2) && os_strcmp(argv[1], "strict") != 0) {
1530 return wpa_cli_cmd(ctrl, "GET_CAPABILITY", 1, argc, argv);
1541 static int wpa_cli_cmd_interface(struct wpa_ctrl *ctrl, int argc, char *argv[])
1543 if (argc < 1) {
1562 static int wpa_cli_cmd_reconfigure(struct wpa_ctrl *ctrl, int argc,
1569 static int wpa_cli_cmd_terminate(struct wpa_ctrl *ctrl, int argc,
1576 static int wpa_cli_cmd_interface_add(struct wpa_ctrl *ctrl, int argc,
1582 if (argc < 1) {
1597 argc > 1 ? argv[1] : "", argc > 2 ? argv[2] : "",
1598 argc > 3 ? argv[3] : "", argc > 4 ? argv[4] : "",
1599 argc > 5 ? argv[5] : "");
1607 static int wpa_cli_cmd_interface_remove(struct wpa_ctrl *ctrl, int argc,
1610 return wpa_cli_cmd(ctrl, "INTERFACE_REMOVE", 1, argc, argv);
1614 static int wpa_cli_cmd_interface_list(struct wpa_ctrl *ctrl, int argc,
1622 static int wpa_cli_cmd_sta(struct wpa_ctrl *ctrl, int argc, char *argv[])
1624 return wpa_cli_cmd(ctrl, "STA", 1, argc, argv);
1664 static int wpa_cli_cmd_all_sta(struct wpa_ctrl *ctrl, int argc, char *argv[])
1678 static int wpa_cli_cmd_deauthenticate(struct wpa_ctrl *ctrl, int argc,
1681 return wpa_cli_cmd(ctrl, "DEAUTHENTICATE", 1, argc, argv);
1685 static int wpa_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc,
1688 return wpa_cli_cmd(ctrl, "DISASSOCIATE", 1, argc, argv);
1693 static int wpa_cli_cmd_suspend(struct wpa_ctrl *ctrl, int argc, char *argv[])
1699 static int wpa_cli_cmd_resume(struct wpa_ctrl *ctrl, int argc, char *argv[])
1705 static int wpa_cli_cmd_drop_sa(struct wpa_ctrl *ctrl, int argc, char *argv[])
1711 static int wpa_cli_cmd_roam(struct wpa_ctrl *ctrl, int argc, char *argv[])
1713 return wpa_cli_cmd(ctrl, "ROAM", 1, argc, argv);
1719 static int wpa_cli_cmd_p2p_find(struct wpa_ctrl *ctrl, int argc, char *argv[])
1721 return wpa_cli_cmd(ctrl, "P2P_FIND", 0, argc, argv);
1754 static int wpa_cli_cmd_p2p_stop_find(struct wpa_ctrl *ctrl, int argc,
1761 static int wpa_cli_cmd_p2p_connect(struct wpa_ctrl *ctrl, int argc,
1764 return wpa_cli_cmd(ctrl, "P2P_CONNECT", 2, argc, argv);
1783 static int wpa_cli_cmd_p2p_listen(struct wpa_ctrl *ctrl, int argc,
1786 return wpa_cli_cmd(ctrl, "P2P_LISTEN", 0, argc, argv);
1790 static int wpa_cli_cmd_p2p_group_remove(struct wpa_ctrl *ctrl, int argc,
1793 return wpa_cli_cmd(ctrl, "P2P_GROUP_REMOVE", 1, argc, argv);
1812 static int wpa_cli_cmd_p2p_group_add(struct wpa_ctrl *ctrl, int argc,
1815 return wpa_cli_cmd(ctrl, "P2P_GROUP_ADD", 0, argc, argv);
1819 static int wpa_cli_cmd_p2p_prov_disc(struct wpa_ctrl *ctrl, int argc,
1822 if (argc != 2 && argc != 3) {
1829 return wpa_cli_cmd(ctrl, "P2P_PROV_DISC", 2, argc, argv);
1833 static int wpa_cli_cmd_p2p_get_passphrase(struct wpa_ctrl *ctrl, int argc,
1840 static int wpa_cli_cmd_p2p_serv_disc_req(struct wpa_ctrl *ctrl, int argc,
1845 if (argc != 2 && argc != 4) {
1853 if (write_cmd(cmd, sizeof(cmd), "P2P_SERV_DISC_REQ", argc, argv) < 0)
1860 int argc, char *argv[])
1862 return wpa_cli_cmd(ctrl, "P2P_SERV_DISC_CANCEL_REQ", 1, argc, argv);
1866 static int wpa_cli_cmd_p2p_serv_disc_resp(struct wpa_ctrl *ctrl, int argc,
1872 if (argc != 4) {
1887 static int wpa_cli_cmd_p2p_service_update(struct wpa_ctrl *ctrl, int argc,
1895 int argc, char *argv[])
1897 return wpa_cli_cmd(ctrl, "P2P_SERV_DISC_EXTERNAL", 1, argc, argv);
1901 static int wpa_cli_cmd_p2p_service_flush(struct wpa_ctrl *ctrl, int argc,
1908 static int wpa_cli_cmd_p2p_service_add(struct wpa_ctrl *ctrl, int argc,
1914 if (argc != 3 && argc != 4) {
1920 if (argc == 4)
1935 static int wpa_cli_cmd_p2p_service_del(struct wpa_ctrl *ctrl, int argc,
1941 if (argc != 2 && argc != 3) {
1947 if (argc == 3)
1963 int argc, char *argv[])
1965 return wpa_cli_cmd(ctrl, "P2P_REJECT", 1, argc, argv);
1970 int argc, char *argv[])
1972 return wpa_cli_cmd(ctrl, "P2P_INVITE", 1, argc, argv);
1976 static int wpa_cli_cmd_p2p_peer(struct wpa_ctrl *ctrl, int argc, char *argv[])
1978 return wpa_cli_cmd(ctrl, "P2P_PEER", 1, argc, argv);
2033 static int wpa_cli_cmd_p2p_peers(struct wpa_ctrl *ctrl, int argc, char *argv[])
2038 discovered = argc > 0 && os_strcmp(argv[0], "discovered") == 0;
2052 static int wpa_cli_cmd_p2p_set(struct wpa_ctrl *ctrl, int argc, char *argv[])
2054 return wpa_cli_cmd(ctrl, "P2P_SET", 2, argc, argv);
2102 static int wpa_cli_cmd_p2p_flush(struct wpa_ctrl *ctrl, int argc, char *argv[])
2108 static int wpa_cli_cmd_p2p_cancel(struct wpa_ctrl *ctrl, int argc,
2115 static int wpa_cli_cmd_p2p_unauthorize(struct wpa_ctrl *ctrl, int argc,
2118 return wpa_cli_cmd(ctrl, "P2P_UNAUTHORIZE", 1, argc, argv);
2122 static int wpa_cli_cmd_p2p_presence_req(struct wpa_ctrl *ctrl, int argc,
2125 if (argc != 0 && argc != 2 && argc != 4) {
2133 return wpa_cli_cmd(ctrl, "P2P_PRESENCE_REQ", 0, argc, argv);
2137 static int wpa_cli_cmd_p2p_ext_listen(struct wpa_ctrl *ctrl, int argc,
2140 if (argc != 0 && argc != 2) {
2149 return wpa_cli_cmd(ctrl, "P2P_EXT_LISTEN", 0, argc, argv);
2153 static int wpa_cli_cmd_p2p_remove_client(struct wpa_ctrl *ctrl, int argc,
2156 return wpa_cli_cmd(ctrl, "P2P_REMOVE_CLIENT", 1, argc, argv);
2163 static int wpa_cli_cmd_wfd_subelem_set(struct wpa_ctrl *ctrl, int argc,
2169 if (argc != 1 && argc != 2) {
2176 argv[0], argc > 1 ? argv[1] : "");
2184 static int wpa_cli_cmd_wfd_subelem_get(struct wpa_ctrl *ctrl, int argc,
2190 if (argc != 1) {
2207 static int wpa_cli_cmd_fetch_anqp(struct wpa_ctrl *ctrl, int argc,
2214 static int wpa_cli_cmd_stop_fetch_anqp(struct wpa_ctrl *ctrl, int argc,
2221 static int wpa_cli_cmd_interworking_select(struct wpa_ctrl *ctrl, int argc,
2224 return wpa_cli_cmd(ctrl, "INTERWORKING_SELECT", 0, argc, argv);
2228 static int wpa_cli_cmd_interworking_connect(struct wpa_ctrl *ctrl, int argc,
2231 return wpa_cli_cmd(ctrl, "INTERWORKING_CONNECT", 1, argc, argv);
2235 static int wpa_cli_cmd_anqp_get(struct wpa_ctrl *ctrl, int argc, char *argv[])
2237 return wpa_cli_cmd(ctrl, "ANQP_GET", 2, argc, argv);
2241 static int wpa_cli_cmd_gas_request(struct wpa_ctrl *ctrl, int argc,
2244 return wpa_cli_cmd(ctrl, "GAS_REQUEST", 2, argc, argv);
2248 static int wpa_cli_cmd_gas_response_get(struct wpa_ctrl *ctrl, int argc,
2251 return wpa_cli_cmd(ctrl, "GAS_RESPONSE_GET", 2, argc, argv);
2258 static int wpa_cli_cmd_hs20_anqp_get(struct wpa_ctrl *ctrl, int argc,
2261 return wpa_cli_cmd(ctrl, "HS20_ANQP_GET", 2, argc, argv);
2265 static int wpa_cli_cmd_get_nai_home_realm_list(struct wpa_ctrl *ctrl, int argc,
2270 if (argc == 0) {
2277 argc, argv) < 0)
2286 static int wpa_cli_cmd_sta_autoconnect(struct wpa_ctrl *ctrl, int argc,
2289 return wpa_cli_cmd(ctrl, "STA_AUTOCONNECT", 1, argc, argv);
2293 static int wpa_cli_cmd_tdls_discover(struct wpa_ctrl *ctrl, int argc,
2296 return wpa_cli_cmd(ctrl, "TDLS_DISCOVER", 1, argc, argv);
2300 static int wpa_cli_cmd_tdls_setup(struct wpa_ctrl *ctrl, int argc,
2303 return wpa_cli_cmd(ctrl, "TDLS_SETUP", 1, argc, argv);
2307 static int wpa_cli_cmd_tdls_teardown(struct wpa_ctrl *ctrl, int argc,
2310 return wpa_cli_cmd(ctrl, "TDLS_TEARDOWN", 1, argc, argv);
2314 static int wpa_cli_cmd_signal_poll(struct wpa_ctrl *ctrl, int argc,
2321 static int wpa_cli_cmd_pktcnt_poll(struct wpa_ctrl *ctrl, int argc,
2328 static int wpa_cli_cmd_reauthenticate(struct wpa_ctrl *ctrl, int argc,
2337 static int wpa_cli_cmd_autoscan(struct wpa_ctrl *ctrl, int argc, char *argv[])
2339 if (argc == 0)
2342 return wpa_cli_cmd(ctrl, "AUTOSCAN", 0, argc, argv);
2350 static int wpa_cli_cmd_wnm_sleep(struct wpa_ctrl *ctrl, int argc, char *argv[])
2352 return wpa_cli_cmd(ctrl, "WNM_SLEEP", 0, argc, argv);
2356 static int wpa_cli_cmd_wnm_bss_query(struct wpa_ctrl *ctrl, int argc, char *argv[])
2358 return wpa_cli_cmd(ctrl, "WNM_BSS_QUERY", 1, argc, argv);
2364 static int wpa_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[])
2366 if (argc == 0)
2368 return wpa_cli_cmd(ctrl, argv[0], 0, argc - 1, &argv[1]);
2373 static int wpa_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[])
2379 if (argc < 1) {
2385 for (i=1; i < argc; i++)
2394 static int wpa_cli_cmd_flush(struct wpa_ctrl *ctrl, int argc, char *argv[])
2407 int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
3003 static int wpa_request(struct wpa_ctrl *ctrl, int argc, char *argv[])
3009 if (argc > 1 && os_strncasecmp(argv[0], "IFNAME=", 7) == 0) {
3012 argc--;
3016 if (argc == 0)
3051 ret = match->handler(ctrl, argc - 1, &argv[1]);
3334 int argc = 0;
3342 argv[argc] = pos;
3343 argc++;
3344 if (argc == max_args)
3357 return argc;
3383 int argc;
3384 argc = tokenize_cmd(cmd, argv);
3385 if (argc)
3386 wpa_request(ctrl_conn, argc, argv);
3663 int main(int argc, char *argv[])
3674 c = getopt(argc, argv, "a:Bg:G:hi:p:P:v");
3712 interactive = (argc == optind) && (action_file == NULL);
3784 ret = wpa_request(ctrl_conn, argc - optind,
3796 int main(int argc, char *argv[])