Lines Matching refs:ctrl

48 static void update_stations(struct wpa_ctrl *ctrl);
79 static void register_event_handler(struct wpa_ctrl *ctrl)
85 !eloop_register_read_sock(wpa_ctrl_get_fd(ctrl),
92 static void unregister_event_handler(struct wpa_ctrl *ctrl)
97 eloop_unregister_read_sock(wpa_ctrl_get_fd(ctrl));
190 static int _wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd, int print)
201 ret = wpa_ctrl_request(ctrl, cmd, strlen(cmd), buf, &len,
218 static inline int wpa_ctrl_command(struct wpa_ctrl *ctrl, const char *cmd)
220 return _wpa_ctrl_command(ctrl, cmd, 1);
224 static int hostapd_cli_cmd(struct wpa_ctrl *ctrl, const char *cmd,
236 return wpa_ctrl_command(ctrl, buf);
240 static int hostapd_cli_cmd_ping(struct wpa_ctrl *ctrl, int argc, char *argv[])
242 return wpa_ctrl_command(ctrl, "PING");
246 static int hostapd_cli_cmd_relog(struct wpa_ctrl *ctrl, int argc, char *argv[])
248 return wpa_ctrl_command(ctrl, "RELOG");
252 static int hostapd_cli_cmd_status(struct wpa_ctrl *ctrl, int argc, char *argv[])
255 return wpa_ctrl_command(ctrl, "STATUS-DRIVER");
256 return wpa_ctrl_command(ctrl, "STATUS");
260 static int hostapd_cli_cmd_mib(struct wpa_ctrl *ctrl, int argc, char *argv[])
265 return wpa_ctrl_command(ctrl, buf);
267 return wpa_ctrl_command(ctrl, "MIB");
307 static int hostapd_cli_cmd_sta(struct wpa_ctrl *ctrl, int argc, char *argv[])
319 return wpa_ctrl_command(ctrl, buf);
338 static int hostapd_cli_cmd_new_sta(struct wpa_ctrl *ctrl, int argc,
348 return wpa_ctrl_command(ctrl, buf);
352 static int hostapd_cli_cmd_deauthenticate(struct wpa_ctrl *ctrl, int argc,
366 return wpa_ctrl_command(ctrl, buf);
370 static int hostapd_cli_cmd_disassociate(struct wpa_ctrl *ctrl, int argc,
384 return wpa_ctrl_command(ctrl, buf);
389 static int hostapd_cli_cmd_signature(struct wpa_ctrl *ctrl, int argc,
399 return wpa_ctrl_command(ctrl, buf);
405 static int hostapd_cli_cmd_sa_query(struct wpa_ctrl *ctrl, int argc,
415 return wpa_ctrl_command(ctrl, buf);
421 static int hostapd_cli_cmd_wps_pin(struct wpa_ctrl *ctrl, int argc,
438 return wpa_ctrl_command(ctrl, buf);
442 static int hostapd_cli_cmd_wps_check_pin(struct wpa_ctrl *ctrl, int argc,
464 return wpa_ctrl_command(ctrl, cmd);
468 static int hostapd_cli_cmd_wps_pbc(struct wpa_ctrl *ctrl, int argc,
471 return wpa_ctrl_command(ctrl, "WPS_PBC");
475 static int hostapd_cli_cmd_wps_cancel(struct wpa_ctrl *ctrl, int argc,
478 return wpa_ctrl_command(ctrl, "WPS_CANCEL");
483 static int hostapd_cli_cmd_wps_nfc_tag_read(struct wpa_ctrl *ctrl, int argc,
502 ret = wpa_ctrl_command(ctrl, buf);
509 static int hostapd_cli_cmd_wps_nfc_config_token(struct wpa_ctrl *ctrl,
527 return wpa_ctrl_command(ctrl, cmd);
531 static int hostapd_cli_cmd_wps_nfc_token(struct wpa_ctrl *ctrl,
548 return wpa_ctrl_command(ctrl, cmd);
552 static int hostapd_cli_cmd_nfc_get_handover_sel(struct wpa_ctrl *ctrl,
570 return wpa_ctrl_command(ctrl, cmd);
576 static int hostapd_cli_cmd_wps_ap_pin(struct wpa_ctrl *ctrl, int argc,
593 return wpa_ctrl_command(ctrl, buf);
597 static int hostapd_cli_cmd_wps_get_status(struct wpa_ctrl *ctrl, int argc,
600 return wpa_ctrl_command(ctrl, "WPS_GET_STATUS");
604 static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc,
644 return wpa_ctrl_command(ctrl, buf);
649 static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc,
665 return wpa_ctrl_command(ctrl, buf);
669 static int hostapd_cli_cmd_ess_disassoc(struct wpa_ctrl *ctrl, int argc,
685 return wpa_ctrl_command(ctrl, buf);
689 static int hostapd_cli_cmd_bss_tm_req(struct wpa_ctrl *ctrl, int argc,
712 return wpa_ctrl_command(ctrl, buf);
716 static int hostapd_cli_cmd_get_config(struct wpa_ctrl *ctrl, int argc,
719 return wpa_ctrl_command(ctrl, "GET_CONFIG");
723 static int wpa_ctrl_command_sta(struct wpa_ctrl *ctrl, const char *cmd,
735 ret = wpa_ctrl_request(ctrl, cmd, strlen(cmd), buf, &len,
760 static int hostapd_cli_cmd_all_sta(struct wpa_ctrl *ctrl, int argc,
765 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 1))
769 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 1) == 0);
775 static int hostapd_cli_cmd_list_sta(struct wpa_ctrl *ctrl, int argc,
780 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 0))
786 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 0) == 0);
792 static int hostapd_cli_cmd_help(struct wpa_ctrl *ctrl, int argc, char *argv[])
814 static int hostapd_cli_cmd_license(struct wpa_ctrl *ctrl, int argc,
822 static int hostapd_cli_cmd_set_qos_map_set(struct wpa_ctrl *ctrl,
838 return wpa_ctrl_command(ctrl, buf);
842 static int hostapd_cli_cmd_send_qos_map_conf(struct wpa_ctrl *ctrl,
857 return wpa_ctrl_command(ctrl, buf);
861 static int hostapd_cli_cmd_hs20_wnm_notif(struct wpa_ctrl *ctrl, int argc,
877 return wpa_ctrl_command(ctrl, buf);
881 static int hostapd_cli_cmd_hs20_deauth_req(struct wpa_ctrl *ctrl, int argc,
902 return wpa_ctrl_command(ctrl, buf);
906 static int hostapd_cli_cmd_quit(struct wpa_ctrl *ctrl, int argc, char *argv[])
915 static int hostapd_cli_cmd_level(struct wpa_ctrl *ctrl, int argc, char *argv[])
924 return wpa_ctrl_command(ctrl, cmd);
928 static void update_stations(struct wpa_ctrl *ctrl)
932 if (!ctrl || !interactive)
937 if (wpa_ctrl_command_sta(ctrl, "STA-FIRST", addr, sizeof(addr), 0))
943 } while (wpa_ctrl_command_sta(ctrl, cmd, addr, sizeof(addr), 0) == 0);
947 static void hostapd_cli_get_interfaces(struct wpa_ctrl *ctrl,
953 if (!ctrl || !interfaces)
969 static void hostapd_cli_list_interfaces(struct wpa_ctrl *ctrl)
992 static int hostapd_cli_cmd_interface(struct wpa_ctrl *ctrl, int argc,
996 hostapd_cli_list_interfaces(ctrl);
1025 static int hostapd_cli_cmd_set(struct wpa_ctrl *ctrl, int argc, char *argv[])
1041 return wpa_ctrl_command(ctrl, cmd);
1083 static int hostapd_cli_cmd_get(struct wpa_ctrl *ctrl, int argc, char *argv[])
1099 return wpa_ctrl_command(ctrl, cmd);
1129 static int hostapd_cli_cmd_fst(struct wpa_ctrl *ctrl, int argc, char *argv[])
1152 return wpa_ctrl_command(ctrl, cmd);
1157 static int hostapd_cli_cmd_chan_switch(struct wpa_ctrl *ctrl,
1192 return wpa_ctrl_command(ctrl, cmd);
1196 static int hostapd_cli_cmd_enable(struct wpa_ctrl *ctrl, int argc,
1199 return wpa_ctrl_command(ctrl, "ENABLE");
1203 static int hostapd_cli_cmd_reload(struct wpa_ctrl *ctrl, int argc,
1206 return wpa_ctrl_command(ctrl, "RELOAD");
1210 static int hostapd_cli_cmd_disable(struct wpa_ctrl *ctrl, int argc,
1213 return wpa_ctrl_command(ctrl, "DISABLE");
1217 static int hostapd_cli_cmd_update_beacon(struct wpa_ctrl *ctrl, int argc,
1220 return wpa_ctrl_command(ctrl, "UPDATE_BEACON");
1224 static int hostapd_cli_cmd_vendor(struct wpa_ctrl *ctrl, int argc, char *argv[])
1241 return wpa_ctrl_command(ctrl, cmd);
1245 static int hostapd_cli_cmd_erp_flush(struct wpa_ctrl *ctrl, int argc,
1248 return wpa_ctrl_command(ctrl, "ERP_FLUSH");
1252 static int hostapd_cli_cmd_log_level(struct wpa_ctrl *ctrl, int argc,
1267 return wpa_ctrl_command(ctrl, cmd);
1271 static int hostapd_cli_cmd_raw(struct wpa_ctrl *ctrl, int argc, char *argv[])
1275 return hostapd_cli_cmd(ctrl, argv[0], 0, argc - 1, &argv[1]);
1279 static int hostapd_cli_cmd_pmksa(struct wpa_ctrl *ctrl, int argc, char *argv[])
1281 return wpa_ctrl_command(ctrl, "PMKSA");
1285 static int hostapd_cli_cmd_pmksa_flush(struct wpa_ctrl *ctrl, int argc,
1288 return wpa_ctrl_command(ctrl, "PMKSA_FLUSH");
1292 static int hostapd_cli_cmd_set_neighbor(struct wpa_ctrl *ctrl, int argc,
1310 return wpa_ctrl_command(ctrl, cmd);
1314 static int hostapd_cli_cmd_remove_neighbor(struct wpa_ctrl *ctrl, int argc,
1331 return wpa_ctrl_command(ctrl, cmd);
1335 static int hostapd_cli_cmd_req_lci(struct wpa_ctrl *ctrl, int argc,
1351 return wpa_ctrl_command(ctrl, cmd);
1355 static int hostapd_cli_cmd_req_range(struct wpa_ctrl *ctrl, int argc,
1363 return hostapd_cli_cmd(ctrl, "REQ_RANGE", 4, argc, argv);
1367 static int hostapd_cli_cmd_driver_flags(struct wpa_ctrl *ctrl, int argc,
1370 return wpa_ctrl_command(ctrl, "DRIVER_FLAGS");
1376 static int hostapd_cli_cmd_dpp_qr_code(struct wpa_ctrl *ctrl, int argc,
1379 return hostapd_cli_cmd(ctrl, "DPP_QR_CODE", 1, argc, argv);
1383 static int hostapd_cli_cmd_dpp_bootstrap_gen(struct wpa_ctrl *ctrl, int argc,
1386 return hostapd_cli_cmd(ctrl, "DPP_BOOTSTRAP_GEN", 1, argc, argv);
1390 static int hostapd_cli_cmd_dpp_bootstrap_remove(struct wpa_ctrl *ctrl, int argc,
1393 return hostapd_cli_cmd(ctrl, "DPP_BOOTSTRAP_REMOVE", 1, argc, argv);
1397 static int hostapd_cli_cmd_dpp_bootstrap_get_uri(struct wpa_ctrl *ctrl,
1400 return hostapd_cli_cmd(ctrl, "DPP_BOOTSTRAP_GET_URI", 1, argc, argv);
1404 static int hostapd_cli_cmd_dpp_bootstrap_info(struct wpa_ctrl *ctrl, int argc,
1407 return hostapd_cli_cmd(ctrl, "DPP_BOOTSTRAP_INFO", 1, argc, argv);
1411 static int hostapd_cli_cmd_dpp_auth_init(struct wpa_ctrl *ctrl, int argc,
1414 return hostapd_cli_cmd(ctrl, "DPP_AUTH_INIT", 1, argc, argv);
1418 static int hostapd_cli_cmd_dpp_listen(struct wpa_ctrl *ctrl, int argc,
1421 return hostapd_cli_cmd(ctrl, "DPP_LISTEN", 1, argc, argv);
1425 static int hostapd_cli_cmd_dpp_stop_listen(struct wpa_ctrl *ctrl, int argc,
1428 return wpa_ctrl_command(ctrl, "DPP_STOP_LISTEN");
1432 static int hostapd_cli_cmd_dpp_configurator_add(struct wpa_ctrl *ctrl, int argc,
1435 return hostapd_cli_cmd(ctrl, "DPP_CONFIGURATOR_ADD", 0, argc, argv);
1439 static int hostapd_cli_cmd_dpp_configurator_remove(struct wpa_ctrl *ctrl,
1442 return hostapd_cli_cmd(ctrl, "DPP_CONFIGURATOR_REMOVE", 1, argc, argv);
1446 static int hostapd_cli_cmd_dpp_configurator_get_key(struct wpa_ctrl *ctrl,
1449 return hostapd_cli_cmd(ctrl, "DPP_CONFIGURATOR_GET_KEY", 1, argc, argv);
1453 static int hostapd_cli_cmd_dpp_configurator_sign(struct wpa_ctrl *ctrl,
1456 return hostapd_cli_cmd(ctrl, "DPP_CONFIGURATOR_SIGN", 1, argc, argv);
1460 static int hostapd_cli_cmd_dpp_pkex_add(struct wpa_ctrl *ctrl, int argc,
1463 return hostapd_cli_cmd(ctrl, "DPP_PKEX_ADD", 1, argc, argv);
1467 static int hostapd_cli_cmd_dpp_pkex_remove(struct wpa_ctrl *ctrl, int argc,
1470 return hostapd_cli_cmd(ctrl, "DPP_PKEX_REMOVE", 1, argc, argv);
1476 static int hostapd_cli_cmd_accept_macacl(struct wpa_ctrl *ctrl, int argc,
1479 return hostapd_cli_cmd(ctrl, "ACCEPT_ACL", 1, argc, argv);
1483 static int hostapd_cli_cmd_deny_macacl(struct wpa_ctrl *ctrl, int argc,
1486 return hostapd_cli_cmd(ctrl, "DENY_ACL", 1, argc, argv);
1490 static int hostapd_cli_cmd_poll_sta(struct wpa_ctrl *ctrl, int argc,
1493 return hostapd_cli_cmd(ctrl, "POLL_STA", 1, argc, argv);
1497 static int hostapd_cli_cmd_req_beacon(struct wpa_ctrl *ctrl, int argc,
1500 return hostapd_cli_cmd(ctrl, "REQ_BEACON", 2, argc, argv);
1504 static int hostapd_cli_cmd_reload_wpa_psk(struct wpa_ctrl *ctrl, int argc,
1507 return wpa_ctrl_command(ctrl, "RELOAD_WPA_PSK");
1513 int (*handler)(struct wpa_ctrl *ctrl, int argc, char *argv[]);
1727 static void wpa_request(struct wpa_ctrl *ctrl, int argc, char *argv[])
1761 match->handler(ctrl, argc - 1, &argv[1]);
1794 static void hostapd_cli_recv_pending(struct wpa_ctrl *ctrl, int in_read,
1800 while (wpa_ctrl_pending(ctrl)) {
1803 if (wpa_ctrl_recv(ctrl, buf, &len) == 0) {
1972 static void hostapd_cli_action(struct wpa_ctrl *ctrl)
1980 fd = wpa_ctrl_get_fd(ctrl);
1994 hostapd_cli_recv_pending(ctrl, 0, 1);
1997 if (wpa_ctrl_request(ctrl, "PING", 4, buf, &len,