Home
last modified time | relevance | path

Searched refs:wpabuf_len (Results 1 – 25 of 151) sorted by relevance

1234567

/external/wpa_supplicant_8/wpa_supplicant/
Dwifi_display.c51 len += wpabuf_len(global->wfd_subelem[i]); in wifi_display_get_wfd_ie()
137 len += wpabuf_len(global->wfd_subelem[ in wifi_display_update_wfd_ie()
141 len += wpabuf_len(global->wfd_subelem[ in wifi_display_update_wfd_ie()
145 len += wpabuf_len(global->wfd_subelem[ in wifi_display_update_wfd_ie()
148 len += wpabuf_len(global->wfd_subelem[ in wifi_display_update_wfd_ie()
151 len += wpabuf_len(global->wfd_subelem[ in wifi_display_update_wfd_ie()
154 len += wpabuf_len(global->wfd_subelem[WFD_SUBELEM_EXT_CAPAB]); in wifi_display_update_wfd_ie()
307 ie, ie ? (unsigned long) wpabuf_len(ie) : 0); in wifi_display_subelem_set_from_ies()
309 if (ie == NULL || wpabuf_len(ie) < 6) in wifi_display_subelem_set_from_ies()
313 end = pos + wpabuf_len(ie); in wifi_display_subelem_set_from_ies()
[all …]
Dnfc_pw_token.c29 len = wpabuf_len(buf); in print_bin()
62 wpabuf_len(buf)); in main()
66 wpabuf_len(ndef)); in main()
Doffchannel.c32 wpabuf_len(wpa_s->pending_action_tx) >= 2 && in wpas_get_tx_interface()
150 wpabuf_len(wpa_s->pending_action_tx), in wpas_send_action_cb()
162 wpabuf_len(wpa_s->pending_action_tx), in wpas_send_action_cb()
196 if (data_len - wpabuf_len(wpa_s->pending_action_tx) != 24 || in offchannel_send_action_tx_status()
198 wpabuf_len(wpa_s->pending_action_tx)) != 0) { in offchannel_send_action_tx_status()
321 wpabuf_len(wpa_s->pending_action_tx), in offchannel_send_action()
Ddpp_supplicant.c100 wpabuf_len(auth->resp_msg), in wpas_dpp_qr_code()
592 wpabuf_len(wpa_s->dpp_auth->req_msg), in wpas_dpp_auth_init()
873 wpabuf_len(wpa_s->dpp_auth->resp_msg), in wpas_dpp_rx_auth_req()
910 ssid->dpp_csign = os_malloc(wpabuf_len(auth->c_sign_key)); in wpas_dpp_add_network()
914 wpabuf_len(auth->c_sign_key)); in wpas_dpp_add_network()
915 ssid->dpp_csign_len = wpabuf_len(auth->c_sign_key); in wpas_dpp_add_network()
920 os_malloc(wpabuf_len(auth->net_access_key)); in wpas_dpp_add_network()
925 wpabuf_len(auth->net_access_key)); in wpas_dpp_add_network()
926 ssid->dpp_netaccesskey_len = wpabuf_len(auth->net_access_key); in wpas_dpp_add_network()
999 hexlen = 2 * wpabuf_len(auth->c_sign_key) + 1; in wpas_dpp_handle_config_obj()
[all …]
Dsme.c95 buf = wpabuf_alloc(4 + wpabuf_len(wpa_s->sae_commit_override)); in sme_auth_build_sae_commit()
125 len = wpa_s->sme.sae_token ? wpabuf_len(wpa_s->sme.sae_token) : 0; in sme_auth_build_sae_commit()
367 if (wps_ie && wpabuf_len(wps_ie) <= in sme_send_authentication()
369 wpa_s->sme.assoc_req_ie_len = wpabuf_len(wps_ie); in sme_send_authentication()
456 int fst_ies_len = wpabuf_len(wpa_s->fst_ies); in sme_send_authentication()
506 if (wpabuf_len(hs20) <= len) { in sme_send_authentication()
509 wpabuf_head(hs20), wpabuf_len(hs20)); in sme_send_authentication()
510 wpa_s->sme.assoc_req_ie_len += wpabuf_len(hs20); in sme_send_authentication()
523 if (wpabuf_len(buf) <= len) { in sme_send_authentication()
526 wpabuf_head(buf), wpabuf_len(buf)); in sme_send_authentication()
[all …]
/external/wpa_supplicant_8/src/ap/
Drrm.c187 size_t len = 2 + wpabuf_len(nr->nr); in hostapd_neighbor_report_len()
190 len += 2 + wpabuf_len(nr->lci); in hostapd_neighbor_report_len()
193 len += 2 + wpabuf_len(nr->civic); in hostapd_neighbor_report_len()
249 wpabuf_put_u8(buf, wpabuf_len(nr->lci)); in hostapd_send_nei_report_resp()
261 wpabuf_put_u8(buf, wpabuf_len(nr->civic)); in hostapd_send_nei_report_resp()
273 wpabuf_head(buf), wpabuf_len(buf)); in hostapd_send_nei_report_resp()
426 wpabuf_head(buf), wpabuf_len(buf)); in hostapd_send_lci_req()
530 if (wpabuf_tailroom(buf) < 2 + wpabuf_len(nr->nr)) { in hostapd_send_range_req()
537 wpabuf_put_u8(buf, wpabuf_len(nr->nr)); in hostapd_send_range_req()
542 *len = wpabuf_len(buf) - 7; in hostapd_send_range_req()
[all …]
Dbeacon.c439 buflen += wpabuf_len(hapd->wps_probe_resp_ie); in hostapd_gen_probe_resp()
443 buflen += wpabuf_len(hapd->p2p_probe_resp_ie); in hostapd_gen_probe_resp()
447 buflen += wpabuf_len(hapd->iface->fst_ies); in hostapd_gen_probe_resp()
450 buflen += wpabuf_len(hapd->conf->vendor_elements); in hostapd_gen_probe_resp()
551 wpabuf_len(hapd->iface->fst_ies)); in hostapd_gen_probe_resp()
552 pos += wpabuf_len(hapd->iface->fst_ies); in hostapd_gen_probe_resp()
585 wpabuf_len(hapd->wps_probe_resp_ie)); in hostapd_gen_probe_resp()
586 pos += wpabuf_len(hapd->wps_probe_resp_ie); in hostapd_gen_probe_resp()
594 wpabuf_len(hapd->p2p_probe_resp_ie)); in hostapd_gen_probe_resp()
595 pos += wpabuf_len(hapd->p2p_probe_resp_ie); in hostapd_gen_probe_resp()
[all …]
Dhs20.c137 wpabuf_head(buf), wpabuf_len(buf)); in hs20_send_wnm_notification()
155 buf = wpabuf_alloc(4 + 6 + wpabuf_len(payload)); in hs20_send_wnm_notification_deauth_req()
166 wpabuf_put_u8(buf, 4 + wpabuf_len(payload)); in hs20_send_wnm_notification_deauth_req()
172 wpabuf_head(buf), wpabuf_len(buf)); in hs20_send_wnm_notification_deauth_req()
Ddpp_hostapd.c81 wpabuf_len(hapd->dpp_auth->resp_msg)); in hostapd_dpp_qr_code()
525 wpabuf_len(hapd->dpp_auth->req_msg)); in hostapd_dpp_auth_init()
630 wpabuf_len(hapd->dpp_auth->resp_msg)); in hostapd_dpp_rx_auth_req()
657 if (wpabuf_len(adv_proto) != 10 || in hostapd_dpp_gas_resp_cb()
707 hexlen = 2 * wpabuf_len(auth->c_sign_key) + 1; in hostapd_dpp_gas_resp_cb()
712 wpabuf_len(auth->c_sign_key)); in hostapd_dpp_gas_resp_cb()
722 hexlen = 2 * wpabuf_len(auth->net_access_key) + 1; in hostapd_dpp_gas_resp_cb()
727 wpabuf_len(auth->net_access_key)); in hostapd_dpp_gas_resp_cb()
772 buf = gas_build_initial_req(0, 10 + 2 + wpabuf_len(conf_req)); in hostapd_dpp_start_gas_client()
789 wpabuf_put_le16(buf, wpabuf_len(conf_req)); in hostapd_dpp_start_gas_client()
[all …]
/external/wpa_supplicant_8/src/eap_common/
Deap_common.c35 if (wpabuf_len(msg) < sizeof(*hdr)) { in eap_hdr_len_valid()
41 if (len < sizeof(*hdr) + min_payload || len > wpabuf_len(msg)) { in eap_hdr_len_valid()
171 if (wpabuf_len(msg) < sizeof(*hdr)) in eap_update_len()
173 hdr->length = host_to_be16(wpabuf_len(msg)); in eap_update_len()
186 if (wpabuf_len(msg) < sizeof(*eap)) in eap_get_id()
201 if (wpabuf_len(msg) < sizeof(struct eap_hdr) + 1) in eap_get_type()
Deap_sim_common.c173 if (mac == NULL || wpabuf_len(req) < EAP_SIM_MAC_LEN || in eap_sim_verify_mac()
175 mac > wpabuf_head_u8(req) + wpabuf_len(req) - EAP_SIM_MAC_LEN) in eap_sim_verify_mac()
178 tmp = os_memdup(wpabuf_head(req), wpabuf_len(req)); in eap_sim_verify_mac()
183 len[0] = wpabuf_len(req); in eap_sim_verify_mac()
190 tmp, wpabuf_len(req)); in eap_sim_verify_mac()
367 if (mac == NULL || wpabuf_len(req) < EAP_SIM_MAC_LEN || in eap_sim_verify_mac_sha256()
369 mac > wpabuf_head_u8(req) + wpabuf_len(req) - EAP_SIM_MAC_LEN) in eap_sim_verify_mac_sha256()
372 tmp = os_memdup(wpabuf_head(req), wpabuf_len(req)); in eap_sim_verify_mac_sha256()
377 len[0] = wpabuf_len(req); in eap_sim_verify_mac_sha256()
384 tmp, wpabuf_len(req)); in eap_sim_verify_mac_sha256()
[all …]
/external/wpa_supplicant_8/src/utils/
Dwpabuf.c171 struct wpabuf *buf = wpabuf_alloc(wpabuf_len(src)); in wpabuf_dup()
173 wpabuf_put_data(buf, wpabuf_head(src), wpabuf_len(src)); in wpabuf_dup()
211 os_memset(wpabuf_mhead(buf), 0, wpabuf_len(buf)); in wpabuf_clear_free()
219 void *tmp = wpabuf_mhead_u8(buf) + wpabuf_len(buf); in wpabuf_put()
246 len += wpabuf_len(a); in wpabuf_concat()
247 len += wpabuf_len(b); in wpabuf_concat()
283 blen = wpabuf_len(buf); in wpabuf_zeropad()
301 void *tmp = wpabuf_mhead_u8(buf) + wpabuf_len(buf); in wpabuf_printf()
Dext_password.c90 if (mlock(wpabuf_head(buf), wpabuf_len(buf)) < 0) { in ext_password_alloc()
104 os_memset(wpabuf_mhead(pw), 0, wpabuf_len(pw)); in ext_password_free()
106 if (munlock(wpabuf_head(pw), wpabuf_len(pw)) < 0) { in ext_password_free()
/external/wpa_supplicant_8/src/radius/
Dradius.c381 msg->hdr->length = host_to_be16(wpabuf_len(msg->buf)); in radius_msg_finish()
383 wpabuf_len(msg->buf), (u8 *) (attr + 1)); in radius_msg_finish()
385 msg->hdr->length = host_to_be16(wpabuf_len(msg->buf)); in radius_msg_finish()
387 if (wpabuf_len(msg->buf) > 0xffff) { in radius_msg_finish()
389 (unsigned long) wpabuf_len(msg->buf)); in radius_msg_finish()
411 msg->hdr->length = host_to_be16(wpabuf_len(msg->buf)); in radius_msg_finish_srv()
415 wpabuf_len(msg->buf), (u8 *) (attr + 1)); in radius_msg_finish_srv()
423 len[2] = wpabuf_len(msg->buf) - sizeof(struct radius_hdr); in radius_msg_finish_srv()
428 if (wpabuf_len(msg->buf) > 0xffff) { in radius_msg_finish_srv()
430 (unsigned long) wpabuf_len(msg->buf)); in radius_msg_finish_srv()
[all …]
/external/wpa_supplicant_8/src/wps/
Dwps_attr_build.c81 wpabuf_put_be16(msg, wpabuf_len(pubkey)); in wps_build_public_key()
174 len[0] = wpabuf_len(wps->last_msg); in wps_build_authenticator()
176 len[1] = wpabuf_len(msg); in wps_build_authenticator()
365 wpabuf_len(msg), hash); in wps_build_key_wrap_auth()
384 pad_len = block_size - wpabuf_len(plain) % block_size; in wps_build_encr_settings()
388 wpabuf_put_be16(msg, block_size + wpabuf_len(plain)); in wps_build_encr_settings()
396 if (aes_128_cbc_encrypt(wps->keywrapkey, iv, data, wpabuf_len(plain))) in wps_build_encr_settings()
415 hash_len = wpabuf_len(pubkey); in wps_build_oob_dev_pw()
450 ie = wpabuf_alloc(wpabuf_len(data) + 100); in wps_ie_encapsulate()
457 end = pos + wpabuf_len(data); in wps_ie_encapsulate()
/external/wpa_supplicant_8/src/eap_peer/
Deap_tls_common.c400 tls_in_len = data->tls_in ? wpabuf_len(data->tls_in) : 0; in eap_peer_tls_reassemble_fragment()
401 in_len = in_data ? wpabuf_len(in_data) : 0; in eap_peer_tls_reassemble_fragment()
471 if (data->tls_in_left > wpabuf_len(in_data) || data->tls_in) { in eap_peer_tls_data_reassemble()
563 len = wpabuf_len(data->tls_out) - data->tls_out_pos; in eap_tls_process_output()
567 (unsigned long) wpabuf_len(data->tls_out)); in eap_tls_process_output()
582 (wpabuf_len(data->tls_out) > data->tls_out_limit || in eap_tls_process_output()
607 wpabuf_put_be32(*out_data, wpabuf_len(data->tls_out)); in eap_tls_process_output()
659 if (data->tls_out && wpabuf_len(data->tls_out) > 0 && in eap_peer_tls_process_helper()
660 wpabuf_len(in_data) > 0) { in eap_peer_tls_process_helper()
666 if (data->tls_out == NULL || wpabuf_len(data->tls_out) == 0) { in eap_peer_tls_process_helper()
[all …]
Deap_peap.c648 wpabuf_len(buf), in eap_peap_phase2_request()
752 " Phase 2", (unsigned long) wpabuf_len(in_data)); in eap_peap_decrypt()
765 if (wpabuf_len(in_data) == 0 && sm->workaround && in eap_peap_decrypt()
777 } else if (wpabuf_len(in_data) == 0) { in eap_peap_decrypt()
793 if (wpabuf_len(in_decrypted) == 5 && hdr->code == EAP_CODE_REQUEST && in eap_peap_decrypt()
800 if (wpabuf_len(in_decrypted) >= 5 && hdr->code == EAP_CODE_REQUEST && in eap_peap_decrypt()
808 wpabuf_len(in_decrypted)); in eap_peap_decrypt()
818 wpabuf_len(in_decrypted)); in eap_peap_decrypt()
825 if (wpabuf_len(in_decrypted) < sizeof(*hdr)) { in eap_peap_decrypt()
828 (unsigned long) wpabuf_len(in_decrypted)); in eap_peap_decrypt()
[all …]
Deap_tnc.c100 send_len = wpabuf_len(data->out_buf) - data->out_used; in eap_tnc_build_msg()
120 wpabuf_put_be32(resp, wpabuf_len(data->out_buf)); in eap_tnc_build_msg()
129 if (data->out_used == wpabuf_len(data->out_buf)) { in eap_tnc_build_msg()
139 (unsigned long) wpabuf_len(data->out_buf) - in eap_tnc_build_msg()
316 wpabuf_len(data->in_buf)); in eap_tnc_process()
397 wpabuf_head(resp), wpabuf_len(resp)); in eap_tnc_process()
/external/wpa_supplicant_8/src/p2p/
Dp2p_sd.c29 end = pos + wpabuf_len(wfd); in wfd_wsd_supported()
177 buf = gas_anqp_build_initial_req(0, 100 + wpabuf_len(tlvs)); in p2p_build_sd_query()
205 wpabuf_head(req), wpabuf_len(req), 200) < 0) in p2p_send_gas_comeback_req()
222 100 + (tlvs ? wpabuf_len(tlvs) : 0)); in p2p_build_sd_response()
317 wpabuf_head(req), wpabuf_len(req), wait_time) < 0) { in p2p_start_sd()
438 if (wpabuf_len(resp_tlvs) > max_len) { in p2p_sd_response()
475 wpabuf_head(resp), wpabuf_len(resp), wait_time) < 0) in p2p_sd_response()
656 frag_len = wpabuf_len(p2p->sd_resp) - p2p->sd_resp_pos; in p2p_rx_gas_comeback_req()
666 wpabuf_len(p2p->sd_resp)); in p2p_rx_gas_comeback_req()
676 (int) (wpabuf_len(p2p->sd_resp) - p2p->sd_resp_pos)); in p2p_rx_gas_comeback_req()
[all …]
Dp2p_group.c131 if (wpabuf_tailroom(ie) < wpabuf_len(m->client_info) + 1) in p2p_client_info()
170 wpabuf_put_le16(ie, wpabuf_len(noa)); in p2p_group_add_noa()
184 len = wpabuf_len(subelems) + 100; in p2p_group_encaps_probe_resp()
191 end = pos + wpabuf_len(subelems); in p2p_group_encaps_probe_resp()
216 extra = wpabuf_len(group->p2p->wfd_ie_beacon); in p2p_group_build_beacon_ie()
221 extra += wpabuf_len(group->p2p->vendor_elem[VENDOR_ELEM_BEACON_P2P_GO]); in p2p_group_build_beacon_ie()
263 ie = wpabuf_alloc(wpabuf_len(subelems) + 100); in wifi_display_encaps()
268 end = pos + wpabuf_len(subelems); in wifi_display_encaps()
299 end = pos + wpabuf_len(m->wfd_ie); in wifi_display_add_dev_info_descr()
364 wfd_subelems = wpabuf_alloc(wpabuf_len(group->p2p->wfd_ie_probe_resp) + in wifi_display_build_go_ie()
[all …]
/external/wpa_supplicant_8/src/crypto/
Dtls_internal.c479 in_data ? wpabuf_len(in_data) : 0, in tls_connection_handshake2()
523 wpabuf_len(in_data), &res_len); in tls_connection_server_handshake()
549 buf = wpabuf_alloc(wpabuf_len(in_data) + 300); in tls_connection_encrypt()
553 wpabuf_len(in_data), in tls_connection_encrypt()
568 buf = wpabuf_alloc(wpabuf_len(in_data) + 300); in tls_connection_encrypt()
572 wpabuf_len(in_data), in tls_connection_encrypt()
606 wpabuf_len(in_data), in tls_connection_decrypt2()
614 buf = wpabuf_alloc((wpabuf_len(in_data) + 500) * 3); in tls_connection_decrypt2()
618 wpabuf_len(in_data), in tls_connection_decrypt2()
/external/wpa_supplicant_8/src/common/
Dgas.c155 payload ? wpabuf_len(payload) : 0); in gas_anqp_build_initial_resp_buf()
197 payload ? wpabuf_len(payload) : 0); in gas_anqp_build_comeback_resp_buf()
223 if (buf == NULL || wpabuf_len(buf) < 2) in gas_anqp_set_len()
241 if (wpabuf_len(buf) < offset + 2) in gas_anqp_set_len()
Ddpp.c1397 attr_len = 2 * (4 + SHA256_MAC_LEN) + 4 + wpabuf_len(pi) + in dpp_auth_init()
1421 wpabuf_put_le16(msg, wpabuf_len(pi)); in dpp_auth_init()
1518 wpabuf_put_le16(msg, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_build_conf_req()
1519 wrapped = wpabuf_put(msg, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_build_conf_req()
1524 wpabuf_head(clear), wpabuf_len(clear), in dpp_build_conf_req()
1528 wrapped, wpabuf_len(clear) + AES_BLOCK_SIZE); in dpp_build_conf_req()
1598 len[num_elem] = wpabuf_len(pix) / 2; in dpp_gen_r_auth()
1602 len[num_elem] = wpabuf_len(prx) / 2; in dpp_gen_r_auth()
1607 len[num_elem] = wpabuf_len(bix) / 2; in dpp_gen_r_auth()
1612 len[num_elem] = wpabuf_len(brx) / 2; in dpp_gen_r_auth()
[all …]
/external/wpa_supplicant_8/src/eap_server/
Deap_server_tnc.c168 wpabuf_head(req), wpabuf_len(req)); in eap_tnc_build()
227 send_len = wpabuf_len(data->out_buf) - data->out_used; in eap_tnc_build_msg()
247 wpabuf_put_be32(req, wpabuf_len(data->out_buf)); in eap_tnc_build_msg()
253 if (data->out_used == wpabuf_len(data->out_buf)) { in eap_tnc_build_msg()
267 (unsigned long) wpabuf_len(data->out_buf) - in eap_tnc_build_msg()
365 wpabuf_len(inbuf)); in tncs_process()
531 wpabuf_head(data->in_buf), wpabuf_len(data->in_buf)); in eap_tnc_process()
Deap_server_peap.c249 req_len = wpabuf_len(buf); in eap_peap_build_phase2_req()
280 buf = eap_msg_alloc(EAP_VENDOR_MICROSOFT, 0x21, wpabuf_len(buf1), in eap_peap_build_phase2_soh()
290 req_len = wpabuf_len(buf); in eap_peap_build_phase2_soh()
394 mlen += wpabuf_len(data->soh_response); in eap_peap_build_phase2_tlv()
936 if (wpabuf_len(in_data) > sizeof(*hdr) && *pos == EAP_TYPE_NAK) { in eap_peap_process_phase2_response()
937 left = wpabuf_len(in_data) - sizeof(*hdr); in eap_peap_process_phase2_response()
1064 " Phase 2", (unsigned long) wpabuf_len(in_buf)); in eap_peap_process_phase2()
1093 wpabuf_len(in_decrypted)); in eap_peap_process_phase2()
1104 wpabuf_len(in_decrypted)); in eap_peap_process_phase2()
1112 if (wpabuf_len(in_decrypted) < (int) sizeof(*hdr)) { in eap_peap_process_phase2()
[all …]

1234567