Lines Matching defs:ctrl
107 printf("wpa_cli [-p<path to ctrl sockets>] [-i<ifname>] [-hvB] "
109 " [-P<pid file>] [-g<global ctrl>] [-G<ping interval>] "
404 static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, char *cmd, int print)
434 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len,
453 static int wpa_ctrl_command(struct wpa_ctrl *ctrl, char *cmd)
455 return _wpa_ctrl_command(ctrl, cmd, 1);
489 static int wpa_cli_cmd(struct wpa_ctrl *ctrl, const char *cmd, int min_args,
501 return wpa_ctrl_command(ctrl, buf);
505 static int wpa_cli_cmd_ifname(struct wpa_ctrl *ctrl, int argc, char *argv[])
507 return wpa_ctrl_command(ctrl, "IFNAME");
511 static int wpa_cli_cmd_status(struct wpa_ctrl *ctrl, int argc, char *argv[])
514 return wpa_ctrl_command(ctrl, "STATUS-VERBOSE");
516 return wpa_ctrl_command(ctrl, "STATUS-WPS");
517 return wpa_ctrl_command(ctrl, "STATUS");
521 static int wpa_cli_cmd_ping(struct wpa_ctrl *ctrl, int argc, char *argv[])
523 return wpa_ctrl_command(ctrl, "PING");
527 static int wpa_cli_cmd_relog(struct wpa_ctrl *ctrl, int argc, char *argv[])
529 return wpa_ctrl_command(ctrl, "RELOG");
533 static int wpa_cli_cmd_note(struct wpa_ctrl *ctrl, int argc, char *argv[])
535 return wpa_cli_cmd(ctrl, "NOTE", 1, argc, argv);
539 static int wpa_cli_cmd_mib(struct wpa_ctrl *ctrl, int argc, char *argv[])
541 return wpa_ctrl_command(ctrl, "MIB");
545 static int wpa_cli_cmd_pmksa(struct wpa_ctrl *ctrl, int argc, char *argv[])
547 return wpa_ctrl_command(ctrl, "PMKSA");
551 static int wpa_cli_cmd_help(struct wpa_ctrl *ctrl, int argc, char *argv[])
573 static int wpa_cli_cmd_license(struct wpa_ctrl *ctrl, int argc, char *argv[])
580 static int wpa_cli_cmd_quit(struct wpa_ctrl *ctrl, int argc, char *argv[])
609 static int wpa_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[])
634 return wpa_ctrl_command(ctrl, cmd);
638 static int wpa_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[])
640 return wpa_cli_cmd(ctrl, "GET", 1, argc, argv);
644 static int wpa_cli_cmd_logoff(struct wpa_ctrl *ctrl, int argc, char *argv[])
646 return wpa_ctrl_command(ctrl, "LOGOFF");
650 static int wpa_cli_cmd_logon(struct wpa_ctrl *ctrl, int argc, char *argv[])
652 return wpa_ctrl_command(ctrl, "LOGON");
656 static int wpa_cli_cmd_reassociate(struct wpa_ctrl *ctrl, int argc,
659 return wpa_ctrl_command(ctrl, "REASSOCIATE");
663 static int wpa_cli_cmd_preauthenticate(struct wpa_ctrl *ctrl, int argc,
666 return wpa_cli_cmd(ctrl, "PREAUTH", 1, argc, argv);
670 static int wpa_cli_cmd_ap_scan(struct wpa_ctrl *ctrl, int argc, char *argv[])
672 return wpa_cli_cmd(ctrl, "AP_SCAN", 1, argc, argv);
676 static int wpa_cli_cmd_scan_interval(struct wpa_ctrl *ctrl, int argc,
679 return wpa_cli_cmd(ctrl, "SCAN_INTERVAL", 1, argc, argv);
683 static int wpa_cli_cmd_bss_expire_age(struct wpa_ctrl *ctrl, int argc,
686 return wpa_cli_cmd(ctrl, "BSS_EXPIRE_AGE", 1, argc, argv);
690 static int wpa_cli_cmd_bss_expire_count(struct wpa_ctrl *ctrl, int argc,
693 return wpa_cli_cmd(ctrl
697 static int wpa_cli_cmd_bss_flush(struct wpa_ctrl *ctrl, int argc, char *argv[])
710 return wpa_ctrl_command(ctrl, cmd);
714 static int wpa_cli_cmd_stkstart(struct wpa_ctrl *ctrl, int argc,
717 return wpa_cli_cmd(ctrl, "STKSTART", 1, argc, argv);
721 static int wpa_cli_cmd_ft_ds(struct wpa_ctrl *ctrl, int argc, char *argv[])
723 return wpa_cli_cmd(ctrl, "FT_DS", 1, argc, argv);
727 static int wpa_cli_cmd_wps_pbc(struct wpa_ctrl *ctrl, int argc, char *argv[])
729 return wpa_cli_cmd(ctrl, "WPS_PBC", 0, argc, argv);
733 static int wpa_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc, char *argv[])
743 return wpa_cli_cmd(ctrl, "WPS_PIN", 1, argc, argv);
747 static int wpa_cli_cmd_wps_check_pin(struct wpa_ctrl *ctrl, int argc,
750 return wpa_cli_cmd(ctrl, "WPS_CHECK_PIN", 1, argc, argv);
754 static int wpa_cli_cmd_wps_cancel(struct wpa_ctrl *ctrl, int argc,
757 return wpa_ctrl_command(ctrl, "WPS_CANCEL");
763 static int wpa_cli_cmd_wps_nfc(struct wpa_ctrl *ctrl, int argc, char *argv[])
765 return wpa_cli_cmd(ctrl, "WPS_NFC", 0, argc, argv);
769 static int wpa_cli_cmd_wps_nfc_config_token(struct wpa_ctrl *ctrl, int argc,
772 return wpa_cli_cmd(ctrl, "WPS_NFC_CONFIG_TOKEN", 1, argc, argv);
776 static int wpa_cli_cmd_wps_nfc_token(struct wpa_ctrl *ctrl, int argc,
779 return wpa_cli_cmd(ctrl, "WPS_NFC_TOKEN", 1, argc, argv);
783 static int wpa_cli_cmd_wps_nfc_tag_read(struct wpa_ctrl *ctrl, int argc,
802 ret = wpa_ctrl_command(ctrl, buf);
809 static int wpa_cli_cmd_nfc_get_handover_req(struct wpa_ctrl *ctrl, int argc,
812 return wpa_cli_cmd(ctrl, "NFC_GET_HANDOVER_REQ", 2, argc, argv);
816 static int wpa_cli_cmd_nfc_get_handover_sel(struct wpa_ctrl *ctrl, int argc,
819 return wpa_cli_cmd(ctrl, "NFC_GET_HANDOVER_SEL", 2, argc, argv);
823 static int wpa_cli_cmd_nfc_rx_handover_req(struct wpa_ctrl *ctrl, int argc,
842 ret = wpa_ctrl_command(ctrl, buf);
849 static int wpa_cli_cmd_nfc_rx_handover_sel(struct wpa_ctrl *ctrl, int argc,
868 ret = wpa_ctrl_command(ctrl, buf);
875 static int wpa_cli_cmd_nfc_report_handover(struct wpa_ctrl *ctrl, int argc,
878 return wpa_cli_cmd(ctrl, "NFC_REPORT_HANDOVER", 4, argc, argv);
884 static int wpa_cli_cmd_wps_reg(struct wpa_ctrl *ctrl, int argc, char *argv[])
937 return wpa_ctrl_command(ctrl, cmd);
941 static int wpa_cli_cmd_wps_ap_pin(struct wpa_ctrl *ctrl, int argc,
944 return wpa_cli_cmd(ctrl, "WPS_AP_PIN", 1, argc, argv);
948 static int wpa_cli_cmd_wps_er_start(struct wpa_ctrl *ctrl, int argc,
951 return wpa_cli_cmd(ctrl, "WPS_ER_START", 0, argc, argv);
955 static int wpa_cli_cmd_wps_er_stop(struct wpa_ctrl *ctrl, int argc,
958 return wpa_ctrl_command(ctrl, "WPS_ER_STOP");
963 static int wpa_cli_cmd_wps_er_pin(struct wpa_ctrl *ctrl, int argc,
975 return wpa_cli_cmd(ctrl, "WPS_ER_PIN", 2, argc, argv);
979 static int wpa_cli_cmd_wps_er_pbc(struct wpa_ctrl *ctrl, int argc,
982 return wpa_cli_cmd(ctrl, "WPS_ER_PBC", 1, argc, argv);
986 static int wpa_cli_cmd_wps_er_learn(struct wpa_ctrl *ctrl, int argc,
996 return wpa_cli_cmd(ctrl, "WPS_ER_LEARN", 2, argc, argv);
1000 static int wpa_cli_cmd_wps_er_set_config(struct wpa_ctrl *ctrl, int argc,
1011 return wpa_cli_cmd(ctrl, "WPS_ER_SET_CONFIG", 2, argc, argv);
1015 static int wpa_cli_cmd_wps_er_config(struct wpa_ctrl *ctrl, int argc,
1062 return wpa_ctrl_command(ctrl, cmd);
1067 static int wpa_cli_cmd_wps_er_nfc_config_token(struct wpa_ctrl *ctrl, int argc,
1078 return wpa_cli_cmd(ctrl, "WPS_ER_NFC_CONFIG_TOKEN", 2, argc, argv);
1083 static int wpa_cli_cmd_ibss_rsn(struct wpa_ctrl *ctrl, int argc, char *argv[])
1085 return wpa_cli_cmd(ctrl, "IBSS_RSN", 1, argc, argv);
1089 static int wpa_cli_cmd_level(struct wpa_ctrl *ctrl, int argc, char *argv[])
1091 return wpa_cli_cmd(ctrl, "LEVEL", 1, argc, argv);
1095 static int wpa_cli_cmd_identity(struct wpa_ctrl *ctrl, int argc, char *argv[])
1124 return wpa_ctrl_command(ctrl, cmd);
1128 static int wpa_cli_cmd_password(struct wpa_ctrl *ctrl, int argc, char *argv[])
1157 return wpa_ctrl_command(ctrl, cmd);
1161 static int wpa_cli_cmd_new_password(struct wpa_ctrl *ctrl, int argc,
1191 return wpa_ctrl_command(ctrl, cmd);
1195 static int wpa_cli_cmd_pin(struct wpa_ctrl *ctrl, int argc, char *argv[])
1223 return wpa_ctrl_command(ctrl, cmd);
1227 static int wpa_cli_cmd_otp(struct wpa_ctrl *ctrl, int argc, char *argv[])
1256 return wpa_ctrl_command(ctrl, cmd);
1260 static int wpa_cli_cmd_passphrase(struct wpa_ctrl *ctrl, int argc,
1290 return wpa_ctrl_command(ctrl, cmd);
1294 static int wpa_cli_cmd_bssid(struct wpa_ctrl *ctrl, int argc, char *argv[])
1302 return wpa_cli_cmd(ctrl, "BSSID", 2, argc, argv);
1306 static int wpa_cli_cmd_blacklist(struct wpa_ctrl *ctrl, int argc, char *argv[])
1308 return wpa_cli_cmd(ctrl, "BLACKLIST", 0, argc, argv);
1312 static int wpa_cli_cmd_log_level(struct wpa_ctrl *ctrl, int argc, char *argv[])
1314 return wpa_cli_cmd(ctrl, "LOG_LEVEL", 0, argc, argv);
1318 static int wpa_cli_cmd_list_networks(struct wpa_ctrl *ctrl, int argc,
1321 return wpa_ctrl_command(ctrl, "LIST_NETWORKS");
1325 static int wpa_cli_cmd_select_network(struct wpa_ctrl *ctrl, int argc,
1328 return wpa_cli_cmd(ctrl, "SELECT_NETWORK", 1, argc, argv);
1332 static int wpa_cli_cmd_enable_network(struct wpa_ctrl *ctrl, int argc,
1335 return wpa_cli_cmd(ctrl, "ENABLE_NETWORK", 1, argc, argv);
1339 static int wpa_cli_cmd_disable_network(struct wpa_ctrl *ctrl, int argc,
1342 return wpa_cli_cmd(ctrl, "DISABLE_NETWORK", 1, argc, argv);
1346 static int wpa_cli_cmd_add_network(struct wpa_ctrl *ctrl, int argc,
1349 return wpa_ctrl_command(ctrl, "ADD_NETWORK");
1353 static int wpa_cli_cmd_remove_network(struct wpa_ctrl *ctrl, int argc,
1356 return wpa_cli_cmd(ctrl, "REMOVE_NETWORK", 1, argc, argv);
1381 static int wpa_cli_cmd_set_network(struct wpa_ctrl *ctrl, int argc,
1395 return wpa_cli_cmd(ctrl, "SET_NETWORK", 3, argc, argv);
1399 static int wpa_cli_cmd_get_network(struct wpa_ctrl *ctrl, int argc,
1413 return wpa_cli_cmd(ctrl, "GET_NETWORK", 2, argc, argv);
1417 static int wpa_cli_cmd_list_creds(struct wpa_ctrl *ctrl, int argc,
1420 return wpa_ctrl_command(ctrl, "LIST_CREDS");
1424 ctrl, int argc, char *argv[])
1426 return wpa_ctrl_command(ctrl, "ADD_CRED");
1430 static int wpa_cli_cmd_remove_cred(struct wpa_ctrl *ctrl, int argc,
1433 return wpa_cli_cmd(ctrl, "REMOVE_CRED", 1, argc, argv);
1437 static int wpa_cli_cmd_set_cred(struct wpa_ctrl *ctrl, int argc, char *argv[])
1445 return wpa_cli_cmd(ctrl, "SET_CRED", 3, argc, argv);
1449 static int wpa_cli_cmd_disconnect(struct wpa_ctrl *ctrl, int argc,
1452 return wpa_ctrl_command(ctrl, "DISCONNECT");
1456 static int wpa_cli_cmd_reconnect(struct wpa_ctrl *ctrl, int argc,
1459 return wpa_ctrl_command(ctrl, "RECONNECT");
1463 static int wpa_cli_cmd_save_config(struct wpa_ctrl *ctrl, int argc,
1466 return wpa_ctrl_command(ctrl, "SAVE_CONFIG");
1470 static int wpa_cli_cmd_scan(struct wpa_ctrl *ctrl, int argc, char *argv[])
1472 return wpa_cli_cmd(ctrl, "SCAN", 0, argc, argv);
1476 static int wpa_cli_cmd_scan_results(struct wpa_ctrl *ctrl, int argc,
1479 return wpa_ctrl_command(ctrl, "SCAN_RESULTS");
1483 static int wpa_cli_cmd_bss(struct wpa_ctrl *ctrl, int argc, char *argv[])
1485 return wpa_cli_cmd(ctrl, "BSS", 1, argc, argv);
1504 static int wpa_cli_cmd_get_capability(struct wpa_ctrl *ctrl, int argc,
1519 return wpa_cli_cmd(ctrl, "GET_CAPABILITY", 1, argc, argv);
1523 static int wpa_cli_list_interfaces(struct wpa_ctrl *ctrl)
1526 return wpa_ctrl_command(ctrl, "INTERFACES");
1530 static int wpa_cli_cmd_interface(struct wpa_ctrl *ctrl, int argc, char *argv[])
1533 wpa_cli_list_interfaces(ctrl);
1551 static int wpa_cli_cmd_reconfigure(struct wpa_ctrl *ctrl, int argc,
1554 return wpa_ctrl_command(ctrl, "RECONFIGURE");
1558 static int wpa_cli_cmd_terminate(struct wpa_ctrl *ctrl, int argc,
1561 return wpa_ctrl_command(ctrl, "TERMINATE");
1565 static int wpa_cli_cmd_interface_add(struct wpa_ctrl *ctrl, int argc,
1592 return wpa_ctrl_command(ctrl, cmd);
1596 static int wpa_cli_cmd_interface_remove(struct wpa_ctrl *ctrl, int argc,
1599 return wpa_cli_cmd(ctrl, "INTERFACE_REMOVE", 1, argc, argv);
1603 static int wpa_cli_cmd_interface_list(struct wpa_ctrl *ctrl, int argc,
1606 return wpa_ctrl_command(ctrl, "INTERFACE_LIST");
1611 static int wpa_cli_cmd_sta(struct wpa_ctrl *ctrl, int argc, char *argv[])
1613 return wpa_cli_cmd(ctrl, "STA", 1, argc, argv);
1617 static int wpa_ctrl_command_sta(struct wpa_ctrl *ctrl, char *cmd,
1629 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len,
1653 static int wpa_cli_cmd_all_sta(struct wpa_ctrl *ctrl, int argc, char *argv[])
1657 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr)))
1661 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr)) == 0);
1667 static int wpa_cli_cmd_deauthenticate(struct wpa_ctrl *ctrl, int argc,
1670 return wpa_cli_cmd(ctrl, "DEAUTHENTICATE", 1, argc, argv);
1674 static int wpa_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc,
1677 return wpa_cli_cmd(ctrl, "DISASSOCIATE", 1, argc, argv);
1682 static int wpa_cli_cmd_suspend(struct wpa_ctrl *ctrl, int argc, char *argv[])
1684 return wpa_ctrl_command(ctrl, "SUSPEND");
1688 static int wpa_cli_cmd_resume(struct wpa_ctrl *ctrl, int argc, char *argv[])
1690 return wpa_ctrl_command(ctrl, "RESUME");
1694 static int wpa_cli_cmd_drop_sa(struct wpa_ctrl *ctrl, int argc, char *argv[])
1696 return wpa_ctrl_command(ctrl, "DROP_SA");
1700 static int wpa_cli_cmd_roam(struct wpa_ctrl *ctrl, int argc, char *argv[])
1702 return wpa_cli_cmd(ctrl, "ROAM", 1, argc, argv);
1708 static int wpa_cli_cmd_p2p_find(struct wpa_ctrl *ctrl, int argc, char *argv[])
1710 return wpa_cli_cmd(ctrl, "P2P_FIND", 0, argc, argv);
1743 static int wpa_cli_cmd_p2p_stop_find(struct wpa_ctrl *ctrl, int argc,
1746 return wpa_ctrl_command(ctrl, "P2P_STOP_FIND");
1750 static int wpa_cli_cmd_p2p_connect(struct wpa_ctrl *ctrl, int argc,
1753 return wpa_cli_cmd(ctrl, "P2P_CONNECT", 2, argc, argv);
1772 static int wpa_cli_cmd_p2p_listen(struct wpa_ctrl *ctrl, int argc,
1775 return wpa_cli_cmd(ctrl, "P2P_LISTEN", 0, argc, argv);
1779 static int wpa_cli_cmd_p2p_group_remove(struct wpa_ctrl *ctrl, int argc,
1782 return wpa_cli_cmd(ctrl, "P2P_GROUP_REMOVE", 1, argc, argv);
1801 static int wpa_cli_cmd_p2p_group_add(struct wpa_ctrl *ctrl, int argc,
1804 return wpa_cli_cmd(ctrl, "P2P_GROUP_ADD", 0, argc, argv);
1808 static int wpa_cli_cmd_p2p_prov_disc(struct wpa_ctrl *ctrl, int argc,
1818 return wpa_cli_cmd(ctrl, "P2P_PROV_DISC", 2, argc, argv);
1822 static int wpa_cli_cmd_p2p_get_passphrase(struct wpa_ctrl *ctrl, int argc,
1825 return wpa_ctrl_command(ctrl, "P2P_GET_PASSPHRASE");
1829 static int wpa_cli_cmd_p2p_serv_disc_req(struct wpa_ctrl *ctrl, int argc,
1844 return wpa_ctrl_command(ctrl, cmd);
1848 static int wpa_cli_cmd_p2p_serv_disc_cancel_req(struct wpa_ctrl *ctrl,
1851 return wpa_cli_cmd(ctrl, "P2P_SERV_DISC_CANCEL_REQ", 1, argc, argv);
1855 static int wpa_cli_cmd_p2p_serv_disc_resp(struct wpa_ctrl *ctrl, int argc,
1872 return wpa_ctrl_command(ctrl, cmd);
1876 static int wpa_cli_cmd_p2p_service_update(struct wpa_ctrl *ctrl, int argc,
1879 return wpa_ctrl_command(ctrl, "P2P_SERVICE_UPDATE");
1883 static int wpa_cli_cmd_p2p_serv_disc_external(struct wpa_ctrl *ctrl,
1886 return wpa_cli_cmd(ctrl, "P2P_SERV_DISC_EXTERNAL", 1, argc, argv);
1890 static int wpa_cli_cmd_p2p_service_flush(struct wpa_ctrl *ctrl, int argc,
1893 return wpa_ctrl_command(ctrl, "P2P_SERVICE_FLUSH");
1897 static int wpa_cli_cmd_p2p_service_add(struct wpa_ctrl *ctrl, int argc,
1920 return wpa_ctrl_command(ctrl, cmd);
1924 static int wpa_cli_cmd_p2p_service_del(struct wpa_ctrl *ctrl, int argc,
1947 return wpa_ctrl_command(ctrl, cmd);
1951 static int wpa_cli_cmd_p2p_reject(struct wpa_ctrl *ctrl,
1954 return wpa_cli_cmd(ctrl, "P2P_REJECT", 1, argc, argv);
1958 static int wpa_cli_cmd_p2p_invite(struct wpa_ctrl *ctrl,
1961 return wpa_cli_cmd(ctrl, "P2P_INVITE", 1, argc, argv);
1965 static int wpa_cli_cmd_p2p_peer(struct wpa_ctrl *ctrl, int argc, char *argv[])
1967 return wpa_cli_cmd(ctrl, "P2P_PEER", 1, argc, argv);
1986 static int wpa_ctrl_command_p2p_peer(struct wpa_ctrl *ctrl, char *cmd,
1997 ret = wpa_ctrl_request(ctrl, cmd, os_strlen(cmd), buf, &len,
2022 static int wpa_cli_cmd_p2p_peers(struct wpa_ctrl *ctrl, int argc, char *argv[])
2029 if (wpa_ctrl_command_p2p_peer(ctrl, "P2P_PEER FIRST",
2034 } while (wpa_ctrl_command_p2p_peer(ctrl, cmd, addr, sizeof(addr),
2041 static int wpa_cli_cmd_p2p_set(struct wpa_ctrl *ctrl, int argc, char *argv[])
2043 return wpa_cli_cmd(ctrl, "P2P_SET", 2, argc, argv);
2047 static int wpa_cli_cmd_p2p_flush(struct wpa_ctrl *ctrl, int argc, char *argv[])
2049 return wpa_ctrl_command(ctrl, "P2P_FLUSH");
2053 static int wpa_cli_cmd_p2p_cancel(struct wpa_ctrl *ctrl, int argc,
2056 return wpa_ctrl_command(ctrl, "P2P_CANCEL");
2060 static int wpa_cli_cmd_p2p_unauthorize(struct wpa_ctrl *ctrl, int argc,
2063 return wpa_cli_cmd(ctrl, "P2P_UNAUTHORIZE", 1, argc, argv);
2067 static int wpa_cli_cmd_p2p_presence_req(struct wpa_ctrl *ctrl, int argc,
2078 return wpa_cli_cmd(ctrl, "P2P_PRESENCE_REQ", 0, argc, argv);
2082 static int wpa_cli_cmd_p2p_ext_listen(struct wpa_ctrl *ctrl, int argc,
2094 return wpa_cli_cmd(ctrl, "P2P_EXT_LISTEN", 0, argc, argv);
2101 static int wpa_cli_cmd_wfd_subelem_set(struct wpa_ctrl *ctrl, int argc,
2118 return wpa_ctrl_command(ctrl, cmd);
2122 static int wpa_cli_cmd_wfd_subelem_get(struct wpa_ctrl *ctrl, int argc,
2139 return wpa_ctrl_command(ctrl, cmd);
2145 static int wpa_cli_cmd_fetch_anqp(struct wpa_ctrl *ctrl, int argc,
2148 return wpa_ctrl_command(ctrl, "FETCH_ANQP");
2152 static int wpa_cli_cmd_stop_fetch_anqp(struct wpa_ctrl *ctrl, int argc,
2155 return wpa_ctrl_command(ctrl, "STOP_FETCH_ANQP");
2159 ctrl, int argc,
2162 return wpa_cli_cmd(ctrl, "INTERWORKING_SELECT", 0, argc, argv);
2166 static int wpa_cli_cmd_interworking_connect(struct wpa_ctrl *ctrl, int argc,
2169 return wpa_cli_cmd(ctrl, "INTERWORKING_CONNECT", 1, argc, argv);
2173 static int wpa_cli_cmd_anqp_get(struct wpa_ctrl *ctrl, int argc, char *argv[])
2175 return wpa_cli_cmd(ctrl, "ANQP_GET", 2, argc, argv);
2179 static int wpa_cli_cmd_gas_request(struct wpa_ctrl *ctrl, int argc,
2182 return wpa_cli_cmd(ctrl, "GAS_REQUEST", 2, argc, argv);
2186 static int wpa_cli_cmd_gas_response_get(struct wpa_ctrl *ctrl, int argc,
2189 return wpa_cli_cmd(ctrl, "GAS_RESPONSE_GET", 2, argc, argv);
2196 static int wpa_cli_cmd_hs20_anqp_get(struct wpa_ctrl *ctrl, int argc,
2199 return wpa_cli_cmd(ctrl, "HS20_ANQP_GET", 2, argc, argv);
2203 static int wpa_cli_cmd_get_nai_home_realm_list(struct wpa_ctrl *ctrl, int argc,
2218 return wpa_ctrl_command(ctrl, cmd);
2224 static int wpa_cli_cmd_sta_autoconnect(struct wpa_ctrl *ctrl, int argc,
2227 return wpa_cli_cmd(ctrl, "STA_AUTOCONNECT", 1, argc, argv);
2231 static int wpa_cli_cmd_tdls_discover(struct wpa_ctrl *ctrl, int argc,
2234 return wpa_cli_cmd(ctrl, "TDLS_DISCOVER", 1, argc, argv);
2238 static int wpa_cli_cmd_tdls_setup(struct wpa_ctrl *ctrl, int argc,
2241 return wpa_cli_cmd(ctrl, "TDLS_SETUP", 1, argc, argv);
2245 static int wpa_cli_cmd_tdls_teardown(struct wpa_ctrl *ctrl, int argc,
2248 return wpa_cli_cmd(ctrl, "TDLS_TEARDOWN", 1, argc, argv);
2252 static int wpa_cli_cmd_signal_poll(struct wpa_ctrl *ctrl, int argc,
2255 return wpa_ctrl_command(ctrl, "SIGNAL_POLL");
2259 static int wpa_cli_cmd_pktcnt_poll(struct wpa_ctrl *ctrl, int argc,
2262 return wpa_ctrl_command(ctrl, "PKTCNT_POLL");
2266 static int wpa_cli_cmd_reauthenticate(struct wpa_ctrl *ctrl, int argc,
2269 return wpa_ctrl_command(ctrl, "REAUTHENTICATE");
2275 static int wpa_cli_cmd_autoscan(struct wpa_ctrl *ctrl, int argc, char *argv[])
2278 return wpa_ctrl_command(ctrl, "AUTOSCAN ");
2280 return wpa_cli_cmd(ctrl, "AUTOSCAN", 0, argc, argv);
2288 static int wpa_cli_cmd_wnm_sleep(struct wpa_ctrl *ctrl, int argc, char *argv[])
2290 return wpa_cli_cmd(ctrl, "WNM_SLEEP", 0, argc, argv);
2296 static int wpa_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[])
2300 return wpa_cli_cmd(ctrl, argv[0], 0, argc - 1, &argv[1]);
2305 static int wpa_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[])
2321 return wpa_ctrl_command(ctrl, cmd);
2326 static int wpa_cli_cmd_flush(struct wpa_ctrl *ctrl, int argc, char *argv[])
2328 return wpa_ctrl_command(ctrl, "FLUSH");
2339 int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
2902 static int wpa_request(struct wpa_ctrl *ctrl, int argc, char *argv[])
2943 ret = match->handler(ctrl, argc - 2, &argv[2]);
2947 ret = match->handler(ctrl, argc - 1, &argv[1]);
3186 static void wpa_cli_recv_pending(struct wpa_ctrl *ctrl, int action_monitor)
3192 while (wpa_ctrl_pending(ctrl) > 0) {
3195 if (wpa_ctrl_recv(ctrl, buf, &len) == 0) {
3216 if (wpa_ctrl_pending(ctrl) < 0) {
3364 static void wpa_cli_action(struct wpa_ctrl *ctrl)
3376 fd = wpa_ctrl_get_fd(ctrl);
3390 wpa_cli_recv_pending(ctrl, 1);
3394 if (wpa_ctrl_request(ctrl, "PING", 4, buf, &len,
3464 struct wpa_ctrl *ctrl;
3467 ctrl = wpa_ctrl_open(NULL);
3468 if (ctrl == NULL)
3472 ret = wpa_ctrl_request(ctrl, "INTERFACES", 10, buf, &len, NULL);
3480 wpa_ctrl_close(ctrl);