Lines Matching full: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);
84 printf("wpa_cli [-p<path to ctrl sockets>] [-i<ifname>] [-hvBr] " in usage()
86 " [-P<pid file>] [-g<global ctrl>] [-G<ping interval>] " in usage()
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_mlo_status(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_mlo_status() argument
418 return wpa_ctrl_command(ctrl, "MLO_STATUS"); in wpa_cli_cmd_mlo_status()
422 static int wpa_cli_cmd_mlo_signal_poll(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_mlo_signal_poll() argument
424 return wpa_ctrl_command(ctrl, "MLO_SIGNAL_POLL"); in wpa_cli_cmd_mlo_signal_poll()
428 static int wpa_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_set() argument
439 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_set()
442 return wpa_cli_cmd(ctrl, "SET", 2, argc, argv); in wpa_cli_cmd_set()
541 static int wpa_cli_cmd_dump(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_dump() argument
543 return wpa_ctrl_command(ctrl, "DUMP"); in wpa_cli_cmd_dump()
547 static int wpa_cli_cmd_driver_flags(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_driver_flags() argument
550 return wpa_ctrl_command(ctrl, "DRIVER_FLAGS"); in wpa_cli_cmd_driver_flags()
554 static int wpa_cli_cmd_driver_flags2(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_driver_flags2() argument
557 return wpa_ctrl_command(ctrl, "DRIVER_FLAGS2"); in wpa_cli_cmd_driver_flags2()
561 static int wpa_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_get() argument
563 return wpa_cli_cmd(ctrl, "GET", 1, argc, argv); in wpa_cli_cmd_get()
640 static int wpa_cli_cmd_logoff(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_logoff() argument
642 return wpa_ctrl_command(ctrl, "LOGOFF"); in wpa_cli_cmd_logoff()
646 static int wpa_cli_cmd_logon(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_logon() argument
648 return wpa_ctrl_command(ctrl, "LOGON"); in wpa_cli_cmd_logon()
652 static int wpa_cli_cmd_reassociate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reassociate() argument
655 return wpa_ctrl_command(ctrl, "REASSOCIATE"); in wpa_cli_cmd_reassociate()
659 static int wpa_cli_cmd_reattach(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_reattach() argument
661 return wpa_ctrl_command(ctrl, "REATTACH"); in wpa_cli_cmd_reattach()
665 static int wpa_cli_cmd_preauthenticate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_preauthenticate() argument
668 return wpa_cli_cmd(ctrl, "PREAUTH", 1, argc, argv); in wpa_cli_cmd_preauthenticate()
672 static int wpa_cli_cmd_ap_scan(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ap_scan() argument
674 return wpa_cli_cmd(ctrl, "AP_SCAN", 1, argc, argv); in wpa_cli_cmd_ap_scan()
678 static int wpa_cli_cmd_scan_interval(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_scan_interval() argument
681 return wpa_cli_cmd(ctrl, "SCAN_INTERVAL", 1, argc, argv); in wpa_cli_cmd_scan_interval()
685 static int wpa_cli_cmd_bss_expire_age(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_bss_expire_age() argument
688 return wpa_cli_cmd(ctrl, "BSS_EXPIRE_AGE", 1, argc, argv); in wpa_cli_cmd_bss_expire_age()
692 static int wpa_cli_cmd_bss_expire_count(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_bss_expire_count() argument
695 return wpa_cli_cmd(ctrl, "BSS_EXPIRE_COUNT", 1, argc, argv); in wpa_cli_cmd_bss_expire_count()
699 static int wpa_cli_cmd_bss_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_bss_flush() argument
712 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_bss_flush()
716 static int wpa_cli_cmd_ft_ds(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ft_ds() argument
718 return wpa_cli_cmd(ctrl, "FT_DS", 1, argc, argv); in wpa_cli_cmd_ft_ds()
722 static int wpa_cli_cmd_wps_pbc(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_pbc() argument
724 return wpa_cli_cmd(ctrl, "WPS_PBC", 0, argc, argv); in wpa_cli_cmd_wps_pbc()
728 static int wpa_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_pin() argument
738 return wpa_cli_cmd(ctrl, "WPS_PIN", 1, argc, argv); in wpa_cli_cmd_wps_pin()
742 static int wpa_cli_cmd_wps_check_pin(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_check_pin() argument
745 return wpa_cli_cmd(ctrl, "WPS_CHECK_PIN", 1, argc, argv); in wpa_cli_cmd_wps_check_pin()
749 static int wpa_cli_cmd_wps_cancel(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_cancel() argument
752 return wpa_ctrl_command(ctrl, "WPS_CANCEL"); in wpa_cli_cmd_wps_cancel()
758 static int wpa_cli_cmd_wps_nfc(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_nfc() argument
760 return wpa_cli_cmd(ctrl, "WPS_NFC", 0, argc, argv); in wpa_cli_cmd_wps_nfc()
764 static int wpa_cli_cmd_wps_nfc_config_token(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_nfc_config_token() argument
767 return wpa_cli_cmd(ctrl, "WPS_NFC_CONFIG_TOKEN", 1, argc, argv); in wpa_cli_cmd_wps_nfc_config_token()
771 static int wpa_cli_cmd_wps_nfc_token(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_nfc_token() argument
774 return wpa_cli_cmd(ctrl, "WPS_NFC_TOKEN", 1, argc, argv); in wpa_cli_cmd_wps_nfc_token()
778 static int wpa_cli_cmd_wps_nfc_tag_read(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_nfc_tag_read() argument
797 ret = wpa_ctrl_command(ctrl, buf); in wpa_cli_cmd_wps_nfc_tag_read()
804 static int wpa_cli_cmd_nfc_get_handover_req(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_nfc_get_handover_req() argument
807 return wpa_cli_cmd(ctrl, "NFC_GET_HANDOVER_REQ", 2, argc, argv); in wpa_cli_cmd_nfc_get_handover_req()
811 static int wpa_cli_cmd_nfc_get_handover_sel(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_nfc_get_handover_sel() argument
814 return wpa_cli_cmd(ctrl, "NFC_GET_HANDOVER_SEL", 2, argc, argv); in wpa_cli_cmd_nfc_get_handover_sel()
818 static int wpa_cli_cmd_nfc_report_handover(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_nfc_report_handover() argument
821 return wpa_cli_cmd(ctrl, "NFC_REPORT_HANDOVER", 4, argc, argv); in wpa_cli_cmd_nfc_report_handover()
827 static int wpa_cli_cmd_wps_reg(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wps_reg() argument
880 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_wps_reg()
884 static int wpa_cli_cmd_wps_ap_pin(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_ap_pin() argument
887 return wpa_cli_cmd(ctrl, "WPS_AP_PIN", 1, argc, argv); in wpa_cli_cmd_wps_ap_pin()
891 static int wpa_cli_cmd_wps_er_start(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_start() argument
894 return wpa_cli_cmd(ctrl, "WPS_ER_START", 0, argc, argv); in wpa_cli_cmd_wps_er_start()
898 static int wpa_cli_cmd_wps_er_stop(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_stop() argument
901 return wpa_ctrl_command(ctrl, "WPS_ER_STOP"); in wpa_cli_cmd_wps_er_stop()
906 static int wpa_cli_cmd_wps_er_pin(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_pin() argument
918 return wpa_cli_cmd(ctrl, "WPS_ER_PIN", 2, argc, argv); in wpa_cli_cmd_wps_er_pin()
922 static int wpa_cli_cmd_wps_er_pbc(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_pbc() argument
925 return wpa_cli_cmd(ctrl, "WPS_ER_PBC", 1, argc, argv); in wpa_cli_cmd_wps_er_pbc()
929 static int wpa_cli_cmd_wps_er_learn(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_learn() argument
939 return wpa_cli_cmd(ctrl, "WPS_ER_LEARN", 2, argc, argv); in wpa_cli_cmd_wps_er_learn()
943 static int wpa_cli_cmd_wps_er_set_config(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_set_config() argument
954 return wpa_cli_cmd(ctrl, "WPS_ER_SET_CONFIG", 2, argc, argv); in wpa_cli_cmd_wps_er_set_config()
958 static int wpa_cli_cmd_wps_er_config(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wps_er_config() argument
1005 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_wps_er_config()
1010 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
1021 return wpa_cli_cmd(ctrl, "WPS_ER_NFC_CONFIG_TOKEN", 2, argc, argv); in wpa_cli_cmd_wps_er_nfc_config_token()
1026 static int wpa_cli_cmd_ibss_rsn(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_ibss_rsn() argument
1028 return wpa_cli_cmd(ctrl, "IBSS_RSN", 1, argc, argv); in wpa_cli_cmd_ibss_rsn()
1032 static int wpa_cli_cmd_level(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_level() argument
1034 return wpa_cli_cmd(ctrl, "LEVEL", 1, argc, argv); in wpa_cli_cmd_level()
1038 static int wpa_cli_cmd_identity(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_identity() argument
1067 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_identity()
1071 static int wpa_cli_cmd_password(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_password() argument
1100 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_password()
1104 static int wpa_cli_cmd_new_password(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_new_password() argument
1134 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_new_password()
1138 static int wpa_cli_cmd_pin(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pin() argument
1166 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_pin()
1170 static int wpa_cli_cmd_otp(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_otp() argument
1199 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_otp()
1203 static int wpa_cli_cmd_sim(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_sim() argument
1231 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_sim()
1235 static int wpa_cli_cmd_psk_passphrase(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_psk_passphrase() argument
1264 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_psk_passphrase()
1268 static int wpa_cli_cmd_passphrase(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_passphrase() argument
1298 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_passphrase()
1302 static int wpa_cli_cmd_bssid(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_bssid() argument
1310 return wpa_cli_cmd(ctrl, "BSSID", 2, argc, argv); in wpa_cli_cmd_bssid()
1314 static int wpa_cli_cmd_bssid_ignore(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_bssid_ignore() argument
1317 return wpa_cli_cmd(ctrl, "BSSID_IGNORE", 0, argc, argv); in wpa_cli_cmd_bssid_ignore()
1321 static int wpa_cli_cmd_log_level(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_log_level() argument
1323 return wpa_cli_cmd(ctrl, "LOG_LEVEL", 0, argc, argv); in wpa_cli_cmd_log_level()
1327 static int wpa_cli_cmd_list_networks(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_list_networks() argument
1330 return wpa_cli_cmd(ctrl, "LIST_NETWORKS", 0, argc, argv); in wpa_cli_cmd_list_networks()
1334 static int wpa_cli_cmd_select_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_select_network() argument
1337 return wpa_cli_cmd(ctrl, "SELECT_NETWORK", 1, argc, argv); in wpa_cli_cmd_select_network()
1341 static int wpa_cli_cmd_enable_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_enable_network() argument
1344 return wpa_cli_cmd(ctrl, "ENABLE_NETWORK", 1, argc, argv); in wpa_cli_cmd_enable_network()
1348 static int wpa_cli_cmd_disable_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_disable_network() argument
1351 return wpa_cli_cmd(ctrl, "DISABLE_NETWORK", 1, argc, argv); in wpa_cli_cmd_disable_network()
1355 static int wpa_cli_cmd_add_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_add_network() argument
1358 int res = wpa_ctrl_command(ctrl, "ADD_NETWORK"); in wpa_cli_cmd_add_network()
1360 update_networks(ctrl); in wpa_cli_cmd_add_network()
1365 static int wpa_cli_cmd_remove_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_remove_network() argument
1368 int res = wpa_cli_cmd(ctrl, "REMOVE_NETWORK", 1, argc, argv); in wpa_cli_cmd_remove_network()
1370 update_networks(ctrl); in wpa_cli_cmd_remove_network()
1396 static int wpa_cli_cmd_set_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_set_network() argument
1410 return wpa_cli_cmd(ctrl, "SET_NETWORK", 3, argc, argv); in wpa_cli_cmd_set_network()
1414 static int wpa_cli_cmd_get_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_network() argument
1428 return wpa_cli_cmd(ctrl, "GET_NETWORK", 2, argc, argv); in wpa_cli_cmd_get_network()
1541 static int wpa_cli_cmd_dup_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dup_network() argument
1555 return wpa_cli_cmd(ctrl, "DUP_NETWORK", 3, argc, argv); in wpa_cli_cmd_dup_network()
1584 static int wpa_cli_cmd_list_creds(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_list_creds() argument
1587 return wpa_ctrl_command(ctrl, "LIST_CREDS"); in wpa_cli_cmd_list_creds()
1591 static int wpa_cli_cmd_add_cred(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_add_cred() argument
1593 int res = wpa_ctrl_command(ctrl, "ADD_CRED"); in wpa_cli_cmd_add_cred()
1595 update_creds(ctrl); in wpa_cli_cmd_add_cred()
1600 static int wpa_cli_cmd_remove_cred(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_remove_cred() argument
1603 int res = wpa_cli_cmd(ctrl, "REMOVE_CRED", 1, argc, argv); in wpa_cli_cmd_remove_cred()
1605 update_creds(ctrl); in wpa_cli_cmd_remove_cred()
1647 static int wpa_cli_cmd_set_cred(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_set_cred() argument
1655 return wpa_cli_cmd(ctrl, "SET_CRED", 3, argc, argv); in wpa_cli_cmd_set_cred()
1659 static int wpa_cli_cmd_get_cred(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_get_cred() argument
1667 return wpa_cli_cmd(ctrl, "GET_CRED", 2, argc, argv); in wpa_cli_cmd_get_cred()
1671 static int wpa_cli_cmd_disconnect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_disconnect() argument
1674 return wpa_ctrl_command(ctrl, "DISCONNECT"); in wpa_cli_cmd_disconnect()
1678 static int wpa_cli_cmd_reconnect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reconnect() argument
1681 return wpa_ctrl_command(ctrl, "RECONNECT"); in wpa_cli_cmd_reconnect()
1685 static int wpa_cli_cmd_save_config(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_save_config() argument
1688 return wpa_ctrl_command(ctrl, "SAVE_CONFIG"); in wpa_cli_cmd_save_config()
1692 static int wpa_cli_cmd_scan(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_scan() argument
1694 return wpa_cli_cmd(ctrl, "SCAN", 0, argc, argv); in wpa_cli_cmd_scan()
1698 static int wpa_cli_cmd_scan_results(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_scan_results() argument
1701 return wpa_ctrl_command(ctrl, "SCAN_RESULTS"); in wpa_cli_cmd_scan_results()
1705 static int wpa_cli_cmd_abort_scan(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_abort_scan() argument
1708 return wpa_ctrl_command(ctrl, "ABORT_SCAN"); in wpa_cli_cmd_abort_scan()
1712 static int wpa_cli_cmd_bss(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_bss() argument
1714 return wpa_cli_cmd(ctrl, "BSS", 1, argc, argv); in wpa_cli_cmd_bss()
1733 static int wpa_cli_cmd_get_capability(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_capability() argument
1758 return wpa_cli_cmd(ctrl, "GET_CAPABILITY", 1, argc, argv); in wpa_cli_cmd_get_capability()
1825 static int wpa_cli_list_interfaces(struct wpa_ctrl *ctrl) in wpa_cli_list_interfaces() argument
1828 return wpa_ctrl_command(ctrl, "INTERFACES"); in wpa_cli_list_interfaces()
1832 static int wpa_cli_cmd_interface(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_interface() argument
1835 wpa_cli_list_interfaces(ctrl); in wpa_cli_cmd_interface()
1857 static int wpa_cli_cmd_reconfigure(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reconfigure() argument
1860 return wpa_ctrl_command(ctrl, "RECONFIGURE"); in wpa_cli_cmd_reconfigure()
1864 static int wpa_cli_cmd_terminate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_terminate() argument
1867 return wpa_ctrl_command(ctrl, "TERMINATE"); in wpa_cli_cmd_terminate()
1871 static int wpa_cli_cmd_interface_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interface_add() argument
1899 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_interface_add()
1903 static int wpa_cli_cmd_interface_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interface_remove() argument
1906 return wpa_cli_cmd(ctrl, "INTERFACE_REMOVE", 1, argc, argv); in wpa_cli_cmd_interface_remove()
1910 static int wpa_cli_cmd_interface_list(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interface_list() argument
1913 return wpa_ctrl_command(ctrl, "INTERFACE_LIST"); in wpa_cli_cmd_interface_list()
1918 static int wpa_cli_cmd_sta(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_sta() argument
1920 return wpa_cli_cmd(ctrl, "STA", 1, argc, argv); in wpa_cli_cmd_sta()
1939 static int wpa_ctrl_command_sta(struct wpa_ctrl *ctrl, const char *cmd, in wpa_ctrl_command_sta() argument
1957 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, in wpa_ctrl_command_sta()
1983 static int wpa_cli_cmd_all_sta(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_all_sta() argument
1987 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 1)) in wpa_cli_cmd_all_sta()
1991 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 1) == 0); in wpa_cli_cmd_all_sta()
1997 static int wpa_cli_cmd_list_sta(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_list_sta() argument
2002 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 0)) in wpa_cli_cmd_list_sta()
2008 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 0) == 0); in wpa_cli_cmd_list_sta()
2014 static int wpa_cli_cmd_deauthenticate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_deauthenticate() argument
2017 return wpa_cli_cmd(ctrl, "DEAUTHENTICATE", 1, argc, argv); in wpa_cli_cmd_deauthenticate()
2036 static int wpa_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_disassociate() argument
2039 return wpa_cli_cmd(ctrl, "DISASSOCIATE", 1, argc, argv); in wpa_cli_cmd_disassociate()
2058 static int wpa_cli_cmd_chanswitch(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_chanswitch() argument
2061 return wpa_cli_cmd(ctrl, "CHAN_SWITCH", 2, argc, argv); in wpa_cli_cmd_chanswitch()
2065 static int wpa_cli_cmd_update_beacon(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_update_beacon() argument
2068 return wpa_ctrl_command(ctrl, "UPDATE_BEACON"); in wpa_cli_cmd_update_beacon()
2072 static int wpa_cli_cmd_accept_macacl(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_accept_macacl() argument
2075 return wpa_cli_cmd(ctrl, "ACCEPT_ACL", 1, argc, argv); in wpa_cli_cmd_accept_macacl()
2079 static int wpa_cli_cmd_deny_macacl(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_deny_macacl() argument
2082 return wpa_cli_cmd(ctrl, "DENY_ACL", 1, argc, argv); in wpa_cli_cmd_deny_macacl()
2088 static int wpa_cli_cmd_suspend(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_suspend() argument
2090 return wpa_ctrl_command(ctrl, "SUSPEND"); in wpa_cli_cmd_suspend()
2094 static int wpa_cli_cmd_resume(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_resume() argument
2096 return wpa_ctrl_command(ctrl, "RESUME"); in wpa_cli_cmd_resume()
2102 static int wpa_cli_cmd_drop_sa(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_drop_sa() argument
2104 return wpa_ctrl_command(ctrl, "DROP_SA"); in wpa_cli_cmd_drop_sa()
2108 static int wpa_cli_cmd_ml_probe_req(struct wpa_ctrl *ctrl, in wpa_cli_cmd_ml_probe_req() argument
2111 return wpa_cli_cmd(ctrl, "ML_PROBE_REQ", 2, argc, argv); in wpa_cli_cmd_ml_probe_req()
2117 static int wpa_cli_cmd_roam(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_roam() argument
2119 return wpa_cli_cmd(ctrl, "ROAM", 1, argc, argv); in wpa_cli_cmd_roam()
2125 static int wpa_cli_cmd_mesh_interface_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_interface_add() argument
2128 return wpa_cli_cmd(ctrl, "MESH_INTERFACE_ADD", 0, argc, argv); in wpa_cli_cmd_mesh_interface_add()
2132 static int wpa_cli_cmd_mesh_group_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_group_add() argument
2135 return wpa_cli_cmd(ctrl, "MESH_GROUP_ADD", 1, argc, argv); in wpa_cli_cmd_mesh_group_add()
2139 static int wpa_cli_cmd_mesh_group_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_group_remove() argument
2142 return wpa_cli_cmd(ctrl, "MESH_GROUP_REMOVE", 1, argc, argv); in wpa_cli_cmd_mesh_group_remove()
2146 static int wpa_cli_cmd_mesh_peer_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_peer_remove() argument
2149 return wpa_cli_cmd(ctrl, "MESH_PEER_REMOVE", 1, argc, argv); in wpa_cli_cmd_mesh_peer_remove()
2153 static int wpa_cli_cmd_mesh_peer_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_peer_add() argument
2156 return wpa_cli_cmd(ctrl, "MESH_PEER_ADD", 1, argc, argv); in wpa_cli_cmd_mesh_peer_add()
2160 static int wpa_cli_cmd_mesh_link_probe(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mesh_link_probe() argument
2163 return wpa_cli_cmd(ctrl, "MESH_LINK_PROBE", 1, argc, argv); in wpa_cli_cmd_mesh_link_probe()
2171 static int wpa_cli_cmd_p2p_find(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_find() argument
2173 return wpa_cli_cmd(ctrl, "P2P_FIND", 0, argc, argv); in wpa_cli_cmd_p2p_find()
2206 static int wpa_cli_cmd_p2p_stop_find(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_stop_find() argument
2209 return wpa_ctrl_command(ctrl, "P2P_STOP_FIND"); in wpa_cli_cmd_p2p_stop_find()
2213 static int wpa_cli_cmd_p2p_asp_provision(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_asp_provision() argument
2216 return wpa_cli_cmd(ctrl, "P2P_ASP_PROVISION", 3, argc, argv); in wpa_cli_cmd_p2p_asp_provision()
2220 static int wpa_cli_cmd_p2p_asp_provision_resp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_asp_provision_resp() argument
2223 return wpa_cli_cmd(ctrl, "P2P_ASP_PROVISION_RESP", 2, argc, argv); in wpa_cli_cmd_p2p_asp_provision_resp()
2227 static int wpa_cli_cmd_p2p_connect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_connect() argument
2230 return wpa_cli_cmd(ctrl, "P2P_CONNECT", 2, argc, argv); in wpa_cli_cmd_p2p_connect()
2249 static int wpa_cli_cmd_p2p_listen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_listen() argument
2252 return wpa_cli_cmd(ctrl, "P2P_LISTEN", 0, argc, argv); in wpa_cli_cmd_p2p_listen()
2256 static int wpa_cli_cmd_p2p_group_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_group_remove() argument
2259 return wpa_cli_cmd(ctrl, "P2P_GROUP_REMOVE", 1, argc, argv); in wpa_cli_cmd_p2p_group_remove()
2278 static int wpa_cli_cmd_p2p_group_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_group_add() argument
2281 return wpa_cli_cmd(ctrl, "P2P_GROUP_ADD", 0, argc, argv); in wpa_cli_cmd_p2p_group_add()
2285 static int wpa_cli_cmd_p2p_group_member(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_group_member() argument
2288 return wpa_cli_cmd(ctrl, "P2P_GROUP_MEMBER", 1, argc, argv); in wpa_cli_cmd_p2p_group_member()
2292 static int wpa_cli_cmd_p2p_prov_disc(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_prov_disc() argument
2302 return wpa_cli_cmd(ctrl, "P2P_PROV_DISC", 2, argc, argv); in wpa_cli_cmd_p2p_prov_disc()
2306 static int wpa_cli_cmd_p2p_get_passphrase(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_get_passphrase() argument
2309 return wpa_ctrl_command(ctrl, "P2P_GET_PASSPHRASE"); in wpa_cli_cmd_p2p_get_passphrase()
2313 static int wpa_cli_cmd_p2p_serv_disc_req(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_serv_disc_req() argument
2326 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_p2p_serv_disc_req()
2330 static int wpa_cli_cmd_p2p_serv_disc_cancel_req(struct wpa_ctrl *ctrl, in wpa_cli_cmd_p2p_serv_disc_cancel_req() argument
2333 return wpa_cli_cmd(ctrl, "P2P_SERV_DISC_CANCEL_REQ", 1, argc, argv); in wpa_cli_cmd_p2p_serv_disc_cancel_req()
2337 static int wpa_cli_cmd_p2p_serv_disc_resp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_serv_disc_resp() argument
2354 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_p2p_serv_disc_resp()
2358 static int wpa_cli_cmd_p2p_service_update(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_update() argument
2361 return wpa_ctrl_command(ctrl, "P2P_SERVICE_UPDATE"); in wpa_cli_cmd_p2p_service_update()
2365 static int wpa_cli_cmd_p2p_serv_disc_external(struct wpa_ctrl *ctrl, in wpa_cli_cmd_p2p_serv_disc_external() argument
2368 return wpa_cli_cmd(ctrl, "P2P_SERV_DISC_EXTERNAL", 1, argc, argv); in wpa_cli_cmd_p2p_serv_disc_external()
2372 static int wpa_cli_cmd_p2p_service_flush(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_flush() argument
2375 return wpa_ctrl_command(ctrl, "P2P_SERVICE_FLUSH"); in wpa_cli_cmd_p2p_service_flush()
2379 static int wpa_cli_cmd_p2p_service_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_add() argument
2387 return wpa_cli_cmd(ctrl, "P2P_SERVICE_ADD", 3, argc, argv); in wpa_cli_cmd_p2p_service_add()
2391 static int wpa_cli_cmd_p2p_service_rep(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_rep() argument
2400 return wpa_cli_cmd(ctrl, "P2P_SERVICE_REP", 5, argc, argv); in wpa_cli_cmd_p2p_service_rep()
2404 static int wpa_cli_cmd_p2p_service_del(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_service_del() argument
2427 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_p2p_service_del()
2431 static int wpa_cli_cmd_p2p_reject(struct wpa_ctrl *ctrl, in wpa_cli_cmd_p2p_reject() argument
2434 return wpa_cli_cmd(ctrl, "P2P_REJECT", 1, argc, argv); in wpa_cli_cmd_p2p_reject()
2438 static int wpa_cli_cmd_p2p_invite(struct wpa_ctrl *ctrl, in wpa_cli_cmd_p2p_invite() argument
2441 return wpa_cli_cmd(ctrl, "P2P_INVITE", 1, argc, argv); in wpa_cli_cmd_p2p_invite()
2445 static int wpa_cli_cmd_p2p_peer(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_peer() argument
2447 return wpa_cli_cmd(ctrl, "P2P_PEER", 1, argc, argv); in wpa_cli_cmd_p2p_peer()
2466 static int wpa_ctrl_command_p2p_peer(struct wpa_ctrl *ctrl, const char *cmd, in wpa_ctrl_command_p2p_peer() argument
2477 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, in wpa_ctrl_command_p2p_peer()
2502 static int wpa_cli_cmd_p2p_peers(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_peers() argument
2509 if (wpa_ctrl_command_p2p_peer(ctrl, "P2P_PEER FIRST", in wpa_cli_cmd_p2p_peers()
2514 } while (wpa_ctrl_command_p2p_peer(ctrl, cmd, addr, sizeof(addr), in wpa_cli_cmd_p2p_peers()
2521 static int wpa_cli_cmd_p2p_set(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_set() argument
2523 return wpa_cli_cmd(ctrl, "P2P_SET", 2, argc, argv); in wpa_cli_cmd_p2p_set()
2571 static int wpa_cli_cmd_p2p_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_p2p_flush() argument
2573 return wpa_ctrl_command(ctrl, "P2P_FLUSH"); in wpa_cli_cmd_p2p_flush()
2577 static int wpa_cli_cmd_p2p_cancel(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_cancel() argument
2580 return wpa_ctrl_command(ctrl, "P2P_CANCEL"); in wpa_cli_cmd_p2p_cancel()
2584 static int wpa_cli_cmd_p2p_unauthorize(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_unauthorize() argument
2587 return wpa_cli_cmd(ctrl, "P2P_UNAUTHORIZE", 1, argc, argv); in wpa_cli_cmd_p2p_unauthorize()
2591 static int wpa_cli_cmd_p2p_presence_req(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_presence_req() argument
2602 return wpa_cli_cmd(ctrl, "P2P_PRESENCE_REQ", 0, argc, argv); in wpa_cli_cmd_p2p_presence_req()
2606 static int wpa_cli_cmd_p2p_ext_listen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_ext_listen() argument
2618 return wpa_cli_cmd(ctrl, "P2P_EXT_LISTEN", 0, argc, argv); in wpa_cli_cmd_p2p_ext_listen()
2622 static int wpa_cli_cmd_p2p_remove_client(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_remove_client() argument
2625 return wpa_cli_cmd(ctrl, "P2P_REMOVE_CLIENT", 1, argc, argv); in wpa_cli_cmd_p2p_remove_client()
2631 static int wpa_cli_cmd_vendor_elem_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_vendor_elem_add() argument
2634 return wpa_cli_cmd(ctrl, "VENDOR_ELEM_ADD", 2, argc, argv); in wpa_cli_cmd_vendor_elem_add()
2638 static int wpa_cli_cmd_vendor_elem_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_vendor_elem_get() argument
2641 return wpa_cli_cmd(ctrl, "VENDOR_ELEM_GET", 1, argc, argv); in wpa_cli_cmd_vendor_elem_get()
2645 static int wpa_cli_cmd_vendor_elem_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_vendor_elem_remove() argument
2648 return wpa_cli_cmd(ctrl, "VENDOR_ELEM_REMOVE", 2, argc, argv); in wpa_cli_cmd_vendor_elem_remove()
2654 static int wpa_cli_cmd_wfd_subelem_set(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wfd_subelem_set() argument
2671 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_wfd_subelem_set()
2675 static int wpa_cli_cmd_wfd_subelem_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wfd_subelem_get() argument
2692 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_wfd_subelem_get()
2698 static int wpa_cli_cmd_fetch_anqp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_fetch_anqp() argument
2701 return wpa_ctrl_command(ctrl, "FETCH_ANQP"); in wpa_cli_cmd_fetch_anqp()
2705 static int wpa_cli_cmd_stop_fetch_anqp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_stop_fetch_anqp() argument
2708 return wpa_ctrl_command(ctrl, "STOP_FETCH_ANQP"); in wpa_cli_cmd_stop_fetch_anqp()
2712 static int wpa_cli_cmd_interworking_select(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interworking_select() argument
2715 return wpa_cli_cmd(ctrl, "INTERWORKING_SELECT", 0, argc, argv); in wpa_cli_cmd_interworking_select()
2719 static int wpa_cli_cmd_interworking_connect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interworking_connect() argument
2722 return wpa_cli_cmd(ctrl, "INTERWORKING_CONNECT", 1, argc, argv); in wpa_cli_cmd_interworking_connect()
2726 static int wpa_cli_cmd_interworking_add_network(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_interworking_add_network() argument
2729 return wpa_cli_cmd(ctrl, "INTERWORKING_ADD_NETWORK", 1, argc, argv); in wpa_cli_cmd_interworking_add_network()
2733 static int wpa_cli_cmd_anqp_get(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_anqp_get() argument
2735 return wpa_cli_cmd(ctrl, "ANQP_GET", 2, argc, argv); in wpa_cli_cmd_anqp_get()
2739 static int wpa_cli_cmd_gas_request(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_gas_request() argument
2742 return wpa_cli_cmd(ctrl, "GAS_REQUEST", 2, argc, argv); in wpa_cli_cmd_gas_request()
2746 static int wpa_cli_cmd_gas_response_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_gas_response_get() argument
2749 return wpa_cli_cmd(ctrl, "GAS_RESPONSE_GET", 2, argc, argv); in wpa_cli_cmd_gas_response_get()
2756 static int wpa_cli_cmd_hs20_anqp_get(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_hs20_anqp_get() argument
2759 return wpa_cli_cmd(ctrl, "HS20_ANQP_GET", 2, argc, argv); in wpa_cli_cmd_hs20_anqp_get()
2763 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
2778 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_get_nai_home_realm_list()
2782 static int wpa_cli_cmd_hs20_icon_request(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_hs20_icon_request() argument
2796 return wpa_ctrl_command(ctrl, cmd); in wpa_cli_cmd_hs20_icon_request()
2800 static int wpa_cli_cmd_fetch_osu(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_fetch_osu() argument
2802 return wpa_ctrl_command(ctrl, "FETCH_OSU"); in wpa_cli_cmd_fetch_osu()
2806 static int wpa_cli_cmd_cancel_fetch_osu(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_cancel_fetch_osu() argument
2809 return wpa_ctrl_command(ctrl, "CANCEL_FETCH_OSU"); in wpa_cli_cmd_cancel_fetch_osu()
2815 static int wpa_cli_cmd_sta_autoconnect(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_sta_autoconnect() argument
2818 return wpa_cli_cmd(ctrl, "STA_AUTOCONNECT", 1, argc, argv); in wpa_cli_cmd_sta_autoconnect()
2822 static int wpa_cli_cmd_tdls_discover(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_discover() argument
2825 return wpa_cli_cmd(ctrl, "TDLS_DISCOVER", 1, argc, argv); in wpa_cli_cmd_tdls_discover()
2829 static int wpa_cli_cmd_tdls_setup(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_setup() argument
2832 return wpa_cli_cmd(ctrl, "TDLS_SETUP", 1, argc, argv); in wpa_cli_cmd_tdls_setup()
2836 static int wpa_cli_cmd_tdls_teardown(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_teardown() argument
2839 return wpa_cli_cmd(ctrl, "TDLS_TEARDOWN", 1, argc, argv); in wpa_cli_cmd_tdls_teardown()
2843 static int wpa_cli_cmd_tdls_link_status(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_link_status() argument
2846 return wpa_cli_cmd(ctrl, "TDLS_LINK_STATUS", 1, argc, argv); in wpa_cli_cmd_tdls_link_status()
2852 static int wpa_cli_cmd_wmm_ac_addts(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wmm_ac_addts() argument
2855 return wpa_cli_cmd(ctrl, "WMM_AC_ADDTS", 3, argc, argv); in wpa_cli_cmd_wmm_ac_addts()
2859 static int wpa_cli_cmd_wmm_ac_delts(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wmm_ac_delts() argument
2862 return wpa_cli_cmd(ctrl, "WMM_AC_DELTS", 1, argc, argv); in wpa_cli_cmd_wmm_ac_delts()
2866 static int wpa_cli_cmd_wmm_ac_status(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_wmm_ac_status() argument
2869 return wpa_ctrl_command(ctrl, "WMM_AC_STATUS"); in wpa_cli_cmd_wmm_ac_status()
2875 static int wpa_cli_cmd_tdls_chan_switch(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_chan_switch() argument
2878 return wpa_cli_cmd(ctrl, "TDLS_CHAN_SWITCH", 2, argc, argv); in wpa_cli_cmd_tdls_chan_switch()
2882 static int wpa_cli_cmd_tdls_cancel_chan_switch(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_tdls_cancel_chan_switch() argument
2885 return wpa_cli_cmd(ctrl, "TDLS_CANCEL_CHAN_SWITCH", 1, argc, argv); in wpa_cli_cmd_tdls_cancel_chan_switch()
2889 static int wpa_cli_cmd_signal_poll(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_signal_poll() argument
2892 return wpa_ctrl_command(ctrl, "SIGNAL_POLL"); in wpa_cli_cmd_signal_poll()
2896 static int wpa_cli_cmd_signal_monitor(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_signal_monitor() argument
2899 return wpa_cli_cmd(ctrl, "SIGNAL_MONITOR", 0, argc, argv); in wpa_cli_cmd_signal_monitor()
2903 static int wpa_cli_cmd_pktcnt_poll(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_pktcnt_poll() argument
2906 return wpa_ctrl_command(ctrl, "PKTCNT_POLL"); in wpa_cli_cmd_pktcnt_poll()
2910 static int wpa_cli_cmd_reauthenticate(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_reauthenticate() argument
2913 return wpa_ctrl_command(ctrl, "REAUTHENTICATE"); in wpa_cli_cmd_reauthenticate()
2919 static int wpa_cli_cmd_autoscan(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_autoscan() argument
2922 return wpa_ctrl_command(ctrl, "AUTOSCAN "); in wpa_cli_cmd_autoscan()
2924 return wpa_cli_cmd(ctrl, "AUTOSCAN", 0, argc, argv); in wpa_cli_cmd_autoscan()
2932 static int wpa_cli_cmd_wnm_sleep(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wnm_sleep() argument
2934 return wpa_cli_cmd(ctrl, "WNM_SLEEP", 0, argc, argv); in wpa_cli_cmd_wnm_sleep()
2938 static int wpa_cli_cmd_wnm_bss_query(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_wnm_bss_query() argument
2940 return wpa_cli_cmd(ctrl, "WNM_BSS_QUERY", 1, argc, argv); in wpa_cli_cmd_wnm_bss_query()
2948 static int wpa_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_disassoc_imminent() argument
2951 return wpa_cli_cmd(ctrl, "DISASSOC_IMMINENT", 2, argc, argv); in wpa_cli_cmd_disassoc_imminent()
2955 static int wpa_cli_cmd_ess_disassoc(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_ess_disassoc() argument
2958 return wpa_cli_cmd(ctrl, "ESS_DISASSOC", 3, argc, argv); in wpa_cli_cmd_ess_disassoc()
2962 static int wpa_cli_cmd_bss_tm_req(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_bss_tm_req() argument
2965 return wpa_cli_cmd(ctrl, "BSS_TM_REQ", 1, argc, argv); in wpa_cli_cmd_bss_tm_req()
2971 static int wpa_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_raw() argument
2975 return wpa_cli_cmd(ctrl, argv[0], 0, argc - 1, &argv[1]); in wpa_cli_cmd_raw()
2980 static int wpa_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_driver() argument
2982 return wpa_cli_cmd(ctrl, "DRIVER", 1, argc, argv); in wpa_cli_cmd_driver()
2987 static int wpa_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_vendor() argument
2989 return wpa_cli_cmd(ctrl, "VENDOR", 1, argc, argv); in wpa_cli_cmd_vendor()
2993 static int wpa_cli_cmd_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_flush() argument
2995 return wpa_ctrl_command(ctrl, "FLUSH"); in wpa_cli_cmd_flush()
2999 static int wpa_cli_cmd_radio_work(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_radio_work() argument
3001 return wpa_cli_cmd(ctrl, "RADIO_WORK", 1, argc, argv); in wpa_cli_cmd_radio_work()
3005 static int wpa_cli_cmd_neighbor_rep_request(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_neighbor_rep_request() argument
3008 return wpa_cli_cmd(ctrl, "NEIGHBOR_REP_REQUEST", 0, argc, argv); in wpa_cli_cmd_neighbor_rep_request()
3012 static int wpa_cli_cmd_twt_setup(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_twt_setup() argument
3015 return wpa_cli_cmd(ctrl, "TWT_SETUP", 0, argc, argv); in wpa_cli_cmd_twt_setup()
3019 static int wpa_cli_cmd_twt_teardown(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_twt_teardown() argument
3022 return wpa_cli_cmd(ctrl, "TWT_TEARDOWN", 0, argc, argv); in wpa_cli_cmd_twt_teardown()
3026 static int wpa_cli_cmd_erp_flush(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_erp_flush() argument
3028 return wpa_ctrl_command(ctrl, "ERP_FLUSH"); in wpa_cli_cmd_erp_flush()
3032 static int wpa_cli_cmd_mac_rand_scan(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_mac_rand_scan() argument
3035 return wpa_cli_cmd(ctrl, "MAC_RAND_SCAN", 1, argc, argv); in wpa_cli_cmd_mac_rand_scan()
3039 static int wpa_cli_cmd_get_pref_freq_list(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_get_pref_freq_list() argument
3042 return wpa_cli_cmd(ctrl, "GET_PREF_FREQ_LIST", 1, argc, argv); in wpa_cli_cmd_get_pref_freq_list()
3046 static int wpa_cli_cmd_p2p_lo_start(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_lo_start() argument
3049 return wpa_cli_cmd(ctrl, "P2P_LO_START", 4, argc, argv); in wpa_cli_cmd_p2p_lo_start()
3053 static int wpa_cli_cmd_p2p_lo_stop(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_p2p_lo_stop() argument
3056 return wpa_cli_cmd(ctrl, "P2P_LO_STOP", 0, argc, argv); in wpa_cli_cmd_p2p_lo_stop()
3062 static int wpa_cli_cmd_dpp_qr_code(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_qr_code() argument
3065 return wpa_cli_cmd(ctrl, "DPP_QR_CODE", 1, argc, argv); in wpa_cli_cmd_dpp_qr_code()
3069 static int wpa_cli_cmd_dpp_bootstrap_gen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_bootstrap_gen() argument
3072 return wpa_cli_cmd(ctrl, "DPP_BOOTSTRAP_GEN", 1, argc, argv); in wpa_cli_cmd_dpp_bootstrap_gen()
3076 static int wpa_cli_cmd_dpp_bootstrap_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_bootstrap_remove() argument
3079 return wpa_cli_cmd(ctrl, "DPP_BOOTSTRAP_REMOVE", 1, argc, argv); in wpa_cli_cmd_dpp_bootstrap_remove()
3083 static int wpa_cli_cmd_dpp_bootstrap_get_uri(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_bootstrap_get_uri() argument
3086 return wpa_cli_cmd(ctrl, "DPP_BOOTSTRAP_GET_URI", 1, argc, argv); in wpa_cli_cmd_dpp_bootstrap_get_uri()
3090 static int wpa_cli_cmd_dpp_bootstrap_info(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_bootstrap_info() argument
3093 return wpa_cli_cmd(ctrl, "DPP_BOOTSTRAP_INFO", 1, argc, argv); in wpa_cli_cmd_dpp_bootstrap_info()
3097 static int wpa_cli_cmd_dpp_bootstrap_set(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_bootstrap_set() argument
3100 return wpa_cli_cmd(ctrl, "DPP_BOOTSTRAP_SET", 1, argc, argv); in wpa_cli_cmd_dpp_bootstrap_set()
3104 static int wpa_cli_cmd_dpp_auth_init(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_auth_init() argument
3107 return wpa_cli_cmd(ctrl, "DPP_AUTH_INIT", 1, argc, argv); in wpa_cli_cmd_dpp_auth_init()
3111 static int wpa_cli_cmd_dpp_listen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_listen() argument
3114 return wpa_cli_cmd(ctrl, "DPP_LISTEN", 1, argc, argv); in wpa_cli_cmd_dpp_listen()
3118 static int wpa_cli_cmd_dpp_stop_listen(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_stop_listen() argument
3121 return wpa_ctrl_command(ctrl, "DPP_STOP_LISTEN"); in wpa_cli_cmd_dpp_stop_listen()
3125 static int wpa_cli_cmd_dpp_configurator_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_configurator_add() argument
3128 return wpa_cli_cmd(ctrl, "DPP_CONFIGURATOR_ADD", 0, argc, argv); in wpa_cli_cmd_dpp_configurator_add()
3132 static int wpa_cli_cmd_dpp_configurator_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_configurator_remove() argument
3135 return wpa_cli_cmd(ctrl, "DPP_CONFIGURATOR_REMOVE", 1, argc, argv); in wpa_cli_cmd_dpp_configurator_remove()
3139 static int wpa_cli_cmd_dpp_configurator_get_key(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_configurator_get_key() argument
3142 return wpa_cli_cmd(ctrl, "DPP_CONFIGURATOR_GET_KEY", 1, argc, argv); in wpa_cli_cmd_dpp_configurator_get_key()
3146 static int wpa_cli_cmd_dpp_configurator_sign(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_configurator_sign() argument
3149 return wpa_cli_cmd(ctrl, "DPP_CONFIGURATOR_SIGN", 1, argc, argv); in wpa_cli_cmd_dpp_configurator_sign()
3153 static int wpa_cli_cmd_dpp_pkex_add(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_pkex_add() argument
3156 return wpa_cli_cmd(ctrl, "DPP_PKEX_ADD", 1, argc, argv); in wpa_cli_cmd_dpp_pkex_add()
3160 static int wpa_cli_cmd_dpp_pkex_remove(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_pkex_remove() argument
3163 return wpa_cli_cmd(ctrl, "DPP_PKEX_REMOVE", 1, argc, argv); in wpa_cli_cmd_dpp_pkex_remove()
3169 static int wpa_cli_cmd_dpp_controller_start(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_controller_start() argument
3172 return wpa_cli_cmd(ctrl, "DPP_CONTROLLER_START", 0, argc, argv); in wpa_cli_cmd_dpp_controller_start()
3176 static int wpa_cli_cmd_dpp_controller_stop(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_controller_stop() argument
3179 return wpa_ctrl_command(ctrl, "DPP_CONTROLLER_STOP"); in wpa_cli_cmd_dpp_controller_stop()
3183 static int wpa_cli_cmd_dpp_chirp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_chirp() argument
3186 return wpa_cli_cmd(ctrl, "DPP_CHIRP", 1, argc, argv); in wpa_cli_cmd_dpp_chirp()
3190 static int wpa_cli_cmd_dpp_stop_chirp(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_stop_chirp() argument
3193 return wpa_ctrl_command(ctrl, "DPP_STOP_CHIRP"); in wpa_cli_cmd_dpp_stop_chirp()
3200 static int wpa_cli_cmd_dpp_push_button(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_dpp_push_button() argument
3203 return wpa_cli_cmd(ctrl, "DPP_PUSH_BUTTON", 0, argc, argv); in wpa_cli_cmd_dpp_push_button()
3209 static int wpa_ctrl_command_bss(struct wpa_ctrl *ctrl, const char *cmd) in wpa_ctrl_command_bss() argument
3219 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, in wpa_ctrl_command_bss()
3260 static int wpa_cli_cmd_all_bss(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_all_bss() argument
3277 id = wpa_ctrl_command_bss(ctrl, cmd); in wpa_cli_cmd_all_bss()
3286 static int wpa_cli_cmd_pasn_start(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pasn_start() argument
3288 return wpa_cli_cmd(ctrl, "PASN_START", 4, argc, argv); in wpa_cli_cmd_pasn_start()
3292 static int wpa_cli_cmd_pasn_stop(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_pasn_stop() argument
3294 return wpa_cli_cmd(ctrl, "PASN_STOP", 0, argc, argv); in wpa_cli_cmd_pasn_stop()
3298 static int wpa_cli_cmd_ptksa_cache_list(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_ptksa_cache_list() argument
3301 return wpa_cli_cmd(ctrl, "PTKSA_CACHE_LIST", 0, argc, argv); in wpa_cli_cmd_ptksa_cache_list()
3305 static int wpa_cli_cmd_pasn_deauth(struct wpa_ctrl *ctrl, int argc, in wpa_cli_cmd_pasn_deauth() argument
3308 return wpa_cli_cmd(ctrl, "PASN_DEAUTH", 1, argc, argv); in wpa_cli_cmd_pasn_deauth()
3314 static int wpa_cli_cmd_mscs(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_mscs() argument
3316 return wpa_cli_cmd(ctrl, "MSCS", 1, argc, argv); in wpa_cli_cmd_mscs()
3320 static int wpa_cli_cmd_scs(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_scs() argument
3322 return wpa_cli_cmd(ctrl, "SCS", 2, argc, argv); in wpa_cli_cmd_scs()
3326 static int wpa_cli_cmd_dscp_resp(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_dscp_resp() argument
3328 return wpa_cli_cmd(ctrl, "DSCP_RESP", 1, argc, argv); in wpa_cli_cmd_dscp_resp()
3332 static int wpa_cli_cmd_dscp_query(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_cli_cmd_dscp_query() argument
3334 return wpa_cli_cmd(ctrl, "DSCP_QUERY", 1, argc, argv); in wpa_cli_cmd_dscp_query()
3345 int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
4230 static int wpa_request(struct wpa_ctrl *ctrl, int argc, char *argv[]) in wpa_request() argument
4278 ret = match->handler(ctrl, argc - 1, &argv[1]); in wpa_request()
4613 static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl, int action_monitor) in wpa_cli_recv_pending() argument
4619 while (wpa_ctrl_pending(ctrl) > 0) { in wpa_cli_recv_pending()
4622 if (wpa_ctrl_recv(ctrl, buf, &len) == 0) { in wpa_cli_recv_pending()
4643 if (wpa_ctrl_pending(ctrl) < 0) { in wpa_cli_recv_pending()
4735 static void update_bssid_list(struct wpa_ctrl *ctrl) in update_bssid_list() argument
4743 if (ctrl == NULL) in update_bssid_list()
4745 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, NULL); in update_bssid_list()
4766 static void update_ifnames(struct wpa_ctrl *ctrl) in update_ifnames() argument
4777 if (ctrl == NULL) in update_ifnames()
4779 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, NULL); in update_ifnames()
4798 static void update_creds(struct wpa_ctrl *ctrl) in update_creds() argument
4809 if (ctrl == NULL) in update_creds()
4811 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, NULL); in update_creds()
4830 static void update_networks(struct wpa_ctrl *ctrl) in update_networks() argument
4841 if (ctrl == NULL) in update_networks()
4843 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len, NULL); in update_networks()
4862 static void update_stations(struct wpa_ctrl *ctrl) in update_stations() argument
4867 if (!ctrl || !interactive) in update_stations()
4872 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 0)) in update_stations()
4878 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 0) == 0); in update_stations()
4939 struct wpa_ctrl *ctrl = eloop_ctx; in wpa_cli_action_ping() local
4945 if (wpa_ctrl_request(ctrl, "PING", 4, buf, &len, in wpa_cli_action_ping()
4953 ctrl, NULL); in wpa_cli_action_ping()
4959 struct wpa_ctrl *ctrl = eloop_ctx; in wpa_cli_action_receive() local
4961 wpa_cli_recv_pending(ctrl, 1); in wpa_cli_action_receive()
4965 static void wpa_cli_action(struct wpa_ctrl *ctrl) in wpa_cli_action() argument
4973 fd = wpa_ctrl_get_fd(ctrl); in wpa_cli_action()
4975 ctrl, NULL); in wpa_cli_action()
4976 eloop_register_read_sock(fd, wpa_cli_action_receive, ctrl, NULL); in wpa_cli_action()
4978 eloop_cancel_timeout(wpa_cli_action_ping, ctrl, NULL); in wpa_cli_action()
5045 struct wpa_ctrl *ctrl; in wpa_cli_get_default_ifname() local
5048 ctrl = wpa_ctrl_open(NULL); in wpa_cli_get_default_ifname()
5049 if (ctrl == NULL) in wpa_cli_get_default_ifname()
5053 ret = wpa_ctrl_request(ctrl, "INTERFACES", 10, buf, &len, NULL); in wpa_cli_get_default_ifname()
5061 wpa_ctrl_close(ctrl); in wpa_cli_get_default_ifname()