Lines Matching refs:argc

264 		       int argc, char *argv[])  in wpa_cli_cmd()  argument
267 if (argc < min_args) { in wpa_cli_cmd()
273 if (write_cmd(buf, sizeof(buf), cmd, argc, argv) < 0) in wpa_cli_cmd()
279 static int wpa_cli_cmd_ifname(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ifname() argument
285 static int wpa_cli_cmd_status(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_status() argument
287 if (argc > 0 && os_strcmp(argv[0], "verbose") == 0) in wpa_cli_cmd_status()
289 if (argc > 0 && os_strcmp(argv[0], "wps") == 0) in wpa_cli_cmd_status()
291 if (argc > 0 && os_strcmp(argv[0], "driver") == 0) in wpa_cli_cmd_status()
294 if (argc > 0 && os_strcmp(argv[0], "no_events") == 0) in wpa_cli_cmd_status()
301 static int wpa_cli_cmd_ping(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ping() argument
307 static int wpa_cli_cmd_relog(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_relog() argument
313 static int wpa_cli_cmd_note(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_note() argument
315 return wpa_cli_cmd(ctrl, "NOTE", 1, argc, argv); in wpa_cli_cmd_note()
319 static int wpa_cli_cmd_mib(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_mib() argument
325 static int wpa_cli_cmd_pmksa(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pmksa() argument
331 static int wpa_cli_cmd_pmksa_flush(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_pmksa_flush() argument
340 static int wpa_cli_cmd_pmksa_get(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pmksa_get() argument
342 return wpa_cli_cmd(ctrl, "PMKSA_GET", 1, argc, argv); in wpa_cli_cmd_pmksa_get()
346 static int wpa_cli_cmd_pmksa_add(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pmksa_add() argument
348 return wpa_cli_cmd(ctrl, "PMKSA_ADD", 8, argc, argv); in wpa_cli_cmd_pmksa_add()
354 static int wpa_cli_mesh_cmd_pmksa_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_mesh_cmd_pmksa_get() argument
357 return wpa_cli_cmd(ctrl, "MESH_PMKSA_GET", 1, argc, argv); in wpa_cli_mesh_cmd_pmksa_get()
361 static int wpa_cli_mesh_cmd_pmksa_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_mesh_cmd_pmksa_add() argument
364 return wpa_cli_cmd(ctrl, "MESH_PMKSA_ADD", 4, argc, argv); in wpa_cli_mesh_cmd_pmksa_add()
371 static int wpa_cli_cmd_help(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_help() argument
373 print_help(argc > 0 ? argv[0] : NULL); in wpa_cli_cmd_help()
393 static int wpa_cli_cmd_license(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_license() argument
400 static int wpa_cli_cmd_quit(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_quit() argument
409 static int wpa_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_set() argument
414 if (argc == 1) { in wpa_cli_cmd_set()
423 return wpa_cli_cmd(ctrl, "SET", 2, argc, argv); in wpa_cli_cmd_set()
517 static int wpa_cli_cmd_dump(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_dump() argument
523 static int wpa_cli_cmd_driver_flags(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_driver_flags() argument
530 static int wpa_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_get() argument
532 return wpa_cli_cmd(ctrl, "GET", 1, argc, argv); in wpa_cli_cmd_get()
604 static int wpa_cli_cmd_logoff(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_logoff() argument
610 static int wpa_cli_cmd_logon(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_logon() argument
616 static int wpa_cli_cmd_reassociate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reassociate() argument
623 static int wpa_cli_cmd_reattach(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_reattach() argument
629 static int wpa_cli_cmd_preauthenticate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_preauthenticate() argument
632 return wpa_cli_cmd(ctrl, "PREAUTH", 1, argc, argv); in wpa_cli_cmd_preauthenticate()
636 static int wpa_cli_cmd_ap_scan(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ap_scan() argument
638 return wpa_cli_cmd(ctrl, "AP_SCAN", 1, argc, argv); in wpa_cli_cmd_ap_scan()
642 static int wpa_cli_cmd_scan_interval(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_scan_interval() argument
645 return wpa_cli_cmd(ctrl, "SCAN_INTERVAL", 1, argc, argv); in wpa_cli_cmd_scan_interval()
649 static int wpa_cli_cmd_bss_expire_age(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_bss_expire_age() argument
652 return wpa_cli_cmd(ctrl, "BSS_EXPIRE_AGE", 1, argc, argv); in wpa_cli_cmd_bss_expire_age()
656 static int wpa_cli_cmd_bss_expire_count(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_bss_expire_count() argument
659 return wpa_cli_cmd(ctrl, "BSS_EXPIRE_COUNT", 1, argc, argv); in wpa_cli_cmd_bss_expire_count()
663 static int wpa_cli_cmd_bss_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_bss_flush() argument
668 if (argc < 1) in wpa_cli_cmd_bss_flush()
680 static int wpa_cli_cmd_stkstart(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_stkstart() argument
683 return wpa_cli_cmd(ctrl, "STKSTART", 1, argc, argv); in wpa_cli_cmd_stkstart()
687 static int wpa_cli_cmd_ft_ds(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ft_ds() argument
689 return wpa_cli_cmd(ctrl, "FT_DS", 1, argc, argv); in wpa_cli_cmd_ft_ds()
693 static int wpa_cli_cmd_wps_pbc(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_pbc() argument
695 return wpa_cli_cmd(ctrl, "WPS_PBC", 0, argc, argv); in wpa_cli_cmd_wps_pbc()
699 static int wpa_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_pin() argument
701 if (argc == 0) { in wpa_cli_cmd_wps_pin()
709 return wpa_cli_cmd(ctrl, "WPS_PIN", 1, argc, argv); in wpa_cli_cmd_wps_pin()
713 static int wpa_cli_cmd_wps_check_pin(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_check_pin() argument
716 return wpa_cli_cmd(ctrl, "WPS_CHECK_PIN", 1, argc, argv); in wpa_cli_cmd_wps_check_pin()
720 static int wpa_cli_cmd_wps_cancel(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_cancel() argument
729 static int wpa_cli_cmd_wps_nfc(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_nfc() argument
731 return wpa_cli_cmd(ctrl, "WPS_NFC", 0, argc, argv); in wpa_cli_cmd_wps_nfc()
735 static int wpa_cli_cmd_wps_nfc_config_token(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_nfc_config_token() argument
738 return wpa_cli_cmd(ctrl, "WPS_NFC_CONFIG_TOKEN", 1, argc, argv); in wpa_cli_cmd_wps_nfc_config_token()
742 static int wpa_cli_cmd_wps_nfc_token(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_nfc_token() argument
745 return wpa_cli_cmd(ctrl, "WPS_NFC_TOKEN", 1, argc, argv); in wpa_cli_cmd_wps_nfc_token()
749 static int wpa_cli_cmd_wps_nfc_tag_read(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_nfc_tag_read() argument
756 if (argc != 1) { in wpa_cli_cmd_wps_nfc_tag_read()
775 static int wpa_cli_cmd_nfc_get_handover_req(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_nfc_get_handover_req() argument
778 return wpa_cli_cmd(ctrl, "NFC_GET_HANDOVER_REQ", 2, argc, argv); in wpa_cli_cmd_nfc_get_handover_req()
782 static int wpa_cli_cmd_nfc_get_handover_sel(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_nfc_get_handover_sel() argument
785 return wpa_cli_cmd(ctrl, "NFC_GET_HANDOVER_SEL", 2, argc, argv); in wpa_cli_cmd_nfc_get_handover_sel()
789 static int wpa_cli_cmd_nfc_report_handover(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_nfc_report_handover() argument
792 return wpa_cli_cmd(ctrl, "NFC_REPORT_HANDOVER", 4, argc, argv); in wpa_cli_cmd_nfc_report_handover()
798 static int wpa_cli_cmd_wps_reg(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_reg() argument
803 if (argc == 2) in wpa_cli_cmd_wps_reg()
806 else if (argc == 5 || argc == 6) { in wpa_cli_cmd_wps_reg()
819 if (argc == 6) { in wpa_cli_cmd_wps_reg()
855 static int wpa_cli_cmd_wps_ap_pin(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_ap_pin() argument
858 return wpa_cli_cmd(ctrl, "WPS_AP_PIN", 1, argc, argv); in wpa_cli_cmd_wps_ap_pin()
862 static int wpa_cli_cmd_wps_er_start(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_start() argument
865 return wpa_cli_cmd(ctrl, "WPS_ER_START", 0, argc, argv); in wpa_cli_cmd_wps_er_start()
869 static int wpa_cli_cmd_wps_er_stop(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_stop() argument
877 static int wpa_cli_cmd_wps_er_pin(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_pin() argument
880 if (argc < 2) { in wpa_cli_cmd_wps_er_pin()
889 return wpa_cli_cmd(ctrl, "WPS_ER_PIN", 2, argc, argv); in wpa_cli_cmd_wps_er_pin()
893 static int wpa_cli_cmd_wps_er_pbc(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_pbc() argument
896 return wpa_cli_cmd(ctrl, "WPS_ER_PBC", 1, argc, argv); in wpa_cli_cmd_wps_er_pbc()
900 static int wpa_cli_cmd_wps_er_learn(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_learn() argument
903 if (argc != 2) { in wpa_cli_cmd_wps_er_learn()
910 return wpa_cli_cmd(ctrl, "WPS_ER_LEARN", 2, argc, argv); in wpa_cli_cmd_wps_er_learn()
914 static int wpa_cli_cmd_wps_er_set_config(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_set_config() argument
917 if (argc != 2) { in wpa_cli_cmd_wps_er_set_config()
925 return wpa_cli_cmd(ctrl, "WPS_ER_SET_CONFIG", 2, argc, argv); in wpa_cli_cmd_wps_er_set_config()
929 static int wpa_cli_cmd_wps_er_config(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_config() argument
935 if (argc == 5 || argc == 6) { in wpa_cli_cmd_wps_er_config()
948 if (argc == 6) { in wpa_cli_cmd_wps_er_config()
981 static int wpa_cli_cmd_wps_er_nfc_config_token(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_nfc_config_token() argument
984 if (argc != 2) { in wpa_cli_cmd_wps_er_nfc_config_token()
992 return wpa_cli_cmd(ctrl, "WPS_ER_NFC_CONFIG_TOKEN", 2, argc, argv); in wpa_cli_cmd_wps_er_nfc_config_token()
997 static int wpa_cli_cmd_ibss_rsn(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ibss_rsn() argument
999 return wpa_cli_cmd(ctrl, "IBSS_RSN", 1, argc, argv); in wpa_cli_cmd_ibss_rsn()
1003 static int wpa_cli_cmd_level(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_level() argument
1005 return wpa_cli_cmd(ctrl, "LEVEL", 1, argc, argv); in wpa_cli_cmd_level()
1009 static int wpa_cli_cmd_identity(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_identity() argument
1014 if (argc < 2) { in wpa_cli_cmd_identity()
1029 for (i = 2; i < argc; i++) { in wpa_cli_cmd_identity()
1042 static int wpa_cli_cmd_password(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_password() argument
1047 if (argc < 2) { in wpa_cli_cmd_password()
1062 for (i = 2; i < argc; i++) { in wpa_cli_cmd_password()
1075 static int wpa_cli_cmd_new_password(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_new_password() argument
1081 if (argc < 2) { in wpa_cli_cmd_new_password()
1096 for (i = 2; i < argc; i++) { in wpa_cli_cmd_new_password()
1109 static int wpa_cli_cmd_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pin() argument
1114 if (argc < 2) { in wpa_cli_cmd_pin()
1129 for (i = 2; i < argc; i++) { in wpa_cli_cmd_pin()
1141 static int wpa_cli_cmd_otp(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_otp() argument
1146 if (argc < 2) { in wpa_cli_cmd_otp()
1161 for (i = 2; i < argc; i++) { in wpa_cli_cmd_otp()
1174 static int wpa_cli_cmd_sim(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_sim() argument
1179 if (argc < 2) { in wpa_cli_cmd_sim()
1194 for (i = 2; i < argc; i++) { in wpa_cli_cmd_sim()
1206 static int wpa_cli_cmd_passphrase(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_passphrase() argument
1212 if (argc < 2) { in wpa_cli_cmd_passphrase()
1227 for (i = 2; i < argc; i++) { in wpa_cli_cmd_passphrase()
1240 static int wpa_cli_cmd_bssid(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_bssid() argument
1242 if (argc < 2) { in wpa_cli_cmd_bssid()
1248 return wpa_cli_cmd(ctrl, "BSSID", 2, argc, argv); in wpa_cli_cmd_bssid()
1252 static int wpa_cli_cmd_blacklist(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_blacklist() argument
1254 return wpa_cli_cmd(ctrl, "BLACKLIST", 0, argc, argv); in wpa_cli_cmd_blacklist()
1258 static int wpa_cli_cmd_log_level(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_log_level() argument
1260 return wpa_cli_cmd(ctrl, "LOG_LEVEL", 0, argc, argv); in wpa_cli_cmd_log_level()
1264 static int wpa_cli_cmd_list_networks(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_list_networks() argument
1271 static int wpa_cli_cmd_select_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_select_network() argument
1274 return wpa_cli_cmd(ctrl, "SELECT_NETWORK", 1, argc, argv); in wpa_cli_cmd_select_network()
1278 static int wpa_cli_cmd_enable_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_enable_network() argument
1281 return wpa_cli_cmd(ctrl, "ENABLE_NETWORK", 1, argc, argv); in wpa_cli_cmd_enable_network()
1285 static int wpa_cli_cmd_disable_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_disable_network() argument
1288 return wpa_cli_cmd(ctrl, "DISABLE_NETWORK", 1, argc, argv); in wpa_cli_cmd_disable_network()
1292 static int wpa_cli_cmd_add_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_add_network() argument
1302 static int wpa_cli_cmd_remove_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_remove_network() argument
1305 int res = wpa_cli_cmd(ctrl, "REMOVE_NETWORK", 1, argc, argv); in wpa_cli_cmd_remove_network()
1333 static int wpa_cli_cmd_set_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_set_network() argument
1336 if (argc == 0) { in wpa_cli_cmd_set_network()
1341 if (argc < 3) { in wpa_cli_cmd_set_network()
1347 return wpa_cli_cmd(ctrl, "SET_NETWORK", 3, argc, argv); in wpa_cli_cmd_set_network()
1351 static int wpa_cli_cmd_get_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_network() argument
1354 if (argc == 0) { in wpa_cli_cmd_get_network()
1359 if (argc != 2) { in wpa_cli_cmd_get_network()
1365 return wpa_cli_cmd(ctrl, "GET_NETWORK", 2, argc, argv); in wpa_cli_cmd_get_network()
1471 static int wpa_cli_cmd_dup_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dup_network() argument
1474 if (argc == 0) { in wpa_cli_cmd_dup_network()
1479 if (argc < 3) { in wpa_cli_cmd_dup_network()
1485 return wpa_cli_cmd(ctrl, "DUP_NETWORK", 3, argc, argv); in wpa_cli_cmd_dup_network()
1514 static int wpa_cli_cmd_list_creds(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_list_creds() argument
1521 static int wpa_cli_cmd_add_cred(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_add_cred() argument
1527 static int wpa_cli_cmd_remove_cred(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_remove_cred() argument
1530 return wpa_cli_cmd(ctrl, "REMOVE_CRED", 1, argc, argv); in wpa_cli_cmd_remove_cred()
1534 static int wpa_cli_cmd_set_cred(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_set_cred() argument
1536 if (argc != 3) { in wpa_cli_cmd_set_cred()
1542 return wpa_cli_cmd(ctrl, "SET_CRED", 3, argc, argv); in wpa_cli_cmd_set_cred()
1546 static int wpa_cli_cmd_get_cred(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_get_cred() argument
1548 if (argc != 2) { in wpa_cli_cmd_get_cred()
1554 return wpa_cli_cmd(ctrl, "GET_CRED", 2, argc, argv); in wpa_cli_cmd_get_cred()
1558 static int wpa_cli_cmd_disconnect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_disconnect() argument
1565 static int wpa_cli_cmd_reconnect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reconnect() argument
1572 static int wpa_cli_cmd_save_config(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_save_config() argument
1579 static int wpa_cli_cmd_scan(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_scan() argument
1581 return wpa_cli_cmd(ctrl, "SCAN", 0, argc, argv); in wpa_cli_cmd_scan()
1585 static int wpa_cli_cmd_scan_results(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_scan_results() argument
1592 static int wpa_cli_cmd_abort_scan(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_abort_scan() argument
1599 static int wpa_cli_cmd_bss(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_bss() argument
1601 return wpa_cli_cmd(ctrl, "BSS", 1, argc, argv); in wpa_cli_cmd_bss()
1620 static int wpa_cli_cmd_get_capability(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_capability() argument
1623 if (argc < 1 || argc > 2) { in wpa_cli_cmd_get_capability()
1629 if ((argc == 2) && os_strcmp(argv[1], "strict") != 0) { in wpa_cli_cmd_get_capability()
1635 return wpa_cli_cmd(ctrl, "GET_CAPABILITY", 1, argc, argv); in wpa_cli_cmd_get_capability()
1688 static int wpa_cli_cmd_interface(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_interface() argument
1690 if (argc < 1) { in wpa_cli_cmd_interface()
1713 static int wpa_cli_cmd_reconfigure(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reconfigure() argument
1720 static int wpa_cli_cmd_terminate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_terminate() argument
1727 static int wpa_cli_cmd_interface_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interface_add() argument
1733 if (argc < 1) { in wpa_cli_cmd_interface_add()
1748 argc > 1 ? argv[1] : "", argc > 2 ? argv[2] : "", in wpa_cli_cmd_interface_add()
1749 argc > 3 ? argv[3] : "", argc > 4 ? argv[4] : "", in wpa_cli_cmd_interface_add()
1750 argc > 5 ? argv[5] : "", argc > 6 ? argv[6] : "", in wpa_cli_cmd_interface_add()
1751 argc > 7 ? argv[7] : ""); in wpa_cli_cmd_interface_add()
1759 static int wpa_cli_cmd_interface_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interface_remove() argument
1762 return wpa_cli_cmd(ctrl, "INTERFACE_REMOVE", 1, argc, argv); in wpa_cli_cmd_interface_remove()
1766 static int wpa_cli_cmd_interface_list(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interface_list() argument
1774 static int wpa_cli_cmd_sta(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_sta() argument
1776 return wpa_cli_cmd(ctrl, "STA", 1, argc, argv); in wpa_cli_cmd_sta()
1838 static int wpa_cli_cmd_all_sta(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_all_sta() argument
1852 static int wpa_cli_cmd_list_sta(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_list_sta() argument
1869 static int wpa_cli_cmd_deauthenticate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_deauthenticate() argument
1872 return wpa_cli_cmd(ctrl, "DEAUTHENTICATE", 1, argc, argv); in wpa_cli_cmd_deauthenticate()
1891 static int wpa_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_disassociate() argument
1894 return wpa_cli_cmd(ctrl, "DISASSOCIATE", 1, argc, argv); in wpa_cli_cmd_disassociate()
1913 static int wpa_cli_cmd_chanswitch(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_chanswitch() argument
1916 return wpa_cli_cmd(ctrl, "CHAN_SWITCH", 2, argc, argv); in wpa_cli_cmd_chanswitch()
1922 static int wpa_cli_cmd_suspend(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_suspend() argument
1928 static int wpa_cli_cmd_resume(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_resume() argument
1935 static int wpa_cli_cmd_drop_sa(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_drop_sa() argument
1942 static int wpa_cli_cmd_roam(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_roam() argument
1944 return wpa_cli_cmd(ctrl, "ROAM", 1, argc, argv); in wpa_cli_cmd_roam()
1950 static int wpa_cli_cmd_mesh_interface_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_interface_add() argument
1953 return wpa_cli_cmd(ctrl, "MESH_INTERFACE_ADD", 0, argc, argv); in wpa_cli_cmd_mesh_interface_add()
1957 static int wpa_cli_cmd_mesh_group_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_group_add() argument
1960 return wpa_cli_cmd(ctrl, "MESH_GROUP_ADD", 1, argc, argv); in wpa_cli_cmd_mesh_group_add()
1964 static int wpa_cli_cmd_mesh_group_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_group_remove() argument
1967 return wpa_cli_cmd(ctrl, "MESH_GROUP_REMOVE", 1, argc, argv); in wpa_cli_cmd_mesh_group_remove()
1971 static int wpa_cli_cmd_mesh_peer_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_peer_remove() argument
1974 return wpa_cli_cmd(ctrl, "MESH_PEER_REMOVE", 1, argc, argv); in wpa_cli_cmd_mesh_peer_remove()
1978 static int wpa_cli_cmd_mesh_peer_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_peer_add() argument
1981 return wpa_cli_cmd(ctrl, "MESH_PEER_ADD", 1, argc, argv); in wpa_cli_cmd_mesh_peer_add()
1989 static int wpa_cli_cmd_p2p_find(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_find() argument
1991 return wpa_cli_cmd(ctrl, "P2P_FIND", 0, argc, argv); in wpa_cli_cmd_p2p_find()
2024 static int wpa_cli_cmd_p2p_stop_find(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_stop_find() argument
2031 static int wpa_cli_cmd_p2p_asp_provision(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_asp_provision() argument
2034 return wpa_cli_cmd(ctrl, "P2P_ASP_PROVISION", 3, argc, argv); in wpa_cli_cmd_p2p_asp_provision()
2038 static int wpa_cli_cmd_p2p_asp_provision_resp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_asp_provision_resp() argument
2041 return wpa_cli_cmd(ctrl, "P2P_ASP_PROVISION_RESP", 2, argc, argv); in wpa_cli_cmd_p2p_asp_provision_resp()
2045 static int wpa_cli_cmd_p2p_connect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_connect() argument
2048 return wpa_cli_cmd(ctrl, "P2P_CONNECT", 2, argc, argv); in wpa_cli_cmd_p2p_connect()
2067 static int wpa_cli_cmd_p2p_listen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_listen() argument
2070 return wpa_cli_cmd(ctrl, "P2P_LISTEN", 0, argc, argv); in wpa_cli_cmd_p2p_listen()
2074 static int wpa_cli_cmd_p2p_group_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_group_remove() argument
2077 return wpa_cli_cmd(ctrl, "P2P_GROUP_REMOVE", 1, argc, argv); in wpa_cli_cmd_p2p_group_remove()
2096 static int wpa_cli_cmd_p2p_group_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_group_add() argument
2099 return wpa_cli_cmd(ctrl, "P2P_GROUP_ADD", 0, argc, argv); in wpa_cli_cmd_p2p_group_add()
2103 static int wpa_cli_cmd_p2p_group_member(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_group_member() argument
2106 return wpa_cli_cmd(ctrl, "P2P_GROUP_MEMBER", 1, argc, argv); in wpa_cli_cmd_p2p_group_member()
2110 static int wpa_cli_cmd_p2p_prov_disc(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_prov_disc() argument
2113 if (argc != 2 && argc != 3) { in wpa_cli_cmd_p2p_prov_disc()
2120 return wpa_cli_cmd(ctrl, "P2P_PROV_DISC", 2, argc, argv); in wpa_cli_cmd_p2p_prov_disc()
2124 static int wpa_cli_cmd_p2p_get_passphrase(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_get_passphrase() argument
2131 static int wpa_cli_cmd_p2p_serv_disc_req(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_serv_disc_req() argument
2136 if (argc < 2) { in wpa_cli_cmd_p2p_serv_disc_req()
2142 if (write_cmd(cmd, sizeof(cmd), "P2P_SERV_DISC_REQ", argc, argv) < 0) in wpa_cli_cmd_p2p_serv_disc_req()
2149 int argc, char *argv[]) in wpa_cli_cmd_p2p_serv_disc_cancel_req() argument
2151 return wpa_cli_cmd(ctrl, "P2P_SERV_DISC_CANCEL_REQ", 1, argc, argv); in wpa_cli_cmd_p2p_serv_disc_cancel_req()
2155 static int wpa_cli_cmd_p2p_serv_disc_resp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_serv_disc_resp() argument
2161 if (argc != 4) { in wpa_cli_cmd_p2p_serv_disc_resp()
2176 static int wpa_cli_cmd_p2p_service_update(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_update() argument
2184 int argc, char *argv[]) in wpa_cli_cmd_p2p_serv_disc_external() argument
2186 return wpa_cli_cmd(ctrl, "P2P_SERV_DISC_EXTERNAL", 1, argc, argv); in wpa_cli_cmd_p2p_serv_disc_external()
2190 static int wpa_cli_cmd_p2p_service_flush(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_flush() argument
2197 static int wpa_cli_cmd_p2p_service_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_add() argument
2200 if (argc < 3) { in wpa_cli_cmd_p2p_service_add()
2205 return wpa_cli_cmd(ctrl, "P2P_SERVICE_ADD", 3, argc, argv); in wpa_cli_cmd_p2p_service_add()
2209 static int wpa_cli_cmd_p2p_service_rep(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_rep() argument
2212 if (argc < 5 || argc > 6) { in wpa_cli_cmd_p2p_service_rep()
2218 return wpa_cli_cmd(ctrl, "P2P_SERVICE_REP", 5, argc, argv); in wpa_cli_cmd_p2p_service_rep()
2222 static int wpa_cli_cmd_p2p_service_del(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_del() argument
2228 if (argc != 2 && argc != 3) { in wpa_cli_cmd_p2p_service_del()
2234 if (argc == 3) in wpa_cli_cmd_p2p_service_del()
2250 int argc, char *argv[]) in wpa_cli_cmd_p2p_reject() argument
2252 return wpa_cli_cmd(ctrl, "P2P_REJECT", 1, argc, argv); in wpa_cli_cmd_p2p_reject()
2257 int argc, char *argv[]) in wpa_cli_cmd_p2p_invite() argument
2259 return wpa_cli_cmd(ctrl, "P2P_INVITE", 1, argc, argv); in wpa_cli_cmd_p2p_invite()
2263 static int wpa_cli_cmd_p2p_peer(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_peer() argument
2265 return wpa_cli_cmd(ctrl, "P2P_PEER", 1, argc, argv); in wpa_cli_cmd_p2p_peer()
2320 static int wpa_cli_cmd_p2p_peers(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_peers() argument
2325 discovered = argc > 0 && os_strcmp(argv[0], "discovered") == 0; in wpa_cli_cmd_p2p_peers()
2339 static int wpa_cli_cmd_p2p_set(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_set() argument
2341 return wpa_cli_cmd(ctrl, "P2P_SET", 2, argc, argv); in wpa_cli_cmd_p2p_set()
2389 static int wpa_cli_cmd_p2p_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_flush() argument
2395 static int wpa_cli_cmd_p2p_cancel(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_cancel() argument
2402 static int wpa_cli_cmd_p2p_unauthorize(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_unauthorize() argument
2405 return wpa_cli_cmd(ctrl, "P2P_UNAUTHORIZE", 1, argc, argv); in wpa_cli_cmd_p2p_unauthorize()
2409 static int wpa_cli_cmd_p2p_presence_req(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_presence_req() argument
2412 if (argc != 0 && argc != 2 && argc != 4) { in wpa_cli_cmd_p2p_presence_req()
2420 return wpa_cli_cmd(ctrl, "P2P_PRESENCE_REQ", 0, argc, argv); in wpa_cli_cmd_p2p_presence_req()
2424 static int wpa_cli_cmd_p2p_ext_listen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_ext_listen() argument
2427 if (argc != 0 && argc != 2) { in wpa_cli_cmd_p2p_ext_listen()
2436 return wpa_cli_cmd(ctrl, "P2P_EXT_LISTEN", 0, argc, argv); in wpa_cli_cmd_p2p_ext_listen()
2440 static int wpa_cli_cmd_p2p_remove_client(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_remove_client() argument
2443 return wpa_cli_cmd(ctrl, "P2P_REMOVE_CLIENT", 1, argc, argv); in wpa_cli_cmd_p2p_remove_client()
2447 static int wpa_cli_cmd_vendor_elem_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_vendor_elem_add() argument
2450 return wpa_cli_cmd(ctrl, "VENDOR_ELEM_ADD", 2, argc, argv); in wpa_cli_cmd_vendor_elem_add()
2454 static int wpa_cli_cmd_vendor_elem_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_vendor_elem_get() argument
2457 return wpa_cli_cmd(ctrl, "VENDOR_ELEM_GET", 1, argc, argv); in wpa_cli_cmd_vendor_elem_get()
2461 static int wpa_cli_cmd_vendor_elem_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_vendor_elem_remove() argument
2464 return wpa_cli_cmd(ctrl, "VENDOR_ELEM_REMOVE", 2, argc, argv); in wpa_cli_cmd_vendor_elem_remove()
2471 static int wpa_cli_cmd_wfd_subelem_set(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wfd_subelem_set() argument
2477 if (argc != 1 && argc != 2) { in wpa_cli_cmd_wfd_subelem_set()
2484 argv[0], argc > 1 ? argv[1] : ""); in wpa_cli_cmd_wfd_subelem_set()
2492 static int wpa_cli_cmd_wfd_subelem_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wfd_subelem_get() argument
2498 if (argc != 1) { in wpa_cli_cmd_wfd_subelem_get()
2515 static int wpa_cli_cmd_fetch_anqp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_fetch_anqp() argument
2522 static int wpa_cli_cmd_stop_fetch_anqp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_stop_fetch_anqp() argument
2529 static int wpa_cli_cmd_interworking_select(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interworking_select() argument
2532 return wpa_cli_cmd(ctrl, "INTERWORKING_SELECT", 0, argc, argv); in wpa_cli_cmd_interworking_select()
2536 static int wpa_cli_cmd_interworking_connect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interworking_connect() argument
2539 return wpa_cli_cmd(ctrl, "INTERWORKING_CONNECT", 1, argc, argv); in wpa_cli_cmd_interworking_connect()
2543 static int wpa_cli_cmd_interworking_add_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interworking_add_network() argument
2546 return wpa_cli_cmd(ctrl, "INTERWORKING_ADD_NETWORK", 1, argc, argv); in wpa_cli_cmd_interworking_add_network()
2550 static int wpa_cli_cmd_anqp_get(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_anqp_get() argument
2552 return wpa_cli_cmd(ctrl, "ANQP_GET", 2, argc, argv); in wpa_cli_cmd_anqp_get()
2556 static int wpa_cli_cmd_gas_request(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_gas_request() argument
2559 return wpa_cli_cmd(ctrl, "GAS_REQUEST", 2, argc, argv); in wpa_cli_cmd_gas_request()
2563 static int wpa_cli_cmd_gas_response_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_gas_response_get() argument
2566 return wpa_cli_cmd(ctrl, "GAS_RESPONSE_GET", 2, argc, argv); in wpa_cli_cmd_gas_response_get()
2573 static int wpa_cli_cmd_hs20_anqp_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_hs20_anqp_get() argument
2576 return wpa_cli_cmd(ctrl, "HS20_ANQP_GET", 2, argc, argv); in wpa_cli_cmd_hs20_anqp_get()
2580 static int wpa_cli_cmd_get_nai_home_realm_list(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_nai_home_realm_list() argument
2585 if (argc == 0) { in wpa_cli_cmd_get_nai_home_realm_list()
2592 argc, argv) < 0) in wpa_cli_cmd_get_nai_home_realm_list()
2599 static int wpa_cli_cmd_hs20_icon_request(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_hs20_icon_request() argument
2604 if (argc < 2) { in wpa_cli_cmd_hs20_icon_request()
2610 if (write_cmd(cmd, sizeof(cmd), "HS20_ICON_REQUEST", argc, argv) < 0) in wpa_cli_cmd_hs20_icon_request()
2617 static int wpa_cli_cmd_fetch_osu(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_fetch_osu() argument
2623 static int wpa_cli_cmd_cancel_fetch_osu(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_cancel_fetch_osu() argument
2632 static int wpa_cli_cmd_sta_autoconnect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_sta_autoconnect() argument
2635 return wpa_cli_cmd(ctrl, "STA_AUTOCONNECT", 1, argc, argv); in wpa_cli_cmd_sta_autoconnect()
2639 static int wpa_cli_cmd_tdls_discover(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_discover() argument
2642 return wpa_cli_cmd(ctrl, "TDLS_DISCOVER", 1, argc, argv); in wpa_cli_cmd_tdls_discover()
2646 static int wpa_cli_cmd_tdls_setup(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_setup() argument
2649 return wpa_cli_cmd(ctrl, "TDLS_SETUP", 1, argc, argv); in wpa_cli_cmd_tdls_setup()
2653 static int wpa_cli_cmd_tdls_teardown(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_teardown() argument
2656 return wpa_cli_cmd(ctrl, "TDLS_TEARDOWN", 1, argc, argv); in wpa_cli_cmd_tdls_teardown()
2660 static int wpa_cli_cmd_tdls_link_status(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_link_status() argument
2663 return wpa_cli_cmd(ctrl, "TDLS_LINK_STATUS", 1, argc, argv); in wpa_cli_cmd_tdls_link_status()
2667 static int wpa_cli_cmd_wmm_ac_addts(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wmm_ac_addts() argument
2670 return wpa_cli_cmd(ctrl, "WMM_AC_ADDTS", 3, argc, argv); in wpa_cli_cmd_wmm_ac_addts()
2674 static int wpa_cli_cmd_wmm_ac_delts(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wmm_ac_delts() argument
2677 return wpa_cli_cmd(ctrl, "WMM_AC_DELTS", 1, argc, argv); in wpa_cli_cmd_wmm_ac_delts()
2681 static int wpa_cli_cmd_wmm_ac_status(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wmm_ac_status() argument
2688 static int wpa_cli_cmd_tdls_chan_switch(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_chan_switch() argument
2691 return wpa_cli_cmd(ctrl, "TDLS_CHAN_SWITCH", 2, argc, argv); in wpa_cli_cmd_tdls_chan_switch()
2695 static int wpa_cli_cmd_tdls_cancel_chan_switch(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_cancel_chan_switch() argument
2698 return wpa_cli_cmd(ctrl, "TDLS_CANCEL_CHAN_SWITCH", 1, argc, argv); in wpa_cli_cmd_tdls_cancel_chan_switch()
2702 static int wpa_cli_cmd_signal_poll(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_signal_poll() argument
2709 static int wpa_cli_cmd_signal_monitor(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_signal_monitor() argument
2712 return wpa_cli_cmd(ctrl, "SIGNAL_MONITOR", 0, argc, argv); in wpa_cli_cmd_signal_monitor()
2716 static int wpa_cli_cmd_pktcnt_poll(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_pktcnt_poll() argument
2723 static int wpa_cli_cmd_reauthenticate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reauthenticate() argument
2732 static int wpa_cli_cmd_autoscan(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_autoscan() argument
2734 if (argc == 0) in wpa_cli_cmd_autoscan()
2737 return wpa_cli_cmd(ctrl, "AUTOSCAN", 0, argc, argv); in wpa_cli_cmd_autoscan()
2745 static int wpa_cli_cmd_wnm_sleep(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wnm_sleep() argument
2747 return wpa_cli_cmd(ctrl, "WNM_SLEEP", 0, argc, argv); in wpa_cli_cmd_wnm_sleep()
2751 static int wpa_cli_cmd_wnm_bss_query(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wnm_bss_query() argument
2753 return wpa_cli_cmd(ctrl, "WNM_BSS_QUERY", 1, argc, argv); in wpa_cli_cmd_wnm_bss_query()
2759 static int wpa_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_raw() argument
2761 if (argc == 0) in wpa_cli_cmd_raw()
2763 return wpa_cli_cmd(ctrl, argv[0], 0, argc - 1, &argv[1]); in wpa_cli_cmd_raw()
2768 static int wpa_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_driver() argument
2770 return wpa_cli_cmd(ctrl, "DRIVER", 1, argc, argv); in wpa_cli_cmd_driver()
2775 static int wpa_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_vendor() argument
2777 return wpa_cli_cmd(ctrl, "VENDOR", 1, argc, argv); in wpa_cli_cmd_vendor()
2781 static int wpa_cli_cmd_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_flush() argument
2787 static int wpa_cli_cmd_radio_work(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_radio_work() argument
2789 return wpa_cli_cmd(ctrl, "RADIO_WORK", 1, argc, argv); in wpa_cli_cmd_radio_work()
2793 static int wpa_cli_cmd_neighbor_rep_request(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_neighbor_rep_request() argument
2796 return wpa_cli_cmd(ctrl, "NEIGHBOR_REP_REQUEST", 0, argc, argv); in wpa_cli_cmd_neighbor_rep_request()
2800 static int wpa_cli_cmd_erp_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_erp_flush() argument
2806 static int wpa_cli_cmd_mac_rand_scan(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mac_rand_scan() argument
2809 return wpa_cli_cmd(ctrl, "MAC_RAND_SCAN", 1, argc, argv); in wpa_cli_cmd_mac_rand_scan()
2813 static int wpa_cli_cmd_get_pref_freq_list(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_pref_freq_list() argument
2816 return wpa_cli_cmd(ctrl, "GET_PREF_FREQ_LIST", 1, argc, argv); in wpa_cli_cmd_get_pref_freq_list()
2820 static int wpa_cli_cmd_p2p_lo_start(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_lo_start() argument
2823 return wpa_cli_cmd(ctrl, "P2P_LO_START", 4, argc, argv); in wpa_cli_cmd_p2p_lo_start()
2827 static int wpa_cli_cmd_p2p_lo_stop(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_lo_stop() argument
2830 return wpa_cli_cmd(ctrl, "P2P_LO_STOP", 0, argc, argv); in wpa_cli_cmd_p2p_lo_stop()
2841 int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
3590 static int wpa_request(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_request() argument
3596 if (argc > 1 && os_strncasecmp(argv[0], "IFNAME=", 7) == 0) { in wpa_request()
3599 argc--; in wpa_request()
3603 if (argc == 0) in wpa_request()
3638 ret = match->handler(ctrl, argc - 1, &argv[1]); in wpa_request()
3970 int argc; in wpa_cli_edit_cmd_cb() local
3971 argc = tokenize_cmd(cmd, argv); in wpa_cli_edit_cmd_cb()
3972 if (argc) in wpa_cli_edit_cmd_cb()
3973 wpa_request(ctrl_conn, argc, argv); in wpa_cli_edit_cmd_cb()
4315 int main(int argc, char *argv[]) in main() argument
4326 c = getopt(argc, argv, "a:Bg:G:hi:p:P:s:v"); in main()
4367 interactive = (argc == optind) && (action_file == NULL); in main()
4441 ret = wpa_request(ctrl_conn, argc - optind, in main()
4453 int main(int argc, char *argv[]) in main() argument