/hostap-latest/src/ap/ |
D | sta_info.c | 48 struct sta_info *sta); 54 static int ap_sta_remove(struct hostapd_data *hapd, struct sta_info *sta); 58 int (*cb)(struct hostapd_data *hapd, struct sta_info *sta, in ap_for_each_sta() argument 62 struct sta_info *sta; in ap_for_each_sta() local 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() 78 while (s != NULL && os_memcmp(s->addr, sta, 6) != 0) in ap_get_sta() 87 struct sta_info *sta; in ap_get_sta_p2p() local [all …]
|
D | accounting.c | 31 struct sta_info *sta); 35 struct sta_info *sta, in accounting_msg() argument 59 if (sta) { in accounting_msg() 72 val = ieee802_1x_get_identity(sta->eapol_sm, &len); in accounting_msg() 75 if (!val && sta->identity) { in accounting_msg() 76 val = (u8 *) sta->identity; in accounting_msg() 77 len = os_strlen(sta->identity); in accounting_msg() 84 MAC2STR(sta->addr)); in accounting_msg() 96 if (add_common_radius_attr(hapd, hapd->conf->radius_acct_req_attr, sta, in accounting_msg() 100 if (sta && add_sqlite_radius_attr(hapd, sta, msg, 1) < 0) in accounting_msg() [all …]
|
D | ieee802_11.c | 66 struct sta_info *sta, u16 *resp, 77 struct sta_info *sta, u16 status, 88 struct sta_info *sta, int reassoc); 348 static u16 auth_shared_key(struct hostapd_data *hapd, struct sta_info *sta, in auth_shared_key() argument 352 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211, in auth_shared_key() 358 if (!sta->challenge) { in auth_shared_key() 362 sta->challenge = os_zalloc(WLAN_AUTH_CHALLENGE_LEN); in auth_shared_key() 363 if (sta->challenge == NULL) in auth_shared_key() 367 os_free(sta->challenge); in auth_shared_key() 368 sta->challenge = NULL; in auth_shared_key() [all …]
|
D | ap_mlme.c | 54 struct sta_info *sta) in mlme_authenticate_indication() argument 56 hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_MLME, in mlme_authenticate_indication() 59 MAC2STR(sta->addr), mlme_auth_alg_str(sta->auth_alg)); in mlme_authenticate_indication() 60 if (sta->auth_alg != WLAN_AUTH_FT && in mlme_authenticate_indication() 61 sta->auth_alg != WLAN_AUTH_FILS_SK && in mlme_authenticate_indication() 62 sta->auth_alg != WLAN_AUTH_FILS_SK_PFS && in mlme_authenticate_indication() 63 sta->auth_alg != WLAN_AUTH_FILS_PK && in mlme_authenticate_indication() 64 !(sta->flags & WLAN_STA_MFP)) in mlme_authenticate_indication() 65 mlme_deletekeys_request(hapd, sta); in mlme_authenticate_indication() 66 ap_sta_clear_disconnect_timeouts(hapd, sta); in mlme_authenticate_indication() [all …]
|
D | ieee802_1x.c | 47 struct sta_info *sta, int success, 51 static void ieee802_1x_send(struct hostapd_data *hapd, struct sta_info *sta, in ieee802_1x_send() argument 79 if (wpa_auth_pairwise_set(sta->wpa_sm)) in ieee802_1x_send() 90 MAC2STR(sta->addr), hex); in ieee802_1x_send() 95 if (sta->flags & WLAN_STA_PREAUTH) { in ieee802_1x_send() 96 rsn_preauth_send(hapd, sta, buf, len); in ieee802_1x_send() 104 hapd, sta->addr, buf, len, in ieee802_1x_send() 105 encrypt, hostapd_sta_flags_to_drv(sta->flags), link_id); in ieee802_1x_send() 113 struct sta_info *sta, in ieee802_1x_set_authorized() argument 119 if (sta->flags & WLAN_STA_PREAUTH) in ieee802_1x_set_authorized() [all …]
|
D | drv_callbacks.c | 50 struct sta_info *sta) in hostapd_notify_assoc_fils_finish() argument 59 __func__, MAC2STR(sta->addr)); in hostapd_notify_assoc_fils_finish() 60 eloop_cancel_timeout(fils_hlp_timeout, hapd, sta); in hostapd_notify_assoc_fils_finish() 61 if (!sta->fils_pending_assoc_req) in hostapd_notify_assoc_fils_finish() 64 if (ieee802_11_parse_elems(sta->fils_pending_assoc_req, in hostapd_notify_assoc_fils_finish() 65 sta->fils_pending_assoc_req_len, &elems, in hostapd_notify_assoc_fils_finish() 73 p = hostapd_eid_assoc_fils_session(sta->wpa_sm, p, in hostapd_notify_assoc_fils_finish() 75 sta->fils_hlp_resp); in hostapd_notify_assoc_fils_finish() 77 reply_res = hostapd_sta_assoc(hapd, sta->addr, in hostapd_notify_assoc_fils_finish() 78 sta->fils_pending_assoc_is_reassoc, in hostapd_notify_assoc_fils_finish() [all …]
|
D | preauth_auth.c | 47 struct sta_info *sta; in rsn_preauth_receive() local 67 sta = ap_get_sta(hapd, ethhdr->h_source); in rsn_preauth_receive() 68 if (sta && (sta->flags & WLAN_STA_ASSOC)) { in rsn_preauth_receive() 70 "STA " MACSTR, MAC2STR(sta->addr)); in rsn_preauth_receive() 73 if (!sta && hdr->type == IEEE802_1X_TYPE_EAPOL_START) { in rsn_preauth_receive() 74 sta = ap_sta_add(hapd, ethhdr->h_source); in rsn_preauth_receive() 75 if (sta == NULL) in rsn_preauth_receive() 77 sta->flags = WLAN_STA_PREAUTH; in rsn_preauth_receive() 79 ieee802_1x_new_station(hapd, sta); in rsn_preauth_receive() 80 if (sta->eapol_sm == NULL) { in rsn_preauth_receive() [all …]
|
D | wpa_auth_glue.c | 337 struct sta_info *sta = ap_get_sta(hapd, addr); in hostapd_wpa_auth_set_eapol() local 338 if (sta == NULL) in hostapd_wpa_auth_set_eapol() 342 ieee802_1x_notify_port_enabled(sta->eapol_sm, value); in hostapd_wpa_auth_set_eapol() 345 ieee802_1x_notify_port_valid(sta->eapol_sm, value); in hostapd_wpa_auth_set_eapol() 348 ieee802_1x_set_sta_authorized(hapd, sta, value); in hostapd_wpa_auth_set_eapol() 351 if (sta->eapol_sm) in hostapd_wpa_auth_set_eapol() 352 sta->eapol_sm->portControl = Auto; in hostapd_wpa_auth_set_eapol() 355 if (sta->eapol_sm) in hostapd_wpa_auth_set_eapol() 356 sta->eapol_sm->keyRun = value; in hostapd_wpa_auth_set_eapol() 359 if (sta->eapol_sm) in hostapd_wpa_auth_set_eapol() [all …]
|
D | airtime_policy.c | 57 struct sta_info *sta, in set_new_backlog_time() argument 60 sta->backlogged_until = *now; in set_new_backlog_time() 61 sta->backlogged_until.usec += hapd->iconf->airtime_update_interval * in set_new_backlog_time() 63 while (sta->backlogged_until.usec >= 1000000) { in set_new_backlog_time() 64 sta->backlogged_until.sec++; in set_new_backlog_time() 65 sta->backlogged_until.usec -= 1000000; in set_new_backlog_time() 72 struct sta_info *sta; in count_backlogged_sta() local 79 for (sta = hapd->sta_list; sta; sta = sta->next) { in count_backlogged_sta() 80 if (hostapd_drv_read_sta_data(hapd, &data, sta->addr)) in count_backlogged_sta() 88 set_new_backlog_time(hapd, sta, &now); in count_backlogged_sta() [all …]
|
D | sta_info.h | 291 void (*fils_pending_cb)(struct hostapd_data *hapd, struct sta_info *sta, 358 int (*cb)(struct hostapd_data *hapd, struct sta_info *sta, 361 struct sta_info * ap_get_sta(struct hostapd_data *hapd, const u8 *sta); 363 void ap_sta_hash_add(struct hostapd_data *hapd, struct sta_info *sta); 364 void ap_free_sta(struct hostapd_data *hapd, struct sta_info *sta); 365 void ap_sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta); 368 void ap_sta_replenish_timeout(struct hostapd_data *hapd, struct sta_info *sta, 370 void ap_sta_session_timeout(struct hostapd_data *hapd, struct sta_info *sta, 373 struct sta_info *sta); 375 struct sta_info *sta, int warning_time); [all …]
|
D | ctrl_iface_ap.c | 54 static int hostapd_get_sta_conn_time(struct sta_info *sta, in hostapd_get_sta_conn_time() argument 62 if (sta->connected_time.sec) { in hostapd_get_sta_conn_time() 64 os_reltime_age(&sta->connected_time, &age); in hostapd_get_sta_conn_time() 81 struct sta_info *sta, in hostapd_get_sta_info() argument 88 if (hostapd_drv_read_sta_data(hapd, &data, sta->addr) < 0) in hostapd_get_sta_info() 165 if ((sta->flags & WLAN_STA_VHT) && sta->vht_capabilities) { in hostapd_get_sta_info() 169 le_to_host16(sta->vht_capabilities-> in hostapd_get_sta_info() 171 le_to_host16(sta->vht_capabilities-> in hostapd_get_sta_info() 177 if ((sta->flags & WLAN_STA_HT) && sta->ht_capabilities) { in hostapd_get_sta_info() 179 sta->ht_capabilities-> in hostapd_get_sta_info() [all …]
|
D | mbo_ap.c | 19 void mbo_ap_sta_free(struct sta_info *sta) in mbo_ap_sta_free() argument 23 info = sta->non_pref_chan; in mbo_ap_sta_free() 24 sta->non_pref_chan = NULL; in mbo_ap_sta_free() 33 static void mbo_ap_parse_non_pref_chan(struct sta_info *sta, in mbo_ap_parse_non_pref_chan() argument 54 if (!sta->non_pref_chan) { in mbo_ap_parse_non_pref_chan() 55 sta->non_pref_chan = info; in mbo_ap_parse_non_pref_chan() 57 tmp = sta->non_pref_chan; in mbo_ap_parse_non_pref_chan() 78 MAC2STR(sta->addr), info->op_class, info->pref, in mbo_ap_parse_non_pref_chan() 83 void mbo_ap_check_sta_assoc(struct hostapd_data *hapd, struct sta_info *sta, in mbo_ap_check_sta_assoc() argument 98 sta->cell_capa = attr[2]; in mbo_ap_check_sta_assoc() [all …]
|
D | fils_hlp.c | 36 static int fils_dhcp_request(struct hostapd_data *hapd, struct sta_info *sta, in fils_dhcp_request() argument 45 if (!sta->hlp_dhcp_discover) { in fils_dhcp_request() 53 pos = wpabuf_mhead(sta->hlp_dhcp_discover); in fils_dhcp_request() 54 end = pos + wpabuf_len(sta->hlp_dhcp_discover); in fils_dhcp_request() 91 sta->hlp_dhcp_discover->used = pos - (u8 *) dhcp; in fils_dhcp_request() 117 if (wpabuf_resize(&sta->hlp_dhcp_discover, in fils_dhcp_request() 121 wpabuf_put_data(sta->hlp_dhcp_discover, server_id, in fils_dhcp_request() 123 wpabuf_put_u8(sta->hlp_dhcp_discover, DHCP_OPT_REQUESTED_IP_ADDRESS); in fils_dhcp_request() 124 wpabuf_put_u8(sta->hlp_dhcp_discover, 4); in fils_dhcp_request() 125 wpabuf_put_data(sta->hlp_dhcp_discover, &dhcpoffer->your_ip, 4); in fils_dhcp_request() [all …]
|
D | ieee802_11_ht.c | 217 struct sta_info *sta; in hostapd_2040_coex_action() local 269 sta = ap_get_sta(hapd, mgmt->sa); in hostapd_2040_coex_action() 270 if (!sta || !(sta->flags & WLAN_STA_ASSOC)) { in hostapd_2040_coex_action() 357 u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta, in copy_sta_ht_capab() argument 365 if (!ht_capab || !(sta->flags & WLAN_STA_WMM) || in copy_sta_ht_capab() 367 sta->flags &= ~WLAN_STA_HT; in copy_sta_ht_capab() 368 os_free(sta->ht_capabilities); in copy_sta_ht_capab() 369 sta->ht_capabilities = NULL; in copy_sta_ht_capab() 373 if (sta->ht_capabilities == NULL) { in copy_sta_ht_capab() 374 sta->ht_capabilities = in copy_sta_ht_capab() [all …]
|
D | ndisc_snoop.c | 41 static int sta_ip6addr_add(struct sta_info *sta, struct in6_addr *addr) in sta_ip6addr_add() argument 51 dl_list_add_tail(&sta->ip6addr, &ip6addr->list); in sta_ip6addr_add() 57 void sta_ip6addr_del(struct hostapd_data *hapd, struct sta_info *sta) in sta_ip6addr_del() argument 61 dl_list_for_each_safe(ip6addr, prev, &sta->ip6addr, struct ip6addr, in sta_ip6addr_del() 70 static int sta_has_ip6addr(struct sta_info *sta, struct in6_addr *addr) in sta_has_ip6addr() argument 74 dl_list_for_each(ip6addr, &sta->ip6addr, struct ip6addr, list) { in sta_has_ip6addr() 88 struct sta_info *sta; in ucast_to_stas() local 90 for (sta = hapd->sta_list; sta; sta = sta->next) { in ucast_to_stas() 91 if (!(sta->flags & WLAN_STA_AUTHORIZED)) in ucast_to_stas() 93 x_snoop_mcast_to_ucast_convert_send(hapd, sta, (u8 *) buf, len); in ucast_to_stas() [all …]
|
/hostap-latest/wlantest/ |
D | sta.c | 20 struct wlantest_sta *sta; in sta_find() local 22 dl_list_for_each(sta, &bss->sta, struct wlantest_sta, list) { in sta_find() 23 if (ether_addr_equal(sta->addr, addr)) in sta_find() 24 return sta; in sta_find() 34 struct wlantest_sta *sta; in sta_find_mlo() local 38 dl_list_for_each(sta, &bss->sta, struct wlantest_sta, list) { in sta_find_mlo() 39 if (ether_addr_equal(sta->addr, addr)) in sta_find_mlo() 40 return sta; in sta_find_mlo() 41 if (ether_addr_equal(sta->mld_mac_addr, addr)) in sta_find_mlo() 42 return sta; in sta_find_mlo() [all …]
|
D | rx_mgmt.c | 62 struct wlantest_sta *sta, size_t fields_len) in parse_basic_ml() argument 104 if (!ap && sta && is_zero_ether_addr(sta->mld_mac_addr)) { in parse_basic_ml() 105 os_memcpy(sta->mld_mac_addr, pos, ETH_ALEN); in parse_basic_ml() 108 MACSTR, MAC2STR(sta->mld_mac_addr)); in parse_basic_ml() 283 if (sta && link_id < MAX_NUM_MLD_LINKS) { in parse_basic_ml() 284 os_memcpy(sta->link_addr[link_id], pos, in parse_basic_ml() 389 struct wlantest_sta *sta, size_t fields_len) in parse_basic_ml_elems() argument 395 parse_basic_ml(wpabuf_head(mlbuf), wpabuf_len(mlbuf), ap, sta, in parse_basic_ml_elems() 666 struct wlantest_sta *sta, in process_fils_auth() argument 673 if (sta->auth_alg != WLAN_AUTH_FILS_SK || in process_fils_auth() [all …]
|
D | rx_eapol.c | 34 static size_t determine_mic_len(struct wlantest_sta *sta) in determine_mic_len() argument 39 if (sta && wpa_key_mgmt_sae_ext_key(sta->key_mgmt)) in determine_mic_len() 40 group = sta->sae_group; in determine_mic_len() 41 else if (sta && sta->key_mgmt == WPA_KEY_MGMT_OWE) in determine_mic_len() 42 group = sta->owe_group; in determine_mic_len() 53 return wpa_mic_len(sta->key_mgmt, pmk_len); in determine_mic_len() 57 static int check_mic(struct wlantest_sta *sta, const u8 *kck, size_t kck_len, in check_mic() argument 65 size_t mic_len = determine_mic_len(sta); in check_mic() 76 if (wpa_eapol_key_mic(kck, kck_len, sta->key_mgmt, ver, buf, len, in check_mic() 92 struct wlantest_sta *sta; in rx_data_eapol_key_1_of_4() local [all …]
|
D | ctrl.c | 166 struct wlantest_sta *sta; in ctrl_get_sta() local 179 sta = sta_find(bss, pos); in ctrl_get_sta() 180 if (sta == NULL) { in ctrl_get_sta() 185 return sta; in ctrl_get_sta() 193 struct wlantest_sta *sta; in ctrl_get_sta2() local 206 sta = sta_find(bss, pos); in ctrl_get_sta2() 207 if (sta == NULL) { in ctrl_get_sta2() 212 return sta; in ctrl_get_sta2() 245 struct wlantest_sta *sta; in ctrl_list_sta() local 259 dl_list_for_each(sta, &bss->sta, struct wlantest_sta, list) { in ctrl_list_sta() [all …]
|
D | rx_data.c | 379 static u8 * try_ptk_decrypt(struct wlantest *wt, struct wlantest_sta *sta, in try_ptk_decrypt() argument 388 if (sta->pairwise_cipher == WPA_CIPHER_CCMP_256) in try_ptk_decrypt() 391 else if (sta->pairwise_cipher == WPA_CIPHER_GCMP || in try_ptk_decrypt() 392 sta->pairwise_cipher == WPA_CIPHER_GCMP_256) in try_ptk_decrypt() 409 struct wlantest_sta *sta, *sta2; in rx_data_bss_prot() local 436 sta = sta_find_mlo(wt, bss, hdr->addr2); in rx_data_bss_prot() 437 if (sta) { in rx_data_bss_prot() 439 sta->counters[ in rx_data_bss_prot() 442 if (!sta || !sta->ptk_set) { in rx_data_bss_prot() 447 if (sta2 && (!sta || sta2->ptk_set)) { in rx_data_bss_prot() [all …]
|
/hostap-latest/wpa_supplicant/ |
D | mesh_mpm.c | 123 struct sta_info *sta, in copy_supp_rates() argument 128 MAC2STR(sta->addr)); in copy_supp_rates() 133 sizeof(sta->supported_rates)) { in copy_supp_rates() 136 " %d+%d", MAC2STR(sta->addr), elems->supp_rates_len, in copy_supp_rates() 141 sta->supported_rates_len = merge_byte_arrays( in copy_supp_rates() 142 sta->supported_rates, sizeof(sta->supported_rates), in copy_supp_rates() 173 struct sta_info *sta; in llid_in_use() local 176 for (sta = hapd->sta_list; sta; sta = sta->next) { in llid_in_use() 177 if (sta->my_lid == llid) in llid_in_use() 187 struct sta_info *sta) in mesh_mpm_init_link() argument [all …]
|
D | mesh_rsn.c | 34 struct sta_info *sta = user_data; in mesh_auth_timer() local 37 if (sta->sae->state != SAE_ACCEPTED) { in mesh_auth_timer() 40 MAC2STR(sta->addr), sta->sae_auth_retry); in mesh_auth_timer() 42 MAC2STR(sta->addr)); in mesh_auth_timer() 43 if (sta->sae_auth_retry < MESH_AUTH_RETRY) { in mesh_auth_timer() 44 mesh_rsn_auth_sae_sta(wpa_s, sta); in mesh_auth_timer() 48 if (sta->sae_auth_retry > MESH_AUTH_RETRY) { in mesh_auth_timer() 49 ap_free_sta(hapd, sta); in mesh_auth_timer() 54 wpa_mesh_set_plink_state(wpa_s, sta, PLINK_BLOCKED); in mesh_auth_timer() 55 sta->sae->state = SAE_NOTHING; in mesh_auth_timer() [all …]
|
/hostap-latest/tests/remote/ |
D | test_example.py | 20 sta = None 27 sta = rutils.get_host(devices, duts[0]) 34 rutils.setup_hw([sta, ap], setup_params) 37 rutils.trace_start([sta], setup_params) 40 rutils.perf_start([sta], setup_params) 43 rutils.run_wpasupplicant(sta, setup_params) 55 monitor.add(sta, monitors) 61 wpas = WpaSupplicant(hostname=sta.host, global_iface="udp", 62 global_port=sta.port) 63 wpas.interface_add(sta.ifname) [all …]
|
/hostap-latest/tests/hwsim/ |
D | test_mbo.py | 59 sta = hapd.get_sta(addr) 60 res5 = sta['supp_op_classes'][2:] 76 sta = hapd2.get_sta(addr) 77 res2 = sta['supp_op_classes'][2:] 315 sta = hapd.get_sta(addr) 316 if 'mbo_cell_capa' not in sta or sta['mbo_cell_capa'] != '1': 326 sta = hapd.get_sta(addr) 327 if 'mbo_cell_capa' not in sta: 329 if sta['mbo_cell_capa'] != '3': 351 sta = hapd.get_sta(addr) [all …]
|
/hostap-latest/src/wps/ |
D | wps_er.c | 34 static void wps_er_sta_event(struct wps_context *wps, struct wps_er_sta *sta, in wps_er_sta_event() argument 44 ev->uuid = sta->uuid; in wps_er_sta_event() 45 ev->mac_addr = sta->addr; in wps_er_sta_event() 46 ev->m1_received = sta->m1_received; in wps_er_sta_event() 47 ev->config_methods = sta->config_methods; in wps_er_sta_event() 48 ev->dev_passwd_id = sta->dev_passwd_id; in wps_er_sta_event() 49 ev->pri_dev_type = sta->pri_dev_type; in wps_er_sta_event() 50 ev->dev_name = sta->dev_name; in wps_er_sta_event() 51 ev->manufacturer = sta->manufacturer; in wps_er_sta_event() 52 ev->model_name = sta->model_name; in wps_er_sta_event() [all …]
|