Home
last modified time | relevance | path

Searched refs:payload_len (Results 1 – 25 of 78) sorted by relevance

1234

/freebsd/contrib/libfido2/src/
H A Diso7816.c11 iso7816_new(uint8_t cla, uint8_t ins, uint8_t p1, uint16_t payload_len) in iso7816_new() argument
16 alloc_len = sizeof(iso7816_apdu_t) + payload_len + 2; /* le1 le2 */ in iso7816_new()
20 apdu->payload_len = payload_len; in iso7816_new()
25 apdu->header.lc2 = (uint8_t)((payload_len >> 8) & 0xff); in iso7816_new()
26 apdu->header.lc3 = (uint8_t)(payload_len & 0xff); in iso7816_new()
45 if (cnt > apdu->payload_len || cnt > UINT16_MAX) in iso7816_add()
49 apdu->payload_len = (uint16_t)(apdu->payload_len - cnt); in iso7816_add()
H A Dio.c231 size_t r, payload_len, init_data_len, cont_data_len; in rx() local
249 payload_len = (size_t)((f.body.init.bcnth << 8) | f.body.init.bcntl); in rx()
250 fido_log_debug("%s: payload_len=%zu", __func__, payload_len); in rx()
252 if (count < payload_len) { in rx()
257 if (payload_len < init_data_len) { in rx()
258 memcpy(buf, f.body.init.data, payload_len); in rx()
259 return ((int)payload_len); in rx()
265 for (int seq = 0; r < payload_len; seq++) { in rx()
283 if (payload_len - r > cont_data_len) { in rx()
287 memcpy(buf + r, f.body.cont.data, payload_len - r); in rx()
[all …]
H A Dnfc.c23 uint8_t payload_len, uint8_t cla_flags) in tx_short_apdu() argument
35 apdu[4] = payload_len; in tx_short_apdu()
36 memcpy(&apdu[5], payload, payload_len); in tx_short_apdu()
37 apdu_len = (size_t)(5 + payload_len + 1); in tx_short_apdu()
/freebsd/sys/contrib/dev/athk/ath10k/
H A Dswap.c24 u32 payload_len; in ath10k_swap_code_seg_fill() local
35 payload_len = __le32_to_cpu(swap_item->tlv.length); in ath10k_swap_code_seg_fill()
36 if ((payload_len > size_left) || in ath10k_swap_code_seg_fill()
37 (payload_len == 0 && in ath10k_swap_code_seg_fill()
40 payload_len); in ath10k_swap_code_seg_fill()
44 if (payload_len == 0) { in ath10k_swap_code_seg_fill()
55 memcpy(virt_addr, swap_item->tlv.data, payload_len); in ath10k_swap_code_seg_fill()
56 virt_addr += payload_len; in ath10k_swap_code_seg_fill()
57 length = payload_len + sizeof(struct ath10k_swap_code_seg_tlv); in ath10k_swap_code_seg_fill()
60 total_payload_len += payload_len; in ath10k_swap_code_seg_fill()
/freebsd/contrib/tcpdump/
H A Dprint-ip6.c231 uint32_t payload_len; in ip6_print() local
250 payload_len = GET_BE_U_2(ip6->ip6_plen); in ip6_print()
273 if (payload_len != 0) { in ip6_print()
274 len = payload_len + sizeof(struct ip6_hdr); in ip6_print()
299 payload_len); in ip6_print()
349 advance = hbhopt_process(ndo, cp, &found_jumbo, &payload_len); in ip6_print()
350 if (payload_len == 0 && found_jumbo == 0) { in ip6_print()
432 len = payload_len + sizeof(struct ip6_hdr); in ip6_print()
454 if (payload_len == 0) { in ip6_print()
H A Dprint-ip6opts.c89 int *found_jumbop, uint32_t *payload_len) in ip6_opt_process() argument
151 if (payload_len == NULL) { in ip6_opt_process()
155 } else if (*payload_len != 0) { in ip6_opt_process()
171 *payload_len = jumbolen; in ip6_opt_process()
/freebsd/contrib/wpa/src/eap_peer/
H A Deap_pwd.c255 const u8 *payload, size_t payload_len) in eap_pwd_perform_id_exchange() argument
265 if (payload_len < sizeof(struct eap_pwd_id)) { in eap_pwd_perform_id_exchange()
316 data->id_server = os_malloc(payload_len - sizeof(struct eap_pwd_id)); in eap_pwd_perform_id_exchange()
322 data->id_server_len = payload_len - sizeof(struct eap_pwd_id); in eap_pwd_perform_id_exchange()
356 const u8 *payload, size_t payload_len) in eap_pwd_perform_commit_exchange() argument
396 if (payload_len != 2 * prime_len + order_len) { in eap_pwd_perform_commit_exchange()
399 (unsigned int) payload_len, in eap_pwd_perform_commit_exchange()
427 if (payload_len < 1 || *ptr == 0) { in eap_pwd_perform_commit_exchange()
433 if (payload_len != exp_len) { in eap_pwd_perform_commit_exchange()
436 (unsigned int) payload_len, in eap_pwd_perform_commit_exchange()
[all …]
H A Deap_sake.c145 size_t payload_len) in eap_sake_process_identity() argument
157 if (eap_sake_parse_attributes(payload, payload_len, &attr)) in eap_sake_process_identity()
188 size_t payload_len) in eap_sake_process_challenge() argument
206 if (eap_sake_parse_attributes(payload, payload_len, &attr)) in eap_sake_process_challenge()
291 size_t payload_len) in eap_sake_process_confirm() argument
305 if (eap_sake_parse_attributes(payload, payload_len, &attr)) in eap_sake_process_confirm()
H A Deap_eke.c224 size_t payload_len) in eap_eke_process_id() argument
240 if (payload_len < 2 + 4) { in eap_eke_process_id()
247 end = payload + payload_len; in eap_eke_process_id()
357 size_t payload_len) in eap_eke_process_commit() argument
385 end = payload + payload_len; in eap_eke_process_commit()
503 size_t payload_len) in eap_eke_process_confirm() argument
524 end = payload + payload_len; in eap_eke_process_confirm()
630 size_t payload_len) in eap_eke_process_failure() argument
634 if (payload_len < 4) { in eap_eke_process_failure()
/freebsd/tests/sys/kern/
H A Dktls_test.c800 size_t hdr_len, mac_len, payload_len; in decrypt_tls_aes_cbc_mte() local
812 payload_len = len - hdr_len; in decrypt_tls_aes_cbc_mte()
813 buf = malloc(payload_len); in decrypt_tls_aes_cbc_mte()
820 (const u_char *)src + hdr_len, buf, payload_len)); in decrypt_tls_aes_cbc_mte()
821 debug_hexdump(tc, buf, payload_len, "decrypted buffer"); in decrypt_tls_aes_cbc_mte()
836 padding = buf[payload_len - 1] + 1; in decrypt_tls_aes_cbc_mte()
839 ATF_REQUIRE_MSG(payload_len >= mac_len + padding, in decrypt_tls_aes_cbc_mte()
840 "payload_len (%zu) < mac_len (%zu) + padding (%d)", payload_len, in decrypt_tls_aes_cbc_mte()
842 payload_len in decrypt_tls_aes_cbc_mte()
865 size_t hdr_len, mac_len, payload_len; decrypt_tls_12_aead() local
901 size_t hdr_len, mac_len, payload_len; decrypt_tls_13_aead() local
948 size_t payload_len; decrypt_tls_aead() local
1330 size_t outbuf_cap, payload_len, record_len; test_ktls_transmit_control() local
1390 size_t outbuf_cap, payload_len, record_len; test_ktls_transmit_empty_fragment() local
[all...]
/freebsd/sys/ofed/drivers/infiniband/ulp/sdp/
H A Dsdp_zcopy.c55 int payload_len; in sdp_post_srcavail() local
86 payload_len = MIN(tx_sa->umem->page_size - off, len); in sdp_post_srcavail()
87 payload_len = MIN(payload_len, ssk->xmit_size_goal - sizeof(struct sdp_srcah)); in sdp_post_srcavail()
92 off, payload_pg, payload_len); in sdp_post_srcavail()
95 payload_pg, off, payload_len); in sdp_post_srcavail()
97 mb->len += payload_len; in sdp_post_srcavail()
98 mb->data_len = payload_len; in sdp_post_srcavail()
99 mb->truesize += payload_len; in sdp_post_srcavail()
105 ssk->write_seq += payload_len; in sdp_post_srcavail()
106 SDP_SKB_CB(mb)->end_seq += payload_len; in sdp_post_srcavail()
[all …]
/freebsd/sys/netlink/
H A Dnetlink_message_writer.c264 int payload_len; in nlmsg_ack() local
269 payload_len = sizeof(struct nlmsgerr); in nlmsg_ack()
278 payload_len += hdr->nlmsg_len - sizeof(struct nlmsghdr); in nlmsg_ack()
279 payload_len = NETLINK_ALIGN(payload_len); in nlmsg_ack()
288 if (!nlmsg_add(nw, nlp->nl_port, hdr->nlmsg_seq, NLMSG_ERROR, nl_flags, payload_len)) in nlmsg_ack()
291 errmsg = nlmsg_reserve_data(nw, payload_len, struct nlmsgerr); in nlmsg_ack()
/freebsd/tools/tools/netrate/tcpp/
H A Dtcpp_client.c79 static uint64_t payload_len; variable
132 conn->conn_header.th_len = payload_len; in tcpp_client_newconn()
171 iov[1].iov_len = min(sizeof(buffer), payload_len); in tcpp_client_handleconn()
189 payload_len - conn->conn_data_sent)); in tcpp_client_handleconn()
201 if (conn->conn_data_sent >= payload_len) { in tcpp_client_handleconn()
277 payload_len = bflag - sizeof(struct tcpp_header); in tcpp_client()
/freebsd/contrib/wpa/src/tls/
H A Dtlsv1_record.c151 size_t buf_size, const u8 *payload, size_t payload_len, in tlsv1_record_send() argument
171 WPA_PUT_BE16(length, payload_len); in tlsv1_record_send()
196 if (pos + payload_len > buf + buf_size) in tlsv1_record_send()
198 os_memmove(pos, payload, payload_len); in tlsv1_record_send()
199 pos += payload_len; in tlsv1_record_send()
217 crypto_hash_update(hmac, payload, payload_len); in tlsv1_record_send()
/freebsd/sys/dev/mlx5/mlx5_fpga/
H A Dmlx5fpga_trans.c247 size_t payload_len; in mlx5_fpga_trans_recv() local
259 payload_len = buf->sg[0].size - MLX5_ST_SZ_BYTES(fpga_shell_qp_packet); in mlx5_fpga_trans_recv()
275 if (payload_len != trans_priv->user_trans->size) { in mlx5_fpga_trans_recv()
277 payload_len, in mlx5_fpga_trans_recv()
283 data), payload_len); in mlx5_fpga_trans_recv()
/freebsd/sys/contrib/dev/athk/ath12k/
H A Dhtc.c254 u16 payload_len; in ath12k_htc_rx_completion_handler() local
272 payload_len = le32_get_bits(hdr->htc_info, HTC_HDR_PAYLOADLEN); in ath12k_htc_rx_completion_handler()
274 if (payload_len + sizeof(*hdr) > ATH12K_HTC_MAX_LEN) { in ath12k_htc_rx_completion_handler()
276 payload_len + sizeof(*hdr)); in ath12k_htc_rx_completion_handler()
280 if (skb->len < payload_len) { in ath12k_htc_rx_completion_handler()
282 skb->len, payload_len); in ath12k_htc_rx_completion_handler()
298 (trailer_len > payload_len)) { in ath12k_htc_rx_completion_handler()
306 trailer += payload_len; in ath12k_htc_rx_completion_handler()
316 if (trailer_len >= payload_len) in ath12k_htc_rx_completion_handler()
/freebsd/sys/contrib/dev/athk/ath11k/
H A Dhtc.c291 u16 payload_len; in ath11k_htc_rx_completion_handler() local
309 payload_len = FIELD_GET(HTC_HDR_PAYLOADLEN, hdr->htc_info); in ath11k_htc_rx_completion_handler()
311 if (payload_len + sizeof(*hdr) > ATH11K_HTC_MAX_LEN) { in ath11k_htc_rx_completion_handler()
313 payload_len + sizeof(*hdr)); in ath11k_htc_rx_completion_handler()
317 if (skb->len < payload_len) { in ath11k_htc_rx_completion_handler()
319 skb->len, payload_len); in ath11k_htc_rx_completion_handler()
337 (trailer_len > payload_len)) { in ath11k_htc_rx_completion_handler()
345 trailer += payload_len; in ath11k_htc_rx_completion_handler()
355 if (trailer_len >= payload_len) in ath11k_htc_rx_completion_handler()
/freebsd/contrib/llvm-project/lldb/source/Plugins/ObjectFile/wasm/
H A DObjectFileWasm.cpp173 uint64_t payload_len = data.getULEB128(c); in DecodeNextSection() local
177 if (payload_len >= (uint64_t(1) << 32)) in DecodeNextSection()
189 if (payload_len < c.tell() - prev_offset) in DecodeNextSection()
192 uint32_t section_length = payload_len - (c.tell() - prev_offset); in DecodeNextSection()
198 static_cast<uint32_t>(payload_len), in DecodeNextSection()
200 *offset_ptr += (c.tell() + payload_len); in DecodeNextSection()
/freebsd/sys/contrib/openzfs/cmd/zstream/
H A Dzstream_recompress.c41 dump_record(dmu_replay_record_t *drr, void *payload, int payload_len, in dump_record() argument
57 if (payload_len != 0) { in dump_record()
58 fletcher_4_incremental_native(payload, payload_len, zc); in dump_record()
59 if (write(outfd, payload, payload_len) == -1) in dump_record()
H A Dzstream_decompress.c41 dump_record(dmu_replay_record_t *drr, void *payload, int payload_len, in dump_record() argument
57 if (payload_len != 0) { in dump_record()
58 fletcher_4_incremental_native(payload, payload_len, zc); in dump_record()
59 if (write(outfd, payload, payload_len) == -1) in dump_record()
/freebsd/contrib/ofed/opensm/libvendor/
H A Dosm_vendor_umadt.c107 ib_net32_t payload_len; member
616 uint32_t payload_len; in osm_vendor_send() local
618 payload_len = in osm_vendor_send()
619 cl_ntoh32(((ib_sa_mad_t_vM3 *) p_mad)->payload_len); in osm_vendor_send()
620 num_mads = payload_len / IB_SA_DATA_SIZE; in osm_vendor_send()
621 if (payload_len % IB_SA_DATA_SIZE != 0) { in osm_vendor_send()
666 p_sa_mad->payload_len = in osm_vendor_send()
685 p_sa_mad->payload_len = in osm_vendor_send()
688 payload_len) % IB_SA_DATA_SIZE); in osm_vendor_send()
692 cl_ntoh32(p_sa_mad->payload_len)); in osm_vendor_send()
/freebsd/contrib/wpa/wpa_supplicant/
H A Dhs20_supplicant.h18 const u8 *payload, size_t payload_len, int inmem);
19 void hs20_put_anqp_req(u32 stypes, const u8 *payload, size_t payload_len,
/freebsd/sys/opencrypto/
H A Dktls_ocf.c734 u_int payload_len; in ktls_ocf_tls12_aead_recrypt() local
755 payload_len = tls_len - (AES_GMAC_HASH_LEN + sizeof(uint64_t)); in ktls_ocf_tls12_aead_recrypt()
760 crp.crp_payload_length = payload_len; in ktls_ocf_tls12_aead_recrypt()
762 buf = malloc(payload_len, M_KTLS_OCF, M_WAITOK); in ktls_ocf_tls12_aead_recrypt()
763 crypto_use_output_buf(&crp, buf, payload_len); in ktls_ocf_tls12_aead_recrypt()
771 ktls_ocf_recrypt_fixup(m, tls->params.tls_hlen, payload_len, in ktls_ocf_tls12_aead_recrypt()
921 u_int payload_len; in ktls_ocf_tls13_aead_recrypt() local
942 payload_len = tls_len - AES_GMAC_HASH_LEN; in ktls_ocf_tls13_aead_recrypt()
947 crp.crp_payload_length = payload_len; in ktls_ocf_tls13_aead_recrypt()
949 buf = malloc(payload_len, M_KTLS_OC in ktls_ocf_tls13_aead_recrypt()
[all...]
/freebsd/sys/dev/mlx5/mlx5_en/
H A Dmlx5_en_tx.c764 u32 payload_len; in mlx5e_sq_xmit()
776 payload_len = mb->m_pkthdr.len - args.ihs; in mlx5e_sq_xmit()
777 if (payload_len == 0) in mlx5e_sq_xmit()
780 num_pkts = DIV_ROUND_UP(payload_len, mss); in mlx5e_sq_xmit()
781 sq->mbuf[pi].num_bytes = payload_len + (num_pkts * args.ihs); in mlx5e_sq_xmit()
785 sq->stats.tso_bytes += payload_len; in mlx5e_sq_xmit()
790 u32 payload_len; in mlx5e_sq_xmit()
810 payload_len = mb->m_pkthdr.len - args.ihs; in mlx5e_sq_xmit()
811 if (payload_len == 0) in mlx5e_sq_xmit()
814 num_pkts = DIV_ROUND_UP(payload_len, ms in mlx5e_sq_xmit()
761 u32 payload_len; mlx5e_sq_xmit() local
787 u32 payload_len; mlx5e_sq_xmit() local
[all...]
/freebsd/contrib/wpa/src/eap_server/
H A Deap_server_pwd.c581 const u8 *payload, size_t payload_len) in eap_pwd_process_id_resp() argument
589 if (payload_len < sizeof(struct eap_pwd_id)) { in eap_pwd_process_id_resp()
608 data->id_peer = os_malloc(payload_len - sizeof(struct eap_pwd_id)); in eap_pwd_process_id_resp()
613 data->id_peer_len = payload_len - sizeof(struct eap_pwd_id); in eap_pwd_process_id_resp()
661 const u8 *payload, size_t payload_len) in eap_pwd_process_commit_resp() argument
673 if (payload_len != 2 * prime_len + order_len) { in eap_pwd_process_commit_resp()
676 (unsigned int) payload_len, in eap_pwd_process_commit_resp()
756 const u8 *payload, size_t payload_len) in eap_pwd_process_confirm_resp() argument
767 if (payload_len != SHA256_MAC_LEN) { in eap_pwd_process_confirm_resp()
770 (unsigned int) payload_len, SHA256_MAC_LEN); in eap_pwd_process_confirm_resp()

1234