/hostap-latest/src/ap/ |
D | ap_drv_ops.h | 20 int hostapd_build_ap_extra_ies(struct hostapd_data *hapd, 24 void hostapd_free_ap_extra_ies(struct hostapd_data *hapd, struct wpabuf *beacon, 27 int hostapd_reset_ap_wps_ie(struct hostapd_data *hapd); 28 int hostapd_set_ap_wps_ie(struct hostapd_data *hapd); 29 bool hostapd_sta_is_link_sta(struct hostapd_data *hapd, 31 int hostapd_set_authorized(struct hostapd_data *hapd, 33 int hostapd_set_sta_flags(struct hostapd_data *hapd, struct sta_info *sta); 34 int hostapd_set_drv_ieee8021x(struct hostapd_data *hapd, const char *ifname, 36 int hostapd_vlan_if_add(struct hostapd_data *hapd, const char *ifname); 37 int hostapd_vlan_if_remove(struct hostapd_data *hapd, const char *ifname); [all …]
|
D | ap_drv_ops.c | 68 int hostapd_build_ap_extra_ies(struct hostapd_data *hapd, in hostapd_build_ap_extra_ies() argument 80 pos = hostapd_eid_rm_enabled_capab(hapd, pos, sizeof(buf)); in hostapd_build_ap_extra_ies() 87 pos = hostapd_eid_time_adv(hapd, pos); in hostapd_build_ap_extra_ies() 90 pos = hostapd_eid_time_zone(hapd, pos); in hostapd_build_ap_extra_ies() 95 pos = hostapd_eid_ext_capab(hapd, pos, false); in hostapd_build_ap_extra_ies() 98 pos = hostapd_eid_interworking(hapd, pos); in hostapd_build_ap_extra_ies() 99 pos = hostapd_eid_adv_proto(hapd, pos); in hostapd_build_ap_extra_ies() 100 pos = hostapd_eid_roaming_consortium(hapd, pos); in hostapd_build_ap_extra_ies() 106 if (add_buf(&beacon, hapd->iface->fst_ies) < 0 || in hostapd_build_ap_extra_ies() 107 add_buf(&proberesp, hapd->iface->fst_ies) < 0 || in hostapd_build_ap_extra_ies() [all …]
|
D | beacon.c | 40 static u8 * hostapd_eid_bss_load(struct hostapd_data *hapd, u8 *eid, size_t len) in hostapd_eid_bss_load() argument 46 if (hapd->conf->bss_load_test_set) { in hostapd_eid_bss_load() 49 os_memcpy(eid, hapd->conf->bss_load_test, 5); in hostapd_eid_bss_load() 54 if (hapd->conf->bss_load_update_period) { in hostapd_eid_bss_load() 57 WPA_PUT_LE16(eid, hapd->num_sta); in hostapd_eid_bss_load() 59 *eid++ = hapd->iface->channel_utilization; in hostapd_eid_bss_load() 67 static u8 ieee802_11_erp_info(struct hostapd_data *hapd) in ieee802_11_erp_info() argument 71 if (hapd->iface->current_mode == NULL || in ieee802_11_erp_info() 72 hapd->iface->current_mode->mode != HOSTAPD_MODE_IEEE80211G) in ieee802_11_erp_info() 75 if (hapd->iface->olbc) in ieee802_11_erp_info() [all …]
|
D | authsrv.c | 30 static int hostapd_sim_db_cb_sta(struct hostapd_data *hapd, in hostapd_sim_db_cb_sta() argument 41 struct hostapd_data *hapd = ctx; in hostapd_sim_db_cb() local 42 if (ap_for_each_sta(hapd, hostapd_sim_db_cb_sta, session_ctx) == 0) { in hostapd_sim_db_cb() 44 radius_server_eap_pending_cb(hapd->radius_srv, session_ctx); in hostapd_sim_db_cb() 105 static int hostapd_setup_radius_srv(struct hostapd_data *hapd) in hostapd_setup_radius_srv() argument 108 struct hostapd_bss_config *conf = hapd->conf; in hostapd_setup_radius_srv() 111 if (!hostapd_mld_is_first_bss(hapd)) { in hostapd_setup_radius_srv() 117 first = hostapd_mld_get_first_bss(hapd); in hostapd_setup_radius_srv() 120 hapd->radius_srv = first->radius_srv; in hostapd_setup_radius_srv() 129 srv.conf_ctx = hapd; in hostapd_setup_radius_srv() [all …]
|
D | dpp_hostapd.c | 31 static void hostapd_dpp_auth_success(struct hostapd_data *hapd, int initiator); 33 static int hostapd_dpp_auth_init_next(struct hostapd_data *hapd); 34 static void hostapd_dpp_set_testing_options(struct hostapd_data *hapd, 36 static void hostapd_dpp_start_gas_client(struct hostapd_data *hapd); 40 static void hostapd_dpp_handle_config_obj(struct hostapd_data *hapd, 56 int hostapd_dpp_qr_code(struct hostapd_data *hapd, const char *cmd) in hostapd_dpp_qr_code() argument 59 struct dpp_authentication *auth = hapd->dpp_auth; in hostapd_dpp_qr_code() 61 bi = dpp_add_qr_code(hapd->iface->interfaces->dpp, cmd); in hostapd_dpp_qr_code() 69 wpa_msg(hapd->msg_ctx, MSG_INFO, DPP_EVENT_TX "dst=" MACSTR in hostapd_dpp_qr_code() 73 hostapd_drv_send_action(hapd, auth->curr_freq, 0, in hostapd_dpp_qr_code() [all …]
|
D | wpa_auth_kay.c | 27 struct hostapd_data *hapd = priv; in hapd_macsec_init() local 29 if (!hapd->driver->macsec_init) in hapd_macsec_init() 31 return hapd->driver->macsec_init(hapd->drv_priv, params); in hapd_macsec_init() 37 struct hostapd_data *hapd = priv; in hapd_macsec_deinit() local 39 if (!hapd->driver->macsec_deinit) in hapd_macsec_deinit() 41 return hapd->driver->macsec_deinit(hapd->drv_priv); in hapd_macsec_deinit() 47 struct hostapd_data *hapd = priv; in hapd_macsec_get_capability() local 49 if (!hapd->driver->macsec_get_capability) in hapd_macsec_get_capability() 51 return hapd->driver->macsec_get_capability(hapd->drv_priv, cap); in hapd_macsec_get_capability() 57 struct hostapd_data *hapd = priv; in hapd_enable_protect_frames() local [all …]
|
D | sta_info.c | 47 static void ap_sta_remove_in_other_bss(struct hostapd_data *hapd, 54 static int ap_sta_remove(struct hostapd_data *hapd, struct sta_info *sta); 57 int ap_for_each_sta(struct hostapd_data *hapd, in ap_for_each_sta() argument 58 int (*cb)(struct hostapd_data *hapd, struct sta_info *sta, in ap_for_each_sta() argument 64 for (sta = hapd->sta_list; sta; sta = sta->next) { in ap_for_each_sta() 65 if (cb(hapd, sta, ctx)) in ap_for_each_sta() 73 struct sta_info * ap_get_sta(struct hostapd_data *hapd, const u8 *sta) in ap_get_sta() argument 77 s = hapd->sta_hash[STA_HASH(sta)]; in ap_get_sta() 85 struct sta_info * ap_get_sta_p2p(struct hostapd_data *hapd, const u8 *addr) in ap_get_sta_p2p() argument 89 for (sta = hapd->sta_list; sta; sta = sta->next) { in ap_get_sta_p2p() [all …]
|
D | hostapd.c | 65 static int hostapd_flush_old_stations(struct hostapd_data *hapd, u16 reason); 67 static int hostapd_setup_encryption(char *iface, struct hostapd_data *hapd); 68 static int hostapd_broadcast_wep_clear(struct hostapd_data *hapd); 99 struct hostapd_data * hostapd_mbssid_get_tx_bss(struct hostapd_data *hapd) in hostapd_mbssid_get_tx_bss() argument 101 if (hapd->iconf->mbssid) in hostapd_mbssid_get_tx_bss() 102 return hapd->iface->bss[0]; in hostapd_mbssid_get_tx_bss() 104 return hapd; in hostapd_mbssid_get_tx_bss() 108 int hostapd_mbssid_get_bss_index(struct hostapd_data *hapd) in hostapd_mbssid_get_bss_index() argument 110 if (hapd->iconf->mbssid) { in hostapd_mbssid_get_bss_index() 113 for (i = 1; i < hapd->iface->num_bss; i++) in hostapd_mbssid_get_bss_index() [all …]
|
D | ieee802_11_shared.c | 36 u8 * hostapd_eid_assoc_comeback_time(struct hostapd_data *hapd, in hostapd_eid_assoc_comeback_time() argument 46 if (hapd->conf->assoc_sa_query_max_timeout > tu) in hostapd_eid_assoc_comeback_time() 47 timeout = hapd->conf->assoc_sa_query_max_timeout - tu; in hostapd_eid_assoc_comeback_time() 50 if (timeout < hapd->conf->assoc_sa_query_max_timeout) in hostapd_eid_assoc_comeback_time() 54 if (hapd->conf->test_assoc_comeback_type != -1) in hostapd_eid_assoc_comeback_time() 55 type = hapd->conf->test_assoc_comeback_type; in hostapd_eid_assoc_comeback_time() 62 void ieee802_11_send_sa_query_req(struct hostapd_data *hapd, in ieee802_11_send_sa_query_req() argument 66 struct sta_info *sta = ap_get_sta(hapd, addr); in ieee802_11_send_sa_query_req() 72 const u8 *own_addr = hapd->own_addr; in ieee802_11_send_sa_query_req() 83 if (hostapd_drv_channel_info(hapd, &ci) != 0) { in ieee802_11_send_sa_query_req() [all …]
|
D | drv_callbacks.c | 49 void hostapd_notify_assoc_fils_finish(struct hostapd_data *hapd, in hostapd_notify_assoc_fils_finish() argument 60 eloop_cancel_timeout(fils_hlp_timeout, hapd, sta); in hostapd_notify_assoc_fils_finish() 77 reply_res = hostapd_sta_assoc(hapd, sta->addr, in hostapd_notify_assoc_fils_finish() 81 updated = ap_sta_set_authorized_flag(hapd, sta, 1); in hostapd_notify_assoc_fils_finish() 85 hostapd_set_sta_flags(hapd, sta); in hostapd_notify_assoc_fils_finish() 87 ap_sta_set_authorized_event(hapd, sta, 1); in hostapd_notify_assoc_fils_finish() 90 hostapd_new_assoc_sta(hapd, sta, !new_assoc); in hostapd_notify_assoc_fils_finish() 98 fils_hlp_deinit(hapd); in hostapd_notify_assoc_fils_finish() 106 hostapd_drv_sta_remove(hapd, sta->addr); in hostapd_notify_assoc_fils_finish() 113 static bool check_sa_query_need(struct hostapd_data *hapd, struct sta_info *sta) in check_sa_query_need() argument [all …]
|
D | wps_hostapd.c | 33 static int hostapd_wps_upnp_init(struct hostapd_data *hapd, 35 static void hostapd_wps_upnp_deinit(struct hostapd_data *hapd); 61 struct hostapd_data *hapd = iface->bss[j]; in wps_for_each() local 64 if (hapd != data->calling_hapd && in wps_for_each() 65 (hapd->conf->wps_independent || in wps_for_each() 69 ret = data->func(hapd, data->ctx); in wps_for_each() 78 static int hostapd_wps_for_each(struct hostapd_data *hapd, in hostapd_wps_for_each() argument 82 struct hostapd_iface *iface = hapd->iface; in hostapd_wps_for_each() 86 data.calling_hapd = hapd; in hostapd_wps_for_each() 99 struct hostapd_data *hapd = ctx; in hostapd_wps_new_psk_cb() local [all …]
|
D | ieee802_11.h | 28 int ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len, 30 void ieee802_11_mgmt_cb(struct hostapd_data *hapd, const u8 *buf, size_t len, 32 void hostapd_2040_coex_action(struct hostapd_data *hapd, 35 int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen); 36 int ieee802_11_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta, 39 static inline int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf, in ieee802_11_get_mib() argument 45 static inline int ieee802_11_get_mib_sta(struct hostapd_data *hapd, in ieee802_11_get_mib_sta() argument 52 u16 hostapd_own_capab_info(struct hostapd_data *hapd); 54 u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid, 56 u8 * hostapd_eid_qos_map_set(struct hostapd_data *hapd, u8 *eid); [all …]
|
D | gas_serv.c | 47 gas_dialog_create(struct hostapd_data *hapd, const u8 *addr, u8 dialog_token) in gas_dialog_create() argument 53 sta = ap_get_sta(hapd, addr); in gas_dialog_create() 61 sta = ap_sta_add(hapd, addr); in gas_dialog_create() 73 ap_sta_session_timeout(hapd, sta, in gas_dialog_create() 74 hapd->conf->gas_comeback_delay / 1024 + in gas_dialog_create() 77 ap_sta_replenish_timeout(hapd, sta, 5); in gas_dialog_create() 99 wpa_msg(hapd->msg_ctx, MSG_ERROR, "ANQP: Could not create dialog for " in gas_dialog_create() 108 gas_serv_dialog_find(struct hostapd_data *hapd, const u8 *addr, in gas_serv_dialog_find() argument 114 sta = ap_get_sta(hapd, addr); in gas_serv_dialog_find() 124 ap_sta_replenish_timeout(hapd, sta, 5); in gas_serv_dialog_find() [all …]
|
D | wpa_auth_glue.c | 286 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_logger() local 302 hostapd_logger(hapd, addr, HOSTAPD_MODULE_WPA, hlevel, "%s", txt); in hostapd_wpa_auth_logger() 310 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_disconnect() local 314 ap_sta_disconnect(hapd, NULL, addr, reason); in hostapd_wpa_auth_disconnect() 320 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_mic_failure_report() local 321 return michael_mic_failure(hapd, addr, 0); in hostapd_wpa_auth_mic_failure_report() 327 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_psk_failure_report() local 328 wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR, in hostapd_wpa_auth_psk_failure_report() 336 struct hostapd_data *hapd = ctx; in hostapd_wpa_auth_set_eapol() local 337 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_wpa_auth_set_eapol() [all …]
|
/hostap-latest/tests/hwsim/ |
D | test_dfs.py | 18 def wait_dfs_event(hapd, event, timeout): argument 22 ev = hapd.wait_event(dfs_events, timeout=timeout) 35 hapd = hostapd.add_ap(ap, {}, no_enable=True) 36 hapd.set("ssid", ssid) 37 hapd.set("country_code", country) 38 hapd.set("ieee80211d", "1") 39 hapd.set("ieee80211h", "1") 40 hapd.set("hw_mode", "a") 42 hapd.set("channel", "100") 44 hapd.set("channel", "52") [all …]
|
D | test_ap_tdls.py | 24 def connectivity(dev, hapd): argument 25 check_connectivity(dev[0], dev[1], hapd) 27 def connect_2sta(dev, ssid, hapd, sae=False): argument 34 hapd.wait_sta() 35 hapd.wait_sta() 36 connectivity(dev, hapd) 38 def connect_2sta_wpa2_psk(dev, hapd): argument 39 connect_2sta(dev, "test-wpa2-psk", hapd) 41 def connect_2sta_wpa_psk(dev, hapd): argument 42 connect_2sta(dev, "test-wpa-psk", hapd) [all …]
|
D | test_hapd_ctrl.py | 21 hapd = hostapd.add_ap(apdev[0], params) 22 status = hapd.get_status() 24 driver = hapd.get_driver_status() 57 hapd = hostapd.add_ap(apdev[0], params) 60 if "OK" not in hapd.request("DEAUTHENTICATE " + addr + " p2p=2"): 65 if "OK" not in hapd.request("DISASSOCIATE " + addr + " p2p=2"): 82 hapd = hostapd.add_ap(apdev[0], params) 87 ev = hapd.wait_event(["AP-STA-CONNECTED"], timeout=2) 97 if "FAIL" in hapd.request("STA " + addr): 99 if "FAIL" not in hapd.request("STA " + addr + " eapol"): [all …]
|
D | test_ap_vht.py | 23 hapd = None 33 hapd = hostapd.add_ap(apdev[0], params) 37 hwsim_utils.test_connectivity(dev[0], hapd) 49 status = hapd.get_status() 64 sta = hapd.get_sta(dev[0].own_addr()) 82 clear_regdom(hapd, dev) 88 hapd = None 98 hapd = hostapd.add_ap(apdev[0], params) 127 clear_regdom(hapd, dev) 132 hapd = None [all …]
|
D | test_ap_acs.py | 48 def wait_acs(hapd, return_after_acs=False): argument 49 ev = hapd.wait_event(["ACS-STARTED", "ACS-COMPLETED", "ACS-FAILED", 56 state = hapd.get_status_field("state") 60 ev = hapd.wait_event(["ACS-COMPLETED", "ACS-FAILED", "AP-ENABLED", 70 ev = hapd.wait_event(["AP-ENABLED", "AP-DISABLED"], timeout=5) 76 state = hapd.get_status_field("state") 85 hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False) 86 wait_acs(hapd) 88 freq = hapd.get_status_field("freq") 100 hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False) [all …]
|
D | test_he.py | 26 hapd = hostapd.add_ap(apdev[0], params) 27 if hapd.get_status_field("ieee80211ax") != "1": 30 sta = hapd.get_sta(dev[0].own_addr()) 41 hapd = hostapd.add_ap(apdev[0], params) 43 sta = hapd.get_sta(dev[0].own_addr()) 96 hapd = hostapd.add_ap(apdev[0], params) 97 if hapd.get_status_field("ieee80211ax") != "1": 114 hapd = hostapd.add_ap(apdev[0], params) 115 if hapd.get_status_field("ieee80211ax") != "1": 129 hapd = None [all …]
|
D | test_ap_params.py | 28 hapd = hostapd.add_ap(apdev[0], params) 30 hwsim_utils.test_connectivity(dev[0], hapd) 32 hapd.disable() 33 hapd.set('fragm_threshold', '-1') 34 hapd.set('rts_threshold', '-1') 35 hapd.enable() 44 hapd = hostapd.add_ap(apdev[0], params) 46 hwsim_utils.test_connectivity(dev[0], hapd) 48 hapd.disable() 49 hapd.set('fragm_threshold', '-1') [all …]
|
D | test_ap_ht.py | 24 hapd = hostapd.add_ap(apdev[0], params, wait_enabled=False) 26 state = hapd.get_status_field("state") 29 state = hapd.get_status_field("state") 33 ev = hapd.wait_event(["AP-ENABLED"], timeout=10) 37 state = hapd.get_status_field("state") 41 freq = hapd.get_status_field("freq") 44 pri = hapd.get_status_field("channel") 47 sec = hapd.get_status_field("secondary_channel") 51 status = hapd.get_status() 55 sta = hapd.get_sta(dev[0].own_addr()) [all …]
|
D | test_wnm.py | 21 def clear_regdom_state(dev, hapd, hapd2): argument 26 if hapd: 27 hapd.request("DISABLE") 101 hapd = hostapd.add_ap(apdev, params) 107 Wlantest.setup(hapd) 111 return hapd 122 hapd = start_wnm_ap(apdev[0]) 124 with alloc_fail(hapd, 1, "ieee802_11_send_bss_trans_mgmt_request"): 126 wait_fail_trigger(hapd, "GET_ALLOC_FAIL") 131 hapd = start_wnm_ap(apdev[0], time_adv=True, wnm_sleep_mode=True) [all …]
|
D | test_rrm.py | 67 hapd = hostapd.add_ap(apdev[0]['ifname'], params) 71 res = hapd.request("SHOW_NEIGHBOR") 86 if "FAIL" not in hapd.request("SET_NEIGHBOR 00:11:22:33:44:gg ssid=\"test1\" nr=" + nr): 90 if "FAIL" not in hapd.request("SET_NEIGHBOR 00:11:22:33:44:55 ssid=test1 nr=" + nr): 94 if "FAIL" not in hapd.request("SET_NEIGHBOR 00:11:22:33:44:55 ssid=\"test1 nr=" + nr): 98 if "FAIL" not in hapd.request("SET_NEIGHBOR 00:11:22:33:44:55 nr=" + nr): 102 if "FAIL" not in hapd.request("SET_NEIGHBOR 00:11:22:33:44:55 ssid=\"test1\""): 106 if "FAIL" not in hapd.request("SET_NEIGHBOR 00:11:22:33:44:55 ssid=\"test1\" nr=" + nr[:-1]): 110 …if "FAIL" not in hapd.request("SET_NEIGHBOR 00:11:22:33:44:55 ssid=\"test1\" nr=" + nr + " lci=1"): 114 …if "FAIL" not in hapd.request("SET_NEIGHBOR 00:11:22:33:44:55 ssid=\"test1\" nr=" + nr + " civic=1… [all …]
|
D | test_nfc_wps.py | 18 def check_wpa2_connection(sta, ap, hapd, ssid, mixed=False): argument 32 hwsim_utils.test_connectivity(sta, hapd) 44 hapd = hostapd.add_ap(apdev[0], params) 52 res = hapd.request("WPS_NFC_TAG_READ " + pw) 60 hapd.wait_sta() 61 check_wpa2_connection(dev[0], apdev[0], hapd, ssid) 63 if "FAIL" not in hapd.request("WPS_NFC_TAG_READ 0"): 65 if "FAIL" not in hapd.request("WPS_NFC_TAG_READ 0q"): 67 with alloc_fail(hapd, 1, 69 if "FAIL" not in hapd.request("WPS_NFC_TAG_READ 00"): [all …]
|