• Home
  • Raw
  • Download

Lines Matching refs:ctrl

76 static void update_creds(struct wpa_ctrl *ctrl);
77 static void update_networks(struct wpa_ctrl *ctrl);
78 static void update_stations(struct wpa_ctrl *ctrl);
79 static void update_ifnames(struct wpa_ctrl *ctrl);
228 static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd, int print) in _wpa_ctrl_command() argument
245 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, in _wpa_ctrl_command()
264 static int wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd) in wpa_ctrl_command() argument
266 return _wpa_ctrl_command(ctrl, cmd, 1); in wpa_ctrl_command()
270 static int wpa_cli_cmd(struct wpa_ctrl *ctrl, const char *cmd, int min_args, in wpa_cli_cmd() argument
282 return wpa_ctrl_command(ctrl, buf); in wpa_cli_cmd()
286 static int wpa_cli_cmd_ifname(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ifname() argument
288 return wpa_ctrl_command(ctrl, "IFNAME"); in wpa_cli_cmd_ifname()
292 static int wpa_cli_cmd_status(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_status() argument
295 return wpa_ctrl_command(ctrl, "STATUS-VERBOSE"); in wpa_cli_cmd_status()
297 return wpa_ctrl_command(ctrl, "STATUS-WPS"); in wpa_cli_cmd_status()
299 return wpa_ctrl_command(ctrl, "STATUS-DRIVER"); in wpa_cli_cmd_status()
302 return wpa_ctrl_command(ctrl, "STATUS-NO_EVENTS"); in wpa_cli_cmd_status()
304 return wpa_ctrl_command(ctrl, "STATUS"); in wpa_cli_cmd_status()
308 static int wpa_cli_cmd_ping(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ping() argument
310 return wpa_ctrl_command(ctrl, "PING"); in wpa_cli_cmd_ping()
314 static int wpa_cli_cmd_relog(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_relog() argument
316 return wpa_ctrl_command(ctrl, "RELOG"); in wpa_cli_cmd_relog()
320 static int wpa_cli_cmd_note(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_note() argument
322 return wpa_cli_cmd(ctrl, "NOTE", 1, argc, argv); in wpa_cli_cmd_note()
326 static int wpa_cli_cmd_mib(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_mib() argument
328 return wpa_ctrl_command(ctrl, "MIB"); in wpa_cli_cmd_mib()
332 static int wpa_cli_cmd_pmksa(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pmksa() argument
334 return wpa_ctrl_command(ctrl, "PMKSA"); in wpa_cli_cmd_pmksa()
338 static int wpa_cli_cmd_pmksa_flush(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_pmksa_flush() argument
341 return wpa_ctrl_command(ctrl, "PMKSA_FLUSH"); in wpa_cli_cmd_pmksa_flush()
347 static int wpa_cli_cmd_pmksa_get(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pmksa_get() argument
349 return wpa_cli_cmd(ctrl, "PMKSA_GET", 1, argc, argv); in wpa_cli_cmd_pmksa_get()
353 static int wpa_cli_cmd_pmksa_add(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pmksa_add() argument
355 return wpa_cli_cmd(ctrl, "PMKSA_ADD", 8, argc, argv); in wpa_cli_cmd_pmksa_add()
361 static int wpa_cli_mesh_cmd_pmksa_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_mesh_cmd_pmksa_get() argument
364 return wpa_cli_cmd(ctrl, "MESH_PMKSA_GET", 1, argc, argv); in wpa_cli_mesh_cmd_pmksa_get()
368 static int wpa_cli_mesh_cmd_pmksa_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_mesh_cmd_pmksa_add() argument
371 return wpa_cli_cmd(ctrl, "MESH_PMKSA_ADD", 4, argc, argv); in wpa_cli_mesh_cmd_pmksa_add()
378 static int wpa_cli_cmd_help(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_help() argument
400 static int wpa_cli_cmd_license(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_license() argument
407 static int wpa_cli_cmd_quit(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_quit() argument
416 static int wpa_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_set() argument
427 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_set()
430 return wpa_cli_cmd(ctrl, "SET", 2, argc, argv); in wpa_cli_cmd_set()
528 static int wpa_cli_cmd_dump(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_dump() argument
530 return wpa_ctrl_command(ctrl, "DUMP"); in wpa_cli_cmd_dump()
534 static int wpa_cli_cmd_driver_flags(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_driver_flags() argument
537 return wpa_ctrl_command(ctrl, "DRIVER_FLAGS"); in wpa_cli_cmd_driver_flags()
541 static int wpa_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_get() argument
543 return wpa_cli_cmd(ctrl, "GET", 1, argc, argv); in wpa_cli_cmd_get()
619 static int wpa_cli_cmd_logoff(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_logoff() argument
621 return wpa_ctrl_command(ctrl, "LOGOFF"); in wpa_cli_cmd_logoff()
625 static int wpa_cli_cmd_logon(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_logon() argument
627 return wpa_ctrl_command(ctrl, "LOGON"); in wpa_cli_cmd_logon()
631 static int wpa_cli_cmd_reassociate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reassociate() argument
634 return wpa_ctrl_command(ctrl, "REASSOCIATE"); in wpa_cli_cmd_reassociate()
638 static int wpa_cli_cmd_reattach(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_reattach() argument
640 return wpa_ctrl_command(ctrl, "REATTACH"); in wpa_cli_cmd_reattach()
644 static int wpa_cli_cmd_preauthenticate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_preauthenticate() argument
647 return wpa_cli_cmd(ctrl, "PREAUTH", 1, argc, argv); in wpa_cli_cmd_preauthenticate()
651 static int wpa_cli_cmd_ap_scan(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ap_scan() argument
653 return wpa_cli_cmd(ctrl, "AP_SCAN", 1, argc, argv); in wpa_cli_cmd_ap_scan()
657 static int wpa_cli_cmd_scan_interval(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_scan_interval() argument
660 return wpa_cli_cmd(ctrl, "SCAN_INTERVAL", 1, argc, argv); in wpa_cli_cmd_scan_interval()
664 static int wpa_cli_cmd_bss_expire_age(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_bss_expire_age() argument
667 return wpa_cli_cmd(ctrl, "BSS_EXPIRE_AGE", 1, argc, argv); in wpa_cli_cmd_bss_expire_age()
671 static int wpa_cli_cmd_bss_expire_count(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_bss_expire_count() argument
674 return wpa_cli_cmd(ctrl, "BSS_EXPIRE_COUNT", 1, argc, argv); in wpa_cli_cmd_bss_expire_count()
678 static int wpa_cli_cmd_bss_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_bss_flush() argument
691 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_bss_flush()
695 static int wpa_cli_cmd_ft_ds(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ft_ds() argument
697 return wpa_cli_cmd(ctrl, "FT_DS", 1, argc, argv); in wpa_cli_cmd_ft_ds()
701 static int wpa_cli_cmd_wps_pbc(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_pbc() argument
703 return wpa_cli_cmd(ctrl, "WPS_PBC", 0, argc, argv); in wpa_cli_cmd_wps_pbc()
707 static int wpa_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_pin() argument
717 return wpa_cli_cmd(ctrl, "WPS_PIN", 1, argc, argv); in wpa_cli_cmd_wps_pin()
721 static int wpa_cli_cmd_wps_check_pin(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_check_pin() argument
724 return wpa_cli_cmd(ctrl, "WPS_CHECK_PIN", 1, argc, argv); in wpa_cli_cmd_wps_check_pin()
728 static int wpa_cli_cmd_wps_cancel(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_cancel() argument
731 return wpa_ctrl_command(ctrl, "WPS_CANCEL"); in wpa_cli_cmd_wps_cancel()
737 static int wpa_cli_cmd_wps_nfc(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_nfc() argument
739 return wpa_cli_cmd(ctrl, "WPS_NFC", 0, argc, argv); in wpa_cli_cmd_wps_nfc()
743 static int wpa_cli_cmd_wps_nfc_config_token(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_nfc_config_token() argument
746 return wpa_cli_cmd(ctrl, "WPS_NFC_CONFIG_TOKEN", 1, argc, argv); in wpa_cli_cmd_wps_nfc_config_token()
750 static int wpa_cli_cmd_wps_nfc_token(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_nfc_token() argument
753 return wpa_cli_cmd(ctrl, "WPS_NFC_TOKEN", 1, argc, argv); in wpa_cli_cmd_wps_nfc_token()
757 static int wpa_cli_cmd_wps_nfc_tag_read(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_nfc_tag_read() argument
776 ret = wpa_ctrl_command(ctrl, buf); in wpa_cli_cmd_wps_nfc_tag_read()
783 static int wpa_cli_cmd_nfc_get_handover_req(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_nfc_get_handover_req() argument
786 return wpa_cli_cmd(ctrl, "NFC_GET_HANDOVER_REQ", 2, argc, argv); in wpa_cli_cmd_nfc_get_handover_req()
790 static int wpa_cli_cmd_nfc_get_handover_sel(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_nfc_get_handover_sel() argument
793 return wpa_cli_cmd(ctrl, "NFC_GET_HANDOVER_SEL", 2, argc, argv); in wpa_cli_cmd_nfc_get_handover_sel()
797 static int wpa_cli_cmd_nfc_report_handover(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_nfc_report_handover() argument
800 return wpa_cli_cmd(ctrl, "NFC_REPORT_HANDOVER", 4, argc, argv); in wpa_cli_cmd_nfc_report_handover()
806 static int wpa_cli_cmd_wps_reg(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_reg() argument
859 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_wps_reg()
863 static int wpa_cli_cmd_wps_ap_pin(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_ap_pin() argument
866 return wpa_cli_cmd(ctrl, "WPS_AP_PIN", 1, argc, argv); in wpa_cli_cmd_wps_ap_pin()
870 static int wpa_cli_cmd_wps_er_start(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_start() argument
873 return wpa_cli_cmd(ctrl, "WPS_ER_START", 0, argc, argv); in wpa_cli_cmd_wps_er_start()
877 static int wpa_cli_cmd_wps_er_stop(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_stop() argument
880 return wpa_ctrl_command(ctrl, "WPS_ER_STOP"); in wpa_cli_cmd_wps_er_stop()
885 static int wpa_cli_cmd_wps_er_pin(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_pin() argument
897 return wpa_cli_cmd(ctrl, "WPS_ER_PIN", 2, argc, argv); in wpa_cli_cmd_wps_er_pin()
901 static int wpa_cli_cmd_wps_er_pbc(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_pbc() argument
904 return wpa_cli_cmd(ctrl, "WPS_ER_PBC", 1, argc, argv); in wpa_cli_cmd_wps_er_pbc()
908 static int wpa_cli_cmd_wps_er_learn(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_learn() argument
918 return wpa_cli_cmd(ctrl, "WPS_ER_LEARN", 2, argc, argv); in wpa_cli_cmd_wps_er_learn()
922 static int wpa_cli_cmd_wps_er_set_config(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_set_config() argument
933 return wpa_cli_cmd(ctrl, "WPS_ER_SET_CONFIG", 2, argc, argv); in wpa_cli_cmd_wps_er_set_config()
937 static int wpa_cli_cmd_wps_er_config(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_config() argument
984 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_wps_er_config()
989 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
1000 return wpa_cli_cmd(ctrl, "WPS_ER_NFC_CONFIG_TOKEN", 2, argc, argv); in wpa_cli_cmd_wps_er_nfc_config_token()
1005 static int wpa_cli_cmd_ibss_rsn(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ibss_rsn() argument
1007 return wpa_cli_cmd(ctrl, "IBSS_RSN", 1, argc, argv); in wpa_cli_cmd_ibss_rsn()
1011 static int wpa_cli_cmd_level(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_level() argument
1013 return wpa_cli_cmd(ctrl, "LEVEL", 1, argc, argv); in wpa_cli_cmd_level()
1017 static int wpa_cli_cmd_identity(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_identity() argument
1046 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_identity()
1050 static int wpa_cli_cmd_password(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_password() argument
1079 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_password()
1083 static int wpa_cli_cmd_new_password(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_new_password() argument
1113 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_new_password()
1117 static int wpa_cli_cmd_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pin() argument
1145 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_pin()
1149 static int wpa_cli_cmd_otp(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_otp() argument
1178 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_otp()
1182 static int wpa_cli_cmd_sim(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_sim() argument
1210 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_sim()
1214 static int wpa_cli_cmd_psk_passphrase(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_psk_passphrase() argument
1243 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_psk_passphrase()
1247 static int wpa_cli_cmd_passphrase(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_passphrase() argument
1277 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_passphrase()
1281 static int wpa_cli_cmd_bssid(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_bssid() argument
1289 return wpa_cli_cmd(ctrl, "BSSID", 2, argc, argv); in wpa_cli_cmd_bssid()
1293 static int wpa_cli_cmd_bssid_ignore(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_bssid_ignore() argument
1296 return wpa_cli_cmd(ctrl, "BSSID_IGNORE", 0, argc, argv); in wpa_cli_cmd_bssid_ignore()
1300 static int wpa_cli_cmd_log_level(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_log_level() argument
1302 return wpa_cli_cmd(ctrl, "LOG_LEVEL", 0, argc, argv); in wpa_cli_cmd_log_level()
1306 static int wpa_cli_cmd_list_networks(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_list_networks() argument
1309 return wpa_cli_cmd(ctrl, "LIST_NETWORKS", 0, argc, argv); in wpa_cli_cmd_list_networks()
1313 static int wpa_cli_cmd_select_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_select_network() argument
1316 return wpa_cli_cmd(ctrl, "SELECT_NETWORK", 1, argc, argv); in wpa_cli_cmd_select_network()
1320 static int wpa_cli_cmd_enable_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_enable_network() argument
1323 return wpa_cli_cmd(ctrl, "ENABLE_NETWORK", 1, argc, argv); in wpa_cli_cmd_enable_network()
1327 static int wpa_cli_cmd_disable_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_disable_network() argument
1330 return wpa_cli_cmd(ctrl, "DISABLE_NETWORK", 1, argc, argv); in wpa_cli_cmd_disable_network()
1334 static int wpa_cli_cmd_add_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_add_network() argument
1337 int res = wpa_ctrl_command(ctrl, "ADD_NETWORK"); in wpa_cli_cmd_add_network()
1339 update_networks(ctrl); in wpa_cli_cmd_add_network()
1344 static int wpa_cli_cmd_remove_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_remove_network() argument
1347 int res = wpa_cli_cmd(ctrl, "REMOVE_NETWORK", 1, argc, argv); in wpa_cli_cmd_remove_network()
1349 update_networks(ctrl); in wpa_cli_cmd_remove_network()
1375 static int wpa_cli_cmd_set_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_set_network() argument
1389 return wpa_cli_cmd(ctrl, "SET_NETWORK", 3, argc, argv); in wpa_cli_cmd_set_network()
1393 static int wpa_cli_cmd_get_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_network() argument
1407 return wpa_cli_cmd(ctrl, "GET_NETWORK", 2, argc, argv); in wpa_cli_cmd_get_network()
1518 static int wpa_cli_cmd_dup_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dup_network() argument
1532 return wpa_cli_cmd(ctrl, "DUP_NETWORK", 3, argc, argv); in wpa_cli_cmd_dup_network()
1561 static int wpa_cli_cmd_list_creds(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_list_creds() argument
1564 return wpa_ctrl_command(ctrl, "LIST_CREDS"); in wpa_cli_cmd_list_creds()
1568 static int wpa_cli_cmd_add_cred(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_add_cred() argument
1570 int res = wpa_ctrl_command(ctrl, "ADD_CRED"); in wpa_cli_cmd_add_cred()
1572 update_creds(ctrl); in wpa_cli_cmd_add_cred()
1577 static int wpa_cli_cmd_remove_cred(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_remove_cred() argument
1580 int res = wpa_cli_cmd(ctrl, "REMOVE_CRED", 1, argc, argv); in wpa_cli_cmd_remove_cred()
1582 update_creds(ctrl); in wpa_cli_cmd_remove_cred()
1623 static int wpa_cli_cmd_set_cred(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_set_cred() argument
1631 return wpa_cli_cmd(ctrl, "SET_CRED", 3, argc, argv); in wpa_cli_cmd_set_cred()
1635 static int wpa_cli_cmd_get_cred(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_get_cred() argument
1643 return wpa_cli_cmd(ctrl, "GET_CRED", 2, argc, argv); in wpa_cli_cmd_get_cred()
1647 static int wpa_cli_cmd_disconnect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_disconnect() argument
1650 return wpa_ctrl_command(ctrl, "DISCONNECT"); in wpa_cli_cmd_disconnect()
1654 static int wpa_cli_cmd_reconnect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reconnect() argument
1657 return wpa_ctrl_command(ctrl, "RECONNECT"); in wpa_cli_cmd_reconnect()
1661 static int wpa_cli_cmd_save_config(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_save_config() argument
1664 return wpa_ctrl_command(ctrl, "SAVE_CONFIG"); in wpa_cli_cmd_save_config()
1668 static int wpa_cli_cmd_scan(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_scan() argument
1670 return wpa_cli_cmd(ctrl, "SCAN", 0, argc, argv); in wpa_cli_cmd_scan()
1674 static int wpa_cli_cmd_scan_results(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_scan_results() argument
1677 return wpa_ctrl_command(ctrl, "SCAN_RESULTS"); in wpa_cli_cmd_scan_results()
1681 static int wpa_cli_cmd_abort_scan(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_abort_scan() argument
1684 return wpa_ctrl_command(ctrl, "ABORT_SCAN"); in wpa_cli_cmd_abort_scan()
1688 static int wpa_cli_cmd_bss(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_bss() argument
1690 return wpa_cli_cmd(ctrl, "BSS", 1, argc, argv); in wpa_cli_cmd_bss()
1709 static int wpa_cli_cmd_get_capability(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_capability() argument
1734 return wpa_cli_cmd(ctrl, "GET_CAPABILITY", 1, argc, argv); in wpa_cli_cmd_get_capability()
1801 static int wpa_cli_list_interfaces(struct wpa_ctrl *ctrl) in wpa_cli_list_interfaces() argument
1804 return wpa_ctrl_command(ctrl, "INTERFACES"); in wpa_cli_list_interfaces()
1808 static int wpa_cli_cmd_interface(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_interface() argument
1811 wpa_cli_list_interfaces(ctrl); in wpa_cli_cmd_interface()
1833 static int wpa_cli_cmd_reconfigure(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reconfigure() argument
1836 return wpa_ctrl_command(ctrl, "RECONFIGURE"); in wpa_cli_cmd_reconfigure()
1840 static int wpa_cli_cmd_terminate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_terminate() argument
1843 return wpa_ctrl_command(ctrl, "TERMINATE"); in wpa_cli_cmd_terminate()
1847 static int wpa_cli_cmd_interface_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interface_add() argument
1875 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_interface_add()
1879 static int wpa_cli_cmd_interface_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interface_remove() argument
1882 return wpa_cli_cmd(ctrl, "INTERFACE_REMOVE", 1, argc, argv); in wpa_cli_cmd_interface_remove()
1886 static int wpa_cli_cmd_interface_list(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interface_list() argument
1889 return wpa_ctrl_command(ctrl, "INTERFACE_LIST"); in wpa_cli_cmd_interface_list()
1894 static int wpa_cli_cmd_sta(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_sta() argument
1896 return wpa_cli_cmd(ctrl, "STA", 1, argc, argv); in wpa_cli_cmd_sta()
1915 static int wpa_ctrl_command_sta(struct wpa_ctrl *ctrl, const char *cmd, in wpa_ctrl_command_sta() argument
1933 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, in wpa_ctrl_command_sta()
1959 static int wpa_cli_cmd_all_sta(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_all_sta() argument
1963 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 1)) in wpa_cli_cmd_all_sta()
1967 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 1) == 0); in wpa_cli_cmd_all_sta()
1973 static int wpa_cli_cmd_list_sta(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_list_sta() argument
1978 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 0)) in wpa_cli_cmd_list_sta()
1984 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 0) == 0); in wpa_cli_cmd_list_sta()
1990 static int wpa_cli_cmd_deauthenticate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_deauthenticate() argument
1993 return wpa_cli_cmd(ctrl, "DEAUTHENTICATE", 1, argc, argv); in wpa_cli_cmd_deauthenticate()
2012 static int wpa_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_disassociate() argument
2015 return wpa_cli_cmd(ctrl, "DISASSOCIATE", 1, argc, argv); in wpa_cli_cmd_disassociate()
2034 static int wpa_cli_cmd_chanswitch(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_chanswitch() argument
2037 return wpa_cli_cmd(ctrl, "CHAN_SWITCH", 2, argc, argv); in wpa_cli_cmd_chanswitch()
2043 static int wpa_cli_cmd_suspend(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_suspend() argument
2045 return wpa_ctrl_command(ctrl, "SUSPEND"); in wpa_cli_cmd_suspend()
2049 static int wpa_cli_cmd_resume(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_resume() argument
2051 return wpa_ctrl_command(ctrl, "RESUME"); in wpa_cli_cmd_resume()
2056 static int wpa_cli_cmd_drop_sa(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_drop_sa() argument
2058 return wpa_ctrl_command(ctrl, "DROP_SA"); in wpa_cli_cmd_drop_sa()
2063 static int wpa_cli_cmd_roam(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_roam() argument
2065 return wpa_cli_cmd(ctrl, "ROAM", 1, argc, argv); in wpa_cli_cmd_roam()
2071 static int wpa_cli_cmd_mesh_interface_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_interface_add() argument
2074 return wpa_cli_cmd(ctrl, "MESH_INTERFACE_ADD", 0, argc, argv); in wpa_cli_cmd_mesh_interface_add()
2078 static int wpa_cli_cmd_mesh_group_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_group_add() argument
2081 return wpa_cli_cmd(ctrl, "MESH_GROUP_ADD", 1, argc, argv); in wpa_cli_cmd_mesh_group_add()
2085 static int wpa_cli_cmd_mesh_group_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_group_remove() argument
2088 return wpa_cli_cmd(ctrl, "MESH_GROUP_REMOVE", 1, argc, argv); in wpa_cli_cmd_mesh_group_remove()
2092 static int wpa_cli_cmd_mesh_peer_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_peer_remove() argument
2095 return wpa_cli_cmd(ctrl, "MESH_PEER_REMOVE", 1, argc, argv); in wpa_cli_cmd_mesh_peer_remove()
2099 static int wpa_cli_cmd_mesh_peer_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_peer_add() argument
2102 return wpa_cli_cmd(ctrl, "MESH_PEER_ADD", 1, argc, argv); in wpa_cli_cmd_mesh_peer_add()
2106 static int wpa_cli_cmd_mesh_link_probe(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_link_probe() argument
2109 return wpa_cli_cmd(ctrl, "MESH_LINK_PROBE", 1, argc, argv); in wpa_cli_cmd_mesh_link_probe()
2117 static int wpa_cli_cmd_p2p_find(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_find() argument
2119 return wpa_cli_cmd(ctrl, "P2P_FIND", 0, argc, argv); in wpa_cli_cmd_p2p_find()
2152 static int wpa_cli_cmd_p2p_stop_find(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_stop_find() argument
2155 return wpa_ctrl_command(ctrl, "P2P_STOP_FIND"); in wpa_cli_cmd_p2p_stop_find()
2159 static int wpa_cli_cmd_p2p_asp_provision(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_asp_provision() argument
2162 return wpa_cli_cmd(ctrl, "P2P_ASP_PROVISION", 3, argc, argv); in wpa_cli_cmd_p2p_asp_provision()
2166 static int wpa_cli_cmd_p2p_asp_provision_resp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_asp_provision_resp() argument
2169 return wpa_cli_cmd(ctrl, "P2P_ASP_PROVISION_RESP", 2, argc, argv); in wpa_cli_cmd_p2p_asp_provision_resp()
2173 static int wpa_cli_cmd_p2p_connect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_connect() argument
2176 return wpa_cli_cmd(ctrl, "P2P_CONNECT", 2, argc, argv); in wpa_cli_cmd_p2p_connect()
2195 static int wpa_cli_cmd_p2p_listen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_listen() argument
2198 return wpa_cli_cmd(ctrl, "P2P_LISTEN", 0, argc, argv); in wpa_cli_cmd_p2p_listen()
2202 static int wpa_cli_cmd_p2p_group_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_group_remove() argument
2205 return wpa_cli_cmd(ctrl, "P2P_GROUP_REMOVE", 1, argc, argv); in wpa_cli_cmd_p2p_group_remove()
2224 static int wpa_cli_cmd_p2p_group_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_group_add() argument
2227 return wpa_cli_cmd(ctrl, "P2P_GROUP_ADD", 0, argc, argv); in wpa_cli_cmd_p2p_group_add()
2231 static int wpa_cli_cmd_p2p_group_member(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_group_member() argument
2234 return wpa_cli_cmd(ctrl, "P2P_GROUP_MEMBER", 1, argc, argv); in wpa_cli_cmd_p2p_group_member()
2238 static int wpa_cli_cmd_p2p_prov_disc(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_prov_disc() argument
2248 return wpa_cli_cmd(ctrl, "P2P_PROV_DISC", 2, argc, argv); in wpa_cli_cmd_p2p_prov_disc()
2252 static int wpa_cli_cmd_p2p_get_passphrase(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_get_passphrase() argument
2255 return wpa_ctrl_command(ctrl, "P2P_GET_PASSPHRASE"); in wpa_cli_cmd_p2p_get_passphrase()
2259 static int wpa_cli_cmd_p2p_serv_disc_req(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_serv_disc_req() argument
2272 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_p2p_serv_disc_req()
2276 static int wpa_cli_cmd_p2p_serv_disc_cancel_req(struct wpa_ctrl *ctrl, in wpa_cli_cmd_p2p_serv_disc_cancel_req() argument
2279 return wpa_cli_cmd(ctrl, "P2P_SERV_DISC_CANCEL_REQ", 1, argc, argv); in wpa_cli_cmd_p2p_serv_disc_cancel_req()
2283 static int wpa_cli_cmd_p2p_serv_disc_resp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_serv_disc_resp() argument
2300 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_p2p_serv_disc_resp()
2304 static int wpa_cli_cmd_p2p_service_update(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_update() argument
2307 return wpa_ctrl_command(ctrl, "P2P_SERVICE_UPDATE"); in wpa_cli_cmd_p2p_service_update()
2311 static int wpa_cli_cmd_p2p_serv_disc_external(struct wpa_ctrl *ctrl, in wpa_cli_cmd_p2p_serv_disc_external() argument
2314 return wpa_cli_cmd(ctrl, "P2P_SERV_DISC_EXTERNAL", 1, argc, argv); in wpa_cli_cmd_p2p_serv_disc_external()
2318 static int wpa_cli_cmd_p2p_service_flush(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_flush() argument
2321 return wpa_ctrl_command(ctrl, "P2P_SERVICE_FLUSH"); in wpa_cli_cmd_p2p_service_flush()
2325 static int wpa_cli_cmd_p2p_service_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_add() argument
2333 return wpa_cli_cmd(ctrl, "P2P_SERVICE_ADD", 3, argc, argv); in wpa_cli_cmd_p2p_service_add()
2337 static int wpa_cli_cmd_p2p_service_rep(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_rep() argument
2346 return wpa_cli_cmd(ctrl, "P2P_SERVICE_REP", 5, argc, argv); in wpa_cli_cmd_p2p_service_rep()
2350 static int wpa_cli_cmd_p2p_service_del(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_del() argument
2373 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_p2p_service_del()
2377 static int wpa_cli_cmd_p2p_reject(struct wpa_ctrl *ctrl, in wpa_cli_cmd_p2p_reject() argument
2380 return wpa_cli_cmd(ctrl, "P2P_REJECT", 1, argc, argv); in wpa_cli_cmd_p2p_reject()
2384 static int wpa_cli_cmd_p2p_invite(struct wpa_ctrl *ctrl, in wpa_cli_cmd_p2p_invite() argument
2387 return wpa_cli_cmd(ctrl, "P2P_INVITE", 1, argc, argv); in wpa_cli_cmd_p2p_invite()
2391 static int wpa_cli_cmd_p2p_peer(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_peer() argument
2393 return wpa_cli_cmd(ctrl, "P2P_PEER", 1, argc, argv); in wpa_cli_cmd_p2p_peer()
2412 static int wpa_ctrl_command_p2p_peer(struct wpa_ctrl *ctrl, const char *cmd, in wpa_ctrl_command_p2p_peer() argument
2423 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, in wpa_ctrl_command_p2p_peer()
2448 static int wpa_cli_cmd_p2p_peers(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_peers() argument
2455 if (wpa_ctrl_command_p2p_peer(ctrl, "P2P_PEER FIRST", in wpa_cli_cmd_p2p_peers()
2460 } while (wpa_ctrl_command_p2p_peer(ctrl, cmd, addr, sizeof(addr), in wpa_cli_cmd_p2p_peers()
2467 static int wpa_cli_cmd_p2p_set(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_set() argument
2469 return wpa_cli_cmd(ctrl, "P2P_SET", 2, argc, argv); in wpa_cli_cmd_p2p_set()
2517 static int wpa_cli_cmd_p2p_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_flush() argument
2519 return wpa_ctrl_command(ctrl, "P2P_FLUSH"); in wpa_cli_cmd_p2p_flush()
2523 static int wpa_cli_cmd_p2p_cancel(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_cancel() argument
2526 return wpa_ctrl_command(ctrl, "P2P_CANCEL"); in wpa_cli_cmd_p2p_cancel()
2530 static int wpa_cli_cmd_p2p_unauthorize(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_unauthorize() argument
2533 return wpa_cli_cmd(ctrl, "P2P_UNAUTHORIZE", 1, argc, argv); in wpa_cli_cmd_p2p_unauthorize()
2537 static int wpa_cli_cmd_p2p_presence_req(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_presence_req() argument
2548 return wpa_cli_cmd(ctrl, "P2P_PRESENCE_REQ", 0, argc, argv); in wpa_cli_cmd_p2p_presence_req()
2552 static int wpa_cli_cmd_p2p_ext_listen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_ext_listen() argument
2564 return wpa_cli_cmd(ctrl, "P2P_EXT_LISTEN", 0, argc, argv); in wpa_cli_cmd_p2p_ext_listen()
2568 static int wpa_cli_cmd_p2p_remove_client(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_remove_client() argument
2571 return wpa_cli_cmd(ctrl, "P2P_REMOVE_CLIENT", 1, argc, argv); in wpa_cli_cmd_p2p_remove_client()
2577 static int wpa_cli_cmd_vendor_elem_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_vendor_elem_add() argument
2580 return wpa_cli_cmd(ctrl, "VENDOR_ELEM_ADD", 2, argc, argv); in wpa_cli_cmd_vendor_elem_add()
2584 static int wpa_cli_cmd_vendor_elem_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_vendor_elem_get() argument
2587 return wpa_cli_cmd(ctrl, "VENDOR_ELEM_GET", 1, argc, argv); in wpa_cli_cmd_vendor_elem_get()
2591 static int wpa_cli_cmd_vendor_elem_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_vendor_elem_remove() argument
2594 return wpa_cli_cmd(ctrl, "VENDOR_ELEM_REMOVE", 2, argc, argv); in wpa_cli_cmd_vendor_elem_remove()
2600 static int wpa_cli_cmd_wfd_subelem_set(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wfd_subelem_set() argument
2617 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_wfd_subelem_set()
2621 static int wpa_cli_cmd_wfd_subelem_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wfd_subelem_get() argument
2638 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_wfd_subelem_get()
2644 static int wpa_cli_cmd_fetch_anqp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_fetch_anqp() argument
2647 return wpa_ctrl_command(ctrl, "FETCH_ANQP"); in wpa_cli_cmd_fetch_anqp()
2651 static int wpa_cli_cmd_stop_fetch_anqp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_stop_fetch_anqp() argument
2654 return wpa_ctrl_command(ctrl, "STOP_FETCH_ANQP"); in wpa_cli_cmd_stop_fetch_anqp()
2658 static int wpa_cli_cmd_interworking_select(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interworking_select() argument
2661 return wpa_cli_cmd(ctrl, "INTERWORKING_SELECT", 0, argc, argv); in wpa_cli_cmd_interworking_select()
2665 static int wpa_cli_cmd_interworking_connect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interworking_connect() argument
2668 return wpa_cli_cmd(ctrl, "INTERWORKING_CONNECT", 1, argc, argv); in wpa_cli_cmd_interworking_connect()
2672 static int wpa_cli_cmd_interworking_add_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interworking_add_network() argument
2675 return wpa_cli_cmd(ctrl, "INTERWORKING_ADD_NETWORK", 1, argc, argv); in wpa_cli_cmd_interworking_add_network()
2679 static int wpa_cli_cmd_anqp_get(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_anqp_get() argument
2681 return wpa_cli_cmd(ctrl, "ANQP_GET", 2, argc, argv); in wpa_cli_cmd_anqp_get()
2685 static int wpa_cli_cmd_gas_request(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_gas_request() argument
2688 return wpa_cli_cmd(ctrl, "GAS_REQUEST", 2, argc, argv); in wpa_cli_cmd_gas_request()
2692 static int wpa_cli_cmd_gas_response_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_gas_response_get() argument
2695 return wpa_cli_cmd(ctrl, "GAS_RESPONSE_GET", 2, argc, argv); in wpa_cli_cmd_gas_response_get()
2702 static int wpa_cli_cmd_hs20_anqp_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_hs20_anqp_get() argument
2705 return wpa_cli_cmd(ctrl, "HS20_ANQP_GET", 2, argc, argv); in wpa_cli_cmd_hs20_anqp_get()
2709 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
2724 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_get_nai_home_realm_list()
2728 static int wpa_cli_cmd_hs20_icon_request(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_hs20_icon_request() argument
2742 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_hs20_icon_request()
2746 static int wpa_cli_cmd_fetch_osu(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_fetch_osu() argument
2748 return wpa_ctrl_command(ctrl, "FETCH_OSU"); in wpa_cli_cmd_fetch_osu()
2752 static int wpa_cli_cmd_cancel_fetch_osu(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_cancel_fetch_osu() argument
2755 return wpa_ctrl_command(ctrl, "CANCEL_FETCH_OSU"); in wpa_cli_cmd_cancel_fetch_osu()
2761 static int wpa_cli_cmd_sta_autoconnect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_sta_autoconnect() argument
2764 return wpa_cli_cmd(ctrl, "STA_AUTOCONNECT", 1, argc, argv); in wpa_cli_cmd_sta_autoconnect()
2768 static int wpa_cli_cmd_tdls_discover(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_discover() argument
2771 return wpa_cli_cmd(ctrl, "TDLS_DISCOVER", 1, argc, argv); in wpa_cli_cmd_tdls_discover()
2775 static int wpa_cli_cmd_tdls_setup(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_setup() argument
2778 return wpa_cli_cmd(ctrl, "TDLS_SETUP", 1, argc, argv); in wpa_cli_cmd_tdls_setup()
2782 static int wpa_cli_cmd_tdls_teardown(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_teardown() argument
2785 return wpa_cli_cmd(ctrl, "TDLS_TEARDOWN", 1, argc, argv); in wpa_cli_cmd_tdls_teardown()
2789 static int wpa_cli_cmd_tdls_link_status(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_link_status() argument
2792 return wpa_cli_cmd(ctrl, "TDLS_LINK_STATUS", 1, argc, argv); in wpa_cli_cmd_tdls_link_status()
2796 static int wpa_cli_cmd_wmm_ac_addts(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wmm_ac_addts() argument
2799 return wpa_cli_cmd(ctrl, "WMM_AC_ADDTS", 3, argc, argv); in wpa_cli_cmd_wmm_ac_addts()
2803 static int wpa_cli_cmd_wmm_ac_delts(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wmm_ac_delts() argument
2806 return wpa_cli_cmd(ctrl, "WMM_AC_DELTS", 1, argc, argv); in wpa_cli_cmd_wmm_ac_delts()
2810 static int wpa_cli_cmd_wmm_ac_status(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wmm_ac_status() argument
2813 return wpa_ctrl_command(ctrl, "WMM_AC_STATUS"); in wpa_cli_cmd_wmm_ac_status()
2817 static int wpa_cli_cmd_tdls_chan_switch(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_chan_switch() argument
2820 return wpa_cli_cmd(ctrl, "TDLS_CHAN_SWITCH", 2, argc, argv); in wpa_cli_cmd_tdls_chan_switch()
2824 static int wpa_cli_cmd_tdls_cancel_chan_switch(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_cancel_chan_switch() argument
2827 return wpa_cli_cmd(ctrl, "TDLS_CANCEL_CHAN_SWITCH", 1, argc, argv); in wpa_cli_cmd_tdls_cancel_chan_switch()
2831 static int wpa_cli_cmd_signal_poll(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_signal_poll() argument
2834 return wpa_ctrl_command(ctrl, "SIGNAL_POLL"); in wpa_cli_cmd_signal_poll()
2838 static int wpa_cli_cmd_signal_monitor(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_signal_monitor() argument
2841 return wpa_cli_cmd(ctrl, "SIGNAL_MONITOR", 0, argc, argv); in wpa_cli_cmd_signal_monitor()
2845 static int wpa_cli_cmd_pktcnt_poll(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_pktcnt_poll() argument
2848 return wpa_ctrl_command(ctrl, "PKTCNT_POLL"); in wpa_cli_cmd_pktcnt_poll()
2852 static int wpa_cli_cmd_reauthenticate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reauthenticate() argument
2855 return wpa_ctrl_command(ctrl, "REAUTHENTICATE"); in wpa_cli_cmd_reauthenticate()
2861 static int wpa_cli_cmd_autoscan(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_autoscan() argument
2864 return wpa_ctrl_command(ctrl, "AUTOSCAN "); in wpa_cli_cmd_autoscan()
2866 return wpa_cli_cmd(ctrl, "AUTOSCAN", 0, argc, argv); in wpa_cli_cmd_autoscan()
2874 static int wpa_cli_cmd_wnm_sleep(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wnm_sleep() argument
2876 return wpa_cli_cmd(ctrl, "WNM_SLEEP", 0, argc, argv); in wpa_cli_cmd_wnm_sleep()
2880 static int wpa_cli_cmd_wnm_bss_query(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wnm_bss_query() argument
2882 return wpa_cli_cmd(ctrl, "WNM_BSS_QUERY", 1, argc, argv); in wpa_cli_cmd_wnm_bss_query()
2888 static int wpa_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_raw() argument
2892 return wpa_cli_cmd(ctrl, argv[0], 0, argc - 1, &argv[1]); in wpa_cli_cmd_raw()
2897 static int wpa_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_driver() argument
2899 return wpa_cli_cmd(ctrl, "DRIVER", 1, argc, argv); in wpa_cli_cmd_driver()
2904 static int wpa_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_vendor() argument
2906 return wpa_cli_cmd(ctrl, "VENDOR", 1, argc, argv); in wpa_cli_cmd_vendor()
2910 static int wpa_cli_cmd_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_flush() argument
2912 return wpa_ctrl_command(ctrl, "FLUSH"); in wpa_cli_cmd_flush()
2916 static int wpa_cli_cmd_radio_work(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_radio_work() argument
2918 return wpa_cli_cmd(ctrl, "RADIO_WORK", 1, argc, argv); in wpa_cli_cmd_radio_work()
2922 static int wpa_cli_cmd_neighbor_rep_request(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_neighbor_rep_request() argument
2925 return wpa_cli_cmd(ctrl, "NEIGHBOR_REP_REQUEST", 0, argc, argv); in wpa_cli_cmd_neighbor_rep_request()
2929 static int wpa_cli_cmd_erp_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_erp_flush() argument
2931 return wpa_ctrl_command(ctrl, "ERP_FLUSH"); in wpa_cli_cmd_erp_flush()
2935 static int wpa_cli_cmd_mac_rand_scan(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mac_rand_scan() argument
2938 return wpa_cli_cmd(ctrl, "MAC_RAND_SCAN", 1, argc, argv); in wpa_cli_cmd_mac_rand_scan()
2942 static int wpa_cli_cmd_get_pref_freq_list(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_pref_freq_list() argument
2945 return wpa_cli_cmd(ctrl, "GET_PREF_FREQ_LIST", 1, argc, argv); in wpa_cli_cmd_get_pref_freq_list()
2949 static int wpa_cli_cmd_p2p_lo_start(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_lo_start() argument
2952 return wpa_cli_cmd(ctrl, "P2P_LO_START", 4, argc, argv); in wpa_cli_cmd_p2p_lo_start()
2956 static int wpa_cli_cmd_p2p_lo_stop(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_lo_stop() argument
2959 return wpa_cli_cmd(ctrl, "P2P_LO_STOP", 0, argc, argv); in wpa_cli_cmd_p2p_lo_stop()
2965 static int wpa_cli_cmd_dpp_qr_code(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_qr_code() argument
2968 return wpa_cli_cmd(ctrl, "DPP_QR_CODE", 1, argc, argv); in wpa_cli_cmd_dpp_qr_code()
2972 static int wpa_cli_cmd_dpp_bootstrap_gen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_bootstrap_gen() argument
2975 return wpa_cli_cmd(ctrl, "DPP_BOOTSTRAP_GEN", 1, argc, argv); in wpa_cli_cmd_dpp_bootstrap_gen()
2979 static int wpa_cli_cmd_dpp_bootstrap_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_bootstrap_remove() argument
2982 return wpa_cli_cmd(ctrl, "DPP_BOOTSTRAP_REMOVE", 1, argc, argv); in wpa_cli_cmd_dpp_bootstrap_remove()
2986 static int wpa_cli_cmd_dpp_bootstrap_get_uri(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_bootstrap_get_uri() argument
2989 return wpa_cli_cmd(ctrl, "DPP_BOOTSTRAP_GET_URI", 1, argc, argv); in wpa_cli_cmd_dpp_bootstrap_get_uri()
2993 static int wpa_cli_cmd_dpp_bootstrap_info(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_bootstrap_info() argument
2996 return wpa_cli_cmd(ctrl, "DPP_BOOTSTRAP_INFO", 1, argc, argv); in wpa_cli_cmd_dpp_bootstrap_info()
3000 static int wpa_cli_cmd_dpp_bootstrap_set(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_bootstrap_set() argument
3003 return wpa_cli_cmd(ctrl, "DPP_BOOTSTRAP_SET", 1, argc, argv); in wpa_cli_cmd_dpp_bootstrap_set()
3007 static int wpa_cli_cmd_dpp_auth_init(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_auth_init() argument
3010 return wpa_cli_cmd(ctrl, "DPP_AUTH_INIT", 1, argc, argv); in wpa_cli_cmd_dpp_auth_init()
3014 static int wpa_cli_cmd_dpp_listen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_listen() argument
3017 return wpa_cli_cmd(ctrl, "DPP_LISTEN", 1, argc, argv); in wpa_cli_cmd_dpp_listen()
3021 static int wpa_cli_cmd_dpp_stop_listen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_stop_listen() argument
3024 return wpa_ctrl_command(ctrl, "DPP_STOP_LISTEN"); in wpa_cli_cmd_dpp_stop_listen()
3028 static int wpa_cli_cmd_dpp_configurator_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_configurator_add() argument
3031 return wpa_cli_cmd(ctrl, "DPP_CONFIGURATOR_ADD", 0, argc, argv); in wpa_cli_cmd_dpp_configurator_add()
3035 static int wpa_cli_cmd_dpp_configurator_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_configurator_remove() argument
3038 return wpa_cli_cmd(ctrl, "DPP_CONFIGURATOR_REMOVE", 1, argc, argv); in wpa_cli_cmd_dpp_configurator_remove()
3042 static int wpa_cli_cmd_dpp_configurator_get_key(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_configurator_get_key() argument
3045 return wpa_cli_cmd(ctrl, "DPP_CONFIGURATOR_GET_KEY", 1, argc, argv); in wpa_cli_cmd_dpp_configurator_get_key()
3049 static int wpa_cli_cmd_dpp_configurator_sign(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_configurator_sign() argument
3052 return wpa_cli_cmd(ctrl, "DPP_CONFIGURATOR_SIGN", 1, argc, argv); in wpa_cli_cmd_dpp_configurator_sign()
3056 static int wpa_cli_cmd_dpp_pkex_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_pkex_add() argument
3059 return wpa_cli_cmd(ctrl, "DPP_PKEX_ADD", 1, argc, argv); in wpa_cli_cmd_dpp_pkex_add()
3063 static int wpa_cli_cmd_dpp_pkex_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_pkex_remove() argument
3066 return wpa_cli_cmd(ctrl, "DPP_PKEX_REMOVE", 1, argc, argv); in wpa_cli_cmd_dpp_pkex_remove()
3072 static int wpa_cli_cmd_dpp_controller_start(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_controller_start() argument
3075 return wpa_cli_cmd(ctrl, "DPP_CONTROLLER_START", 1, argc, argv); in wpa_cli_cmd_dpp_controller_start()
3079 static int wpa_cli_cmd_dpp_controller_stop(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_controller_stop() argument
3082 return wpa_ctrl_command(ctrl, "DPP_CONTROLLER_STOP"); in wpa_cli_cmd_dpp_controller_stop()
3086 static int wpa_cli_cmd_dpp_chirp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_chirp() argument
3089 return wpa_cli_cmd(ctrl, "DPP_CHIRP", 1, argc, argv); in wpa_cli_cmd_dpp_chirp()
3093 static int wpa_cli_cmd_dpp_stop_chirp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_stop_chirp() argument
3096 return wpa_ctrl_command(ctrl, "DPP_STOP_CHIRP"); in wpa_cli_cmd_dpp_stop_chirp()
3103 static int wpa_ctrl_command_bss(struct wpa_ctrl *ctrl, const char *cmd) in wpa_ctrl_command_bss() argument
3113 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, in wpa_ctrl_command_bss()
3154 static int wpa_cli_cmd_all_bss(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_all_bss() argument
3171 id = wpa_ctrl_command_bss(ctrl, cmd); in wpa_cli_cmd_all_bss()
3180 static int wpa_cli_cmd_pasn_auth_start(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_pasn_auth_start() argument
3183 return wpa_cli_cmd(ctrl, "PASN_AUTH_START", 4, argc, argv); in wpa_cli_cmd_pasn_auth_start()
3187 static int wpa_cli_cmd_pasn_auth_stop(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_pasn_auth_stop() argument
3190 return wpa_cli_cmd(ctrl, "PASN_AUTH_STOP", 0, argc, argv); in wpa_cli_cmd_pasn_auth_stop()
3193 static int wpa_cli_cmd_ptksa_cache_list(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_ptksa_cache_list() argument
3196 return wpa_cli_cmd(ctrl, "PTKSA_CACHE_LIST", 0, argc, argv); in wpa_cli_cmd_ptksa_cache_list()
3209 int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
4038 static int wpa_request(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_request() argument
4086 ret = match->handler(ctrl, argc - 1, &argv[1]); in wpa_request()
4417 static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl, int action_monitor) in wpa_cli_recv_pending() argument
4423 while (wpa_ctrl_pending(ctrl) > 0) { in wpa_cli_recv_pending()
4426 if (wpa_ctrl_recv(ctrl, buf, &len) == 0) { in wpa_cli_recv_pending()
4447 if (wpa_ctrl_pending(ctrl) < 0) { in wpa_cli_recv_pending()
4539 static void update_bssid_list(struct wpa_ctrl *ctrl) in update_bssid_list() argument
4547 if (ctrl == NULL) in update_bssid_list()
4549 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, NULL); in update_bssid_list()
4570 static void update_ifnames(struct wpa_ctrl *ctrl) in update_ifnames() argument
4581 if (ctrl == NULL) in update_ifnames()
4583 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, NULL); in update_ifnames()
4602 static void update_creds(struct wpa_ctrl *ctrl) in update_creds() argument
4613 if (ctrl == NULL) in update_creds()
4615 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, NULL); in update_creds()
4634 static void update_networks(struct wpa_ctrl *ctrl) in update_networks() argument
4645 if (ctrl == NULL) in update_networks()
4647 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, NULL); in update_networks()
4666 static void update_stations(struct wpa_ctrl *ctrl) in update_stations() argument
4671 if (!ctrl || !interactive) in update_stations()
4676 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 0)) in update_stations()
4682 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 0) == 0); in update_stations()
4743 struct wpa_ctrl *ctrl = eloop_ctx; in wpa_cli_action_ping() local
4749 if (wpa_ctrl_request(ctrl, "PING", 4, buf, &len, in wpa_cli_action_ping()
4757 ctrl, NULL); in wpa_cli_action_ping()
4763 struct wpa_ctrl *ctrl = eloop_ctx; in wpa_cli_action_receive() local
4765 wpa_cli_recv_pending(ctrl, 1); in wpa_cli_action_receive()
4769 static void wpa_cli_action(struct wpa_ctrl *ctrl) in wpa_cli_action() argument
4777 fd = wpa_ctrl_get_fd(ctrl); in wpa_cli_action()
4779 ctrl, NULL); in wpa_cli_action()
4780 eloop_register_read_sock(fd, wpa_cli_action_receive, ctrl, NULL); in wpa_cli_action()
4782 eloop_cancel_timeout(wpa_cli_action_ping, ctrl, NULL); in wpa_cli_action()
4849 struct wpa_ctrl *ctrl; in wpa_cli_get_default_ifname() local
4852 ctrl = wpa_ctrl_open(NULL); in wpa_cli_get_default_ifname()
4853 if (ctrl == NULL) in wpa_cli_get_default_ifname()
4857 ret = wpa_ctrl_request(ctrl, "INTERFACES", 10, buf, &len, NULL); in wpa_cli_get_default_ifname()
4865 wpa_ctrl_close(ctrl); in wpa_cli_get_default_ifname()