| /freebsd/contrib/wpa/src/common/ |
| H A D | ieee802_11_common.c | 21 struct ieee802_11_elems *elems, in ieee802_11_parse_vendor_specific() argument 47 elems->wpa_ie = pos; in ieee802_11_parse_vendor_specific() 48 elems->wpa_ie_len = elen; in ieee802_11_parse_vendor_specific() 68 elems->wmm = pos; in ieee802_11_parse_vendor_specific() 69 elems->wmm_len = elen; in ieee802_11_parse_vendor_specific() 72 elems->wmm_tspec = pos; in ieee802_11_parse_vendor_specific() 73 elems->wmm_tspec_len = elen; in ieee802_11_parse_vendor_specific() 85 elems->wps_ie = pos; in ieee802_11_parse_vendor_specific() 86 elems->wps_ie_len = elen; in ieee802_11_parse_vendor_specific() 101 elems->p2p = pos; in ieee802_11_parse_vendor_specific() [all …]
|
| H A D | sae_pk.c | 788 struct ieee802_11_elems elems; in sae_check_confirm_pk() local 810 if (ieee802_11_parse_elems(ies, ies_len, &elems, 1) == ParseFailed) { in sae_check_confirm_pk() 814 if (!elems.fils_pk || !elems.fils_key_confirm || !elems.sae_pk) { in sae_check_confirm_pk() 822 if (elems.sae_pk_len < SAE_PK_M_LEN + AES_BLOCK_SIZE) { in sae_check_confirm_pk() 829 elems.sae_pk, SAE_PK_M_LEN + AES_BLOCK_SIZE); in sae_check_confirm_pk() 832 elems.sae_pk, SAE_PK_M_LEN + AES_BLOCK_SIZE, in sae_check_confirm_pk() 840 if (elems.fils_pk[0] != 2) { in sae_check_confirm_pk() 842 elems.fils_pk[0]); in sae_check_confirm_pk() 845 k_ap_len = elems.fils_pk_len - 1; in sae_check_confirm_pk() 846 k_ap = elems.fils_pk + 1; in sae_check_confirm_pk() [all …]
|
| H A D | hw_features_common.c | 182 struct ieee802_11_elems elems; in get_pri_sec_chan() local 186 if (ieee802_11_parse_elems((u8 *) (bss + 1), bss->ie_len, &elems, 0) != in get_pri_sec_chan() 187 ParseFailed && elems.ht_operation) { in get_pri_sec_chan() 188 oper = (struct ieee80211_ht_operation *) elems.ht_operation; in get_pri_sec_chan() 270 struct ieee802_11_elems elems; in check_20mhz_bss() local 276 if (ieee802_11_parse_elems((u8 *) (bss + 1), bss->ie_len, &elems, 0) == in check_20mhz_bss() 280 if (!elems.ht_capabilities) { in check_20mhz_bss() 286 if (elems.ht_operation) { in check_20mhz_bss() 287 oper = (struct ieee80211_ht_operation *) elems.ht_operation; in check_20mhz_bss() 322 struct ieee802_11_elems elems; in check_40mhz_2g4() local [all …]
|
| H A D | ieee802_11_common.h | 223 struct ieee802_11_elems *elems, 226 struct ieee802_11_elems *elems); 227 void ieee802_11_elems_clear_ids(struct ieee802_11_elems *elems, 229 void ieee802_11_elems_clear_ext_ids(struct ieee802_11_elems *elems, 231 ParseRes ieee802_11_parse_link_assoc_req(struct ieee802_11_elems *elems, 234 ParseRes ieee802_11_parse_link_assoc_resp(struct ieee802_11_elems *elems, 279 int supp_rates_11b_only(struct ieee802_11_elems *elems); 415 unsigned int get_max_nss_capability(struct ieee802_11_elems *elems, 426 get_supported_channel_width(struct ieee802_11_elems *elems, int freq); 428 enum chan_width get_operation_channel_width(struct ieee802_11_elems *elems);
|
| /freebsd/contrib/wpa/wpa_supplicant/ |
| H A D | mesh_mpm.c | 124 struct ieee802_11_elems *elems) in copy_supp_rates() argument 126 if (!elems->supp_rates) { in copy_supp_rates() 132 if (elems->supp_rates_len + elems->ext_supp_rates_len > in copy_supp_rates() 136 " %d+%d", MAC2STR(sta->addr), elems->supp_rates_len, in copy_supp_rates() 137 elems->ext_supp_rates_len); in copy_supp_rates() 143 elems->supp_rates, elems->supp_rates_len, in copy_supp_rates() 144 elems->ext_supp_rates, elems->ext_supp_rates_len); in copy_supp_rates() 152 struct ieee802_11_elems *elems) in matches_local() argument 156 if (elems->mesh_config_len < 5) in matches_local() 159 return (mconf->meshid_len == elems->mesh_id_len && in matches_local() [all …]
|
| H A D | mesh.c | 588 struct ieee802_11_elems elems; in wpa_mesh_notify_peer() local 593 if (ieee802_11_parse_elems(ies, ie_len, &elems, 0) == ParseFailed) { in wpa_mesh_notify_peer() 598 wpa_mesh_new_mesh_peer(wpa_s, addr, &elems); in wpa_mesh_notify_peer() 741 struct ieee802_11_elems elems; in mesh_attr_text() local 746 if (ieee802_11_parse_elems(ies, ies_len, &elems, 0) == ParseFailed) in mesh_attr_text() 749 if (elems.mesh_id_len < 1) in mesh_attr_text() 752 mesh_id = os_malloc(elems.mesh_id_len + 1); in mesh_attr_text() 756 os_memcpy(mesh_id, elems.mesh_id, elems.mesh_id_len); in mesh_attr_text() 757 mesh_id[elems.mesh_id_len] = '\0'; in mesh_attr_text() 764 if (elems.mesh_config_len > 6) { in mesh_attr_text() [all …]
|
| H A D | sme.c | 53 static int sme_validate_basic_mle(const struct ieee802_11_elems *elems, 856 struct ieee802_11_elems elems; in wpas_sme_ml_auth() local 864 &elems, 0) == ParseFailed) { in wpas_sme_ml_auth() 869 if (!elems.basic_mle || !elems.basic_mle_len) { in wpas_sme_ml_auth() 881 return sme_validate_basic_mle(&elems, wpa_s->ap_mld_addr); in wpas_sme_ml_auth() 2713 struct ieee802_11_elems elems; in sme_external_ml_auth() local 2716 &elems, 0) == ParseFailed) { in sme_external_ml_auth() 2721 if (!elems.basic_mle || !elems.basic_mle_len) { in sme_external_ml_auth() 2733 return sme_validate_basic_mle(&elems, wpa_s->sme.ext_auth_ap_mld_addr); in sme_external_ml_auth() 3204 static int sme_validate_basic_mle(const struct ieee802_11_elems *elems, in sme_validate_basic_mle() argument [all …]
|
| H A D | wmm_ac.c | 421 struct ieee802_11_elems elems; in wmm_ac_process_param_elem() local 427 if (ieee802_11_parse_elems(ies, ies_len, &elems, 1) == ParseFailed) { in wmm_ac_process_param_elem() 432 if (!elems.wmm) { in wmm_ac_process_param_elem() 437 if (elems.wmm_len != sizeof(*wmm_params)) { in wmm_ac_process_param_elem() 442 wmm_params = (struct wmm_parameter_element *)(elems.wmm); in wmm_ac_process_param_elem() 738 struct ieee802_11_elems elems; in wmm_ac_rx_action() local 782 if (ieee802_11_parse_elems(data + 2, len - 2, &elems, 1) != ParseOK) { in wmm_ac_rx_action() 790 if (elems.wmm_tspec_len != sizeof(struct wmm_tspec_element) - 2) { in wmm_ac_rx_action() 795 tspec = (struct wmm_tspec_element *)(elems.wmm_tspec - 2); in wmm_ac_rx_action()
|
| H A D | wnm_sta.c | 895 struct ieee802_11_elems elems; in wnm_nei_rep_add_bss() local 900 if (ieee802_11_parse_elems(wpa_bss_ie_ptr(bss), bss->ie_len, &elems, in wnm_nei_rep_add_bss() 904 chanwidth = get_operation_channel_width(&elems); in wnm_nei_rep_add_bss() 909 ht_oper = (struct ieee80211_ht_operation *) elems.ht_operation; in wnm_nei_rep_add_bss() 929 phy_type = ieee80211_get_phy_type(bss->freq, elems.ht_operation != NULL, in wnm_nei_rep_add_bss() 930 elems.vht_operation != NULL, in wnm_nei_rep_add_bss() 931 elems.he_operation != NULL); in wnm_nei_rep_add_bss() 2082 const struct wpabuf *elems) in wnm_send_coloc_intf_report() argument 2087 if (wpa_s->wpa_state < WPA_ASSOCIATED || !elems) in wnm_send_coloc_intf_report() 2094 buf = wpabuf_alloc(3 + wpabuf_len(elems)); in wnm_send_coloc_intf_report() [all …]
|
| H A D | bss.c | 1715 struct ieee802_11_elems elems; in wpa_bss_validate_rsne_ml() local 1723 if (ieee802_11_parse_elems(ies_pos, ies_len, &elems, 0) == in wpa_bss_validate_rsne_ml() 1729 if (elems.rsne_override_2 && wpas_rsn_overriding(wpa_s, ssid)) { in wpa_bss_validate_rsne_ml() 1730 rsne = elems.rsne_override_2; in wpa_bss_validate_rsne_ml() 1731 rsne_len = elems.rsne_override_2_len; in wpa_bss_validate_rsne_ml() 1733 } else if (elems.rsne_override && wpas_rsn_overriding(wpa_s, ssid)) { in wpa_bss_validate_rsne_ml() 1734 rsne = elems.rsne_override; in wpa_bss_validate_rsne_ml() 1735 rsne_len = elems.rsne_override_len; in wpa_bss_validate_rsne_ml() 1738 rsne = elems.rsn_ie; in wpa_bss_validate_rsne_ml() 1739 rsne_len = elems.rsn_ie_len; in wpa_bss_validate_rsne_ml() [all …]
|
| /freebsd/contrib/wpa/src/pasn/ |
| H A D | pasn_initiator.c | 372 struct ieee802_11_elems elems; in wpas_pasn_wd_fils_rx() local 415 if (ieee802_11_parse_elems(data, buf_len, &elems, 1) == ParseFailed) { in wpas_pasn_wd_fils_rx() 420 if (!elems.rsn_ie || !elems.nonce || !elems.nonce || in wpas_pasn_wd_fils_rx() 421 !elems.wrapped_data) { in wpas_pasn_wd_fils_rx() 426 ret = wpa_parse_wpa_ie(elems.rsn_ie - 2, elems.rsn_ie_len + 2, in wpas_pasn_wd_fils_rx() 446 wpa_hexdump(MSG_DEBUG, "PASN: FILS: ANonce", elems.nonce, NONCE_LEN); in wpas_pasn_wd_fils_rx() 447 os_memcpy(anonce, elems.nonce, NONCE_LEN); in wpas_pasn_wd_fils_rx() 449 wpa_hexdump(MSG_DEBUG, "PASN: FILS: FILS Session", elems.fils_session, in wpas_pasn_wd_fils_rx() 452 if (os_memcmp(pasn->fils.session, elems.fils_session, in wpas_pasn_wd_fils_rx() 458 fils_wd = ieee802_11_defrag(elems.wrapped_data, elems.wrapped_data_len, in wpas_pasn_wd_fils_rx() [all …]
|
| H A D | pasn_responder.c | 807 const struct ieee802_11_elems *elems, const u8 *peer_addr, in pasn_resp_find_pmksa() argument 819 ieee802_11_rsnx_capab_len(elems->rsnxe, elems->rsnxe_len, in pasn_resp_find_pmksa() 841 struct ieee802_11_elems elems; in handle_auth_pasn_1() local 867 &elems, 0) == ParseFailed) { in handle_auth_pasn_1() 874 if (!elems.rsn_ie) { in handle_auth_pasn_1() 880 ret = wpa_parse_wpa_ie_rsn(elems.rsn_ie - 2, elems.rsn_ie_len + 2, in handle_auth_pasn_1() 929 ieee802_11_rsnx_capab_len(elems.rsnxe, elems.rsnxe_len, in handle_auth_pasn_1() 941 !ieee802_11_rsnx_capab_len(elems.rsnxe, elems.rsnxe_len, in handle_auth_pasn_1() 951 !ieee802_11_rsnx_capab_len(elems.rsnxe, elems.rsnxe_len, in handle_auth_pasn_1() 961 if (!elems.pasn_params || !elems.pasn_params_len) { in handle_auth_pasn_1() [all …]
|
| H A D | pasn_common.c | 350 struct ieee802_11_elems elems; in pasn_parse_encrypted_data() local 351 if (ieee802_11_parse_elems(data, len, &elems, 0) == ParseFailed) { in pasn_parse_encrypted_data() 357 if (!elems.pasn_encrypted_data || elems.pasn_encrypted_data_len < 8 || in pasn_parse_encrypted_data() 358 elems.pasn_encrypted_data_len % 8) { in pasn_parse_encrypted_data() 363 buf_len = elems.pasn_encrypted_data_len - 8; in pasn_parse_encrypted_data() 370 elems.pasn_encrypted_data, buf); in pasn_parse_encrypted_data()
|
| /freebsd/contrib/wpa/src/ap/ |
| H A D | ap_list.c | 171 struct ieee802_11_elems *elems, in ap_list_process_beacon() argument 193 elems->supp_rates, elems->supp_rates_len, in ap_list_process_beacon() 194 elems->ext_supp_rates, elems->ext_supp_rates_len); in ap_list_process_beacon() 196 if (elems->erp_info) in ap_list_process_beacon() 197 ap->erp = elems->erp_info[0]; in ap_list_process_beacon() 201 if (elems->ds_params) in ap_list_process_beacon() 202 ap->channel = elems->ds_params[0]; in ap_list_process_beacon() 203 else if (elems->ht_operation) in ap_list_process_beacon() 204 ap->channel = elems->ht_operation[0]; in ap_list_process_beacon() 208 if (elems->ht_capabilities) in ap_list_process_beacon()
|
| H A D | drv_callbacks.c | 56 struct ieee802_11_elems elems; in hostapd_notify_assoc_fils_finish() local 68 sta->fils_pending_assoc_req_len, &elems, in hostapd_notify_assoc_fils_finish() 70 !elems.fils_session) { in hostapd_notify_assoc_fils_finish() 77 elems.fils_session, in hostapd_notify_assoc_fils_finish() 153 struct ieee802_11_elems elems; in hostapd_update_sta_links_status() local 163 if (ieee802_11_parse_elems(resp_ies, resp_ies_len, &elems, 0) == in hostapd_update_sta_links_status() 170 mlebuf = ieee802_11_defrag(elems.basic_mle, elems.basic_mle_len, true); in hostapd_update_sta_links_status() 325 struct ieee802_11_elems elems; in hostapd_notif_assoc() local 377 if (ieee802_11_parse_elems(req_ies, req_ies_len, &elems, 0) == in hostapd_notif_assoc() 383 if (elems.wps_ie) { in hostapd_notif_assoc() [all …]
|
| H A D | ieee802_11.c | 2390 struct ieee802_11_elems *elems) in wpa_auth_validate_802_1x_frame() argument 2395 elems->rsnxe, in wpa_auth_validate_802_1x_frame() 2396 elems->rsnxe_len); in wpa_auth_validate_802_1x_frame() 2407 (elems->rsn_ie || elems->nonce || elems->owe_dh)) { in wpa_auth_validate_802_1x_frame() 2413 (!elems->rsn_ie || !elems->nonce || in wpa_auth_validate_802_1x_frame() 2414 elems->nonce_len != WPA_NONCE_LEN || !elems->owe_dh)) { in wpa_auth_validate_802_1x_frame() 2421 if (elems->rsn_ie && elems->akm_suite_selector) { in wpa_auth_validate_802_1x_frame() 2428 (!elems->rsn_ie || in wpa_auth_validate_802_1x_frame() 2429 wpa_parse_wpa_ie_rsn(elems->rsn_ie - 2, elems->rsn_ie_len + 2, in wpa_auth_validate_802_1x_frame() 2435 if (enc_assoc && elems->rsn_ie) { in wpa_auth_validate_802_1x_frame() [all …]
|
| H A D | nan_usd_ap.c | 210 struct wpabuf *elems = NULL; in hostapd_nan_usd_publish() local 216 ssi, elems, params, p2p, NULL); in hostapd_nan_usd_publish() 217 wpabuf_free(elems); in hostapd_nan_usd_publish() 249 struct wpabuf *elems = NULL; in hostapd_nan_usd_subscribe() local 255 srv_proto_type, ssi, elems, params, p2p, in hostapd_nan_usd_subscribe() 257 wpabuf_free(elems); in hostapd_nan_usd_subscribe() 273 const struct wpabuf *elems, in hostapd_nan_usd_transmit() argument 279 return nan_de_transmit(hapd->nan_de, handle, ssi, elems, peer_addr, in hostapd_nan_usd_transmit()
|
| H A D | beacon.c | 1466 struct ieee802_11_elems elems; in handle_probe_req() local 1512 if (ieee802_11_parse_elems(ie, ie_len, &elems, 0) == ParseFailed) { in handle_probe_req() 1518 if ((!elems.ssid || !elems.supp_rates)) { in handle_probe_req() 1535 if (elems.ds_params && in handle_probe_req() 1539 hapd->iconf->channel != elems.ds_params[0]) { in handle_probe_req() 1542 hapd->iconf->channel, elems.ds_params[0]); in handle_probe_req() 1547 if (hapd->p2p && hapd->p2p_group && elems.wps_ie) { in handle_probe_req() 1560 if (hapd->p2p && hapd->p2p_group && elems.p2p) { in handle_probe_req() 1573 if (hapd->conf->ignore_broadcast_ssid && elems.ssid_len == 0 && in handle_probe_req() 1574 elems.ssid_list_len == 0 && elems.short_ssid_list_len == 0) { in handle_probe_req() [all …]
|
| H A D | mbo_ap.c | 84 struct ieee802_11_elems *elems) in mbo_ap_check_sta_assoc() argument 89 if (!hapd->conf->mbo_enabled || !elems->mbo) in mbo_ap_check_sta_assoc() 92 pos = elems->mbo + 4; in mbo_ap_check_sta_assoc() 93 len = elems->mbo_len - 4; in mbo_ap_check_sta_assoc()
|
| H A D | mbo_ap.h | 19 struct ieee802_11_elems *elems); 29 struct ieee802_11_elems *elems) in mbo_ap_check_sta_assoc() argument
|
| H A D | wmm.c | 320 struct ieee802_11_elems elems; in hostapd_wmm_action() local 339 if (ieee802_11_parse_elems(pos, left, &elems, 1) == ParseFailed) { in hostapd_wmm_action() 349 if (!elems.wmm_tspec || in hostapd_wmm_action() 350 elems.wmm_tspec_len != (sizeof(struct wmm_tspec_element) - 2)) { in hostapd_wmm_action() 367 (elems.wmm_tspec - 2), len); in hostapd_wmm_action()
|
| /freebsd/contrib/wpa/src/p2p/ |
| H A D | p2p_invitation.c | 26 struct wpabuf *buf, *elems, *p2p_ie; in p2p_build_invitation_req() local 65 elems = wpabuf_alloc(1000); in p2p_build_invitation_req() 66 if (!elems) { in p2p_build_invitation_req() 72 p2p_buf_add_config_timeout(elems, 0, 0); in p2p_build_invitation_req() 74 p2p_buf_add_config_timeout(elems, p2p->go_timeout, in p2p_build_invitation_req() 76 p2p_buf_add_invitation_flags(elems, p2p->inv_persistent ? in p2p_build_invitation_req() 80 p2p_buf_add_operating_channel(elems, p2p->cfg->country, in p2p_build_invitation_req() 84 p2p_buf_add_group_bssid(elems, p2p->inv_bssid); in p2p_build_invitation_req() 87 p2p_buf_add_channel_list(elems, p2p->cfg->country, &p2p->channels, in p2p_build_invitation_req() 95 p2p_buf_add_group_id(elems, dev_addr, p2p->inv_ssid, p2p->inv_ssid_len); in p2p_build_invitation_req() [all …]
|
| /freebsd/sys/dev/ofw/ |
| H A D | ofw_bus_subr.c | 988 phandle_t *elems; in ofw_bus_parse_xref_list_internal() local 992 elems = NULL; in ofw_bus_parse_xref_list_internal() 993 nelems = OF_getencprop_alloc_multi(node, list_name, sizeof(*elems), in ofw_bus_parse_xref_list_internal() 994 (void **)&elems); in ofw_bus_parse_xref_list_internal() 999 pnode = elems[i++]; in ofw_bus_parse_xref_list_internal() 1019 (*cells)[j] = elems[i + j]; in ofw_bus_parse_xref_list_internal() 1024 if (elems != NULL) in ofw_bus_parse_xref_list_internal() 1025 free(elems, M_OFWPROP); in ofw_bus_parse_xref_list_internal() 1084 char *elems; in ofw_bus_find_string_index() local 1087 elems = NULL; in ofw_bus_find_string_index() [all …]
|
| /freebsd/contrib/wpa/src/rsn_supp/ |
| H A D | wpa.c | 6286 struct ieee802_11_elems elems; in fils_process_auth() local 6357 if (ieee802_11_parse_elems(pos, end - pos, &elems, 1) == ParseFailed) { in fils_process_auth() 6363 wpa_hexdump(MSG_DEBUG, "FILS: RSN element", elems.rsn_ie, in fils_process_auth() 6364 elems.rsn_ie_len); in fils_process_auth() 6365 if (!elems.rsn_ie || in fils_process_auth() 6366 wpa_parse_wpa_ie_rsn(elems.rsn_ie - 2, elems.rsn_ie_len + 2, in fils_process_auth() 6372 if (!elems.nonce) { in fils_process_auth() 6376 os_memcpy(sm->fils_anonce, elems.nonce, NONCE_LEN); in fils_process_auth() 6381 if (!elems.mdie || !elems.ftie) { in fils_process_auth() 6414 sm->fils_ft_ies = wpabuf_alloc(2 + elems.mdie_len + in fils_process_auth() [all …]
|
| /freebsd/contrib/wpa/src/nan/ |
| H A D | nan_module_tests.c | 92 struct wpabuf *elems; member 122 u8 elems[] = { in nan_test_global_init() local 145 global->elems = wpabuf_alloc_copy(elems, sizeof(elems)); in nan_test_global_init() 191 wpabuf_free(global->elems); in nan_test_global_deinit() 381 params->sched.elems = dev->global->elems; in nan_ndp_notify_action() 437 params->sched.elems = dev->global->elems; in nan_ndp_notify_action() 1085 params->sched.elems = sub->global->elems; in nan_test_ndp_request()
|