/freebsd/contrib/ntp/sntp/tests/ |
H A D | packetProcessing.c | 174 /* We send in a pkt_len of header size + 4 byte extension in test_TooShortExtensionFieldLength() 178 int pkt_len = LEN_PKT_NOMAC + 4 + 24; in test_TooShortExtensionFieldLength() 181 process_pkt(&testpkt.p, &testsock, pkt_len, in test_TooShortExtensionFieldLength() 193 int pkt_len = LEN_PKT_NOMAC; 197 process_pkt(&testpkt.p, &testsock, pkt_len, in test_UnauthenticatedPacketReject() 209 int pkt_len = LEN_PKT_NOMAC + 4; /* + 4 byte MAC = Crypto-NAK */ 212 process_pkt(&testpkt.p, &testsock, pkt_len, in test_CryptoNAKPacketReject() 221 size_t pkt_len = LEN_PKT_NOMAC; in test_CryptoNAKPacketReject() 230 mac_len = make_mac(&testpkt.p, pkt_len, key_ptr, in test_AuthenticatedPacketInvalid() 233 pkt_len in test_AuthenticatedPacketInvalid() 185 int pkt_len = LEN_PKT_NOMAC + 4 + 24; test_TooShortExtensionFieldLength() local 200 int pkt_len = LEN_PKT_NOMAC; test_UnauthenticatedPacketReject() local 216 int pkt_len = LEN_PKT_NOMAC + 4; /* + 4 byte MAC = Crypto-NAK */ test_CryptoNAKPacketReject() local 232 int pkt_len = LEN_PKT_NOMAC; test_AuthenticatedPacketInvalid() local 260 int pkt_len = LEN_PKT_NOMAC; test_AuthenticatedPacketUnknownKey() local 284 int pkt_len = LEN_PKT_NOMAC; test_ServerVersionTooOld() local 302 int pkt_len = LEN_PKT_NOMAC; test_ServerVersionTooNew() local 424 int pkt_len = LEN_PKT_NOMAC; test_CorrectAuthenticatedPacketMD5() local 446 int pkt_len = LEN_PKT_NOMAC; test_CorrectAuthenticatedPacketSHA1() local 470 int pkt_len = LEN_PKT_NOMAC; test_CorrectAuthenticatedPacketCMAC() local [all...] |
/freebsd/contrib/ntp/sntp/ |
H A D | networking.c | 101 int pkt_len, in process_pkt() argument 133 if (pkt_len < (int)LEN_PKT_NOMAC || (pkt_len & 3) != 0) { in process_pkt() 136 func_name, pkt_len); in process_pkt() 142 packet_end = (void*)((char*)rpkt + pkt_len); in process_pkt() 192 if (!auth_md5(rpkt, pkt_len - mac_size, in process_pkt() 278 return pkt_len; in process_pkt() 291 return pkt_len; in process_pkt()
|
H A D | main.c | 669 size_t pkt_len; in xmt() local 679 pkt_len = generate_pkt(&x_pkt, &tv_xmt, dctx->key_id, in xmt() 682 sent = sendpkt(sock, dst, &x_pkt, pkt_len); in xmt() 686 pkt_len)); in xmt() 1131 int pkt_len; in generate_pkt() local 1134 pkt_len = LEN_PKT_NOMAC; in generate_pkt() 1147 mac_size = make_mac(x_pkt, pkt_len, pkt_key, in generate_pkt() 1150 pkt_len += mac_size + KEY_MAC_LEN; in generate_pkt() 1158 return pkt_len; in generate_pkt()
|
H A D | networking.h | 41 int process_pkt(struct pkt *rpkt, sockaddr_u *sas, int pkt_len,
|
/freebsd/sys/dev/usb/input/ |
H A D | uep.c | 240 int pkt_len; in uep_intr_callback() local 261 if ((pkt_len = get_pkt_len(sc->buf)) == 0) in uep_intr_callback() 264 res = pkt_len - sc->buf_len; in uep_intr_callback() 282 if ((pkt_len = get_pkt_len(p)) == 0) in uep_intr_callback() 286 if (pkt_len <= len) { in uep_intr_callback() 293 p += pkt_len; in uep_intr_callback() 294 len -= pkt_len; in uep_intr_callback()
|
/freebsd/contrib/tcpdump/ |
H A D | print-pktap.c | 46 nd_uint32_t pkt_len; /* length of pktap header */ member 79 hdrlen = GET_LE_U_4(hdr->pkt_len); in pktap_header_print() 116 hdrlen = GET_LE_U_4(hdr->pkt_len); in pktap_if_print()
|
H A D | print-lwres.c | 292 uint32_t pkt_len = GET_BE_U_4(np->length); in lwres_print() local 293 ND_TCHECK_LEN(bp, pkt_len); in lwres_print() 294 s = bp + pkt_len; in lwres_print()
|
/freebsd/sys/dev/liquidio/base/ |
H A D | lio_droq.c | 599 uint32_t pkt_len = 0; in lio_droq_fast_process_packets() local 633 pkt_len = (uint32_t)info->length; in lio_droq_fast_process_packets() 636 nicbuf->m_len = pkt_len; in lio_droq_fast_process_packets() 647 pkt_len = 0; in lio_droq_fast_process_packets() 649 while (pkt_len < info->length) { in lio_droq_fast_process_packets() 654 ((pkt_len + droq->buffer_size) > in lio_droq_fast_process_packets() 657 pkt_len) : droq->buffer_size; in lio_droq_fast_process_packets() 673 pkt_len += frag_len; in lio_droq_fast_process_packets() 684 droq->ops.fptr(nicbuf, pkt_len, rh, in lio_droq_fast_process_packets()
|
/freebsd/contrib/unbound/util/data/ |
H A D | msgparse.c | 642 uint16_t pkt_len; /* length of rr inside the packet */ in calc_size() local 645 pkt_len = sldns_buffer_read_u16(pkt); in calc_size() 646 if(sldns_buffer_remaining(pkt) < pkt_len) in calc_size() 649 if(pkt_len > 0 && desc && desc->_dname_count > 0) { in calc_size() 655 while(pkt_len > 0 && count) { in calc_size() 662 if(sldns_buffer_position(pkt)-oldpos > pkt_len) in calc_size() 664 pkt_len -= sldns_buffer_position(pkt)-oldpos; in calc_size() 670 if(pkt_len < 1) { in calc_size() 680 if(pkt_len < len) in calc_size() 682 pkt_len -= len; in calc_size() [all …]
|
H A D | msgreply.c | 249 uint16_t pkt_len; in rdata_copy() local 292 pkt_len = htons(rr->size - 2); in rdata_copy() 293 memmove(to, &pkt_len, sizeof(uint16_t)); in rdata_copy() 296 pkt_len = sldns_buffer_read_u16(pkt); in rdata_copy() 297 if(sldns_buffer_remaining(pkt) < pkt_len) in rdata_copy() 300 if(pkt_len > 0 && desc && desc->_dname_count > 0) { in rdata_copy() 306 while(pkt_len > 0 && count) { in rdata_copy() 313 pkt_len -= sldns_buffer_position(pkt)-oldpos; in rdata_copy() 325 log_assert(len <= pkt_len); in rdata_copy() 329 pkt_len -= len; in rdata_copy() [all …]
|
/freebsd/sys/dev/gve/ |
H A D | gve_tx.c | 468 int csum_offset, uint16_t pkt_len) in gve_tx_fill_pkt_desc() argument 484 pkt_desc->len = htobe16(pkt_len); in gve_tx_fill_pkt_desc() 532 uint16_t pkt_len) in gve_fifo_bytes_required() argument 540 bytes = align_hdr_pad + pad_bytes + pkt_len; in gve_fifo_bytes_required() 605 uint16_t tso_mss, l4_off, l4_data_off, pkt_len, first_seg_len; in gve_xmit() local 625 pkt_len = mbuf->m_pkthdr.len; in gve_xmit() 676 first_seg_len = MIN(pkt_len, GVE_GQ_TX_MIN_PKT_DESC_BYTES); in gve_xmit() 678 bytes_required = gve_fifo_bytes_required(tx, first_seg_len, pkt_len); in gve_xmit() 697 payload_nfrags = gve_tx_alloc_fifo(&tx->fifo, pkt_len - first_seg_len, in gve_xmit() 704 pkt_len); in gve_xmit()
|
H A D | gve_tx_dqo.c | 641 int32_t pkt_len = mbuf->m_pkthdr.len; in gve_tx_copy_mbuf_and_write_pkt_descs() local 653 while (copy_offset < pkt_len) { in gve_tx_copy_mbuf_and_write_pkt_descs() 659 copy_len = MIN(GVE_TX_BUF_SIZE_DQO, pkt_len - copy_offset); in gve_tx_copy_mbuf_and_write_pkt_descs() 668 /*eop=*/copy_offset == pkt_len, in gve_tx_copy_mbuf_and_write_pkt_descs() 892 int32_t pkt_len; in gve_handle_packet_completion() local 910 pkt_len = pending_pkt->mbuf->m_pkthdr.len; in gve_handle_packet_completion() 920 return (pkt_len); in gve_handle_packet_completion()
|
/freebsd/sys/dev/xen/netback/ |
H A D | netback_unit_tests.c | 2068 const size_t pkt_len = sizeof(struct ether_header) + in xnb_add_mbuf_cksum_arp() local 2073 unsigned char pkt_orig[pkt_len]; in xnb_add_mbuf_cksum_arp() 2075 mbufc = m_getm(NULL, pkt_len, M_WAITOK, MT_DATA); in xnb_add_mbuf_cksum_arp() 2114 mbufc->m_len = pkt_len; in xnb_add_mbuf_cksum_arp() 2115 mbufc->m_pkthdr.len = pkt_len; in xnb_add_mbuf_cksum_arp() 2121 bcopy(mtod(mbufc, const void*), pkt_orig, pkt_len); in xnb_add_mbuf_cksum_arp() 2127 XNB_ASSERT(bcmp(mtod(mbufc, const void*), pkt_orig, pkt_len) == 0); in xnb_add_mbuf_cksum_arp() 2179 const size_t pkt_len = sizeof(struct ether_header) + in xnb_add_mbuf_cksum_icmp() local 2192 mbufc = m_getm(NULL, pkt_len, M_WAITOK, MT_DATA); in xnb_add_mbuf_cksum_icmp() 2219 mbufc->m_len = pkt_len; in xnb_add_mbuf_cksum_icmp() [all …]
|
/freebsd/contrib/libpcap/ |
H A D | pcap-dpdk.c | 324 uint32_t pkt_len = 0; in pcap_dpdk_dispatch() local 381 pkt_len = rte_pktmbuf_pkt_len(m); in pcap_dpdk_dispatch() 384 caplen = pkt_len < (uint32_t)p->snapshot ? pkt_len: (uint32_t)p->snapshot; in pcap_dpdk_dispatch() 386 pcap_header.len = pkt_len; in pcap_dpdk_dispatch() 395 if ( pkt_len <= RTE_ETH_PCAP_SNAPLEN) in pcap_dpdk_dispatch()
|
/freebsd/contrib/unbound/libunbound/ |
H A D | context.c | 329 size_t pkt_len = pkt?sldns_buffer_remaining(pkt):0; in context_serialize_answer() local 332 *len = size_of_uint32s + pkt_len + wlen; in context_serialize_answer() 343 if(pkt_len > 0) in context_serialize_answer() 345 sldns_buffer_begin(pkt), pkt_len); in context_serialize_answer()
|
/freebsd/sys/contrib/dev/iwlwifi/ |
H A D | iwl-phy-db.c | 148 unsigned int pkt_len = iwl_rx_packet_payload_len(pkt); in iwl_phy_db_set_section() local 156 if (pkt_len < sizeof(*phy_db_notif)) in iwl_phy_db_set_section() 162 if (pkt_len < sizeof(*phy_db_notif) + size) in iwl_phy_db_set_section()
|
/freebsd/crypto/heimdal/lib/krb5/ |
H A D | changepw.c | 278 uint16_t pkt_len, pkt_ver; in process_reply() local 334 pkt_len = (reply[0] << 8) | (reply[1]); in process_reply() 337 if ((pkt_len != len) || (reply[1] == 0x7e || reply[1] == 0x5e)) { in process_reply() 368 if (pkt_len != len) { in process_reply()
|
/freebsd/sys/dev/bwi/ |
H A D | if_bwi.c | 2846 bwi_ofdm_plcp_header(uint32_t *plcp0, int pkt_len, uint8_t rate) in bwi_ofdm_plcp_header() argument 2852 __SHIFTIN(pkt_len, IEEE80211_OFDM_PLCP_LEN_MASK); in bwi_ofdm_plcp_header() 2857 bwi_ds_plcp_header(struct ieee80211_ds_plcp_hdr *plcp, int pkt_len, in bwi_ds_plcp_header() argument 2862 pkt_bitlen = pkt_len * NBBY; in bwi_ds_plcp_header() 2886 void *plcp, int pkt_len, uint8_t rate) in bwi_plcp_header() argument 2895 bwi_ofdm_plcp_header(plcp, pkt_len, rate); in bwi_plcp_header() 2897 bwi_ds_plcp_header(plcp, pkt_len, rate); in bwi_plcp_header() 2919 int type, ismcast, pkt_len, error, rix; in bwi_encap() local 2934 pkt_len = m->m_pkthdr.len + IEEE80211_CRC_LEN; in bwi_encap() 2946 rix = ieee80211_ratectl_rate(ni, NULL, pkt_len); in bwi_encap() [all …]
|
/freebsd/sys/contrib/dev/iwlwifi/mvm/ |
H A D | ftm-initiator.c | 1338 static bool iwl_mvm_ftm_resp_size_validation(u8 ver, unsigned int pkt_len) in iwl_mvm_ftm_range_resp() 1343 return pkt_len == sizeof(struct iwl_tof_range_rsp_ntfy_v8); in iwl_mvm_ftm_range_resp() 1345 return pkt_len == sizeof(struct iwl_tof_range_rsp_ntfy_v7); in iwl_mvm_ftm_range_resp() 1347 return pkt_len == sizeof(struct iwl_tof_range_rsp_ntfy_v6); in iwl_mvm_ftm_range_resp() 1349 return pkt_len == sizeof(struct iwl_tof_range_rsp_ntfy_v5); in iwl_mvm_ftm_range_resp() 1359 unsigned int pkt_len = iwl_rx_packet_payload_len(pkt); in iwl_mvm_ftm_lc_notif() 1376 if (unlikely(!iwl_mvm_ftm_resp_size_validation(notif_ver, pkt_len))) in iwl_mvm_ftm_lc_notif() 1193 iwl_mvm_ftm_resp_size_validation(u8 ver,unsigned int pkt_len) iwl_mvm_ftm_resp_size_validation() argument 1214 unsigned int pkt_len = iwl_rx_packet_payload_len(pkt); iwl_mvm_ftm_range_resp() local
|
H A D | rx.c | 23 unsigned int pkt_len = iwl_rx_packet_payload_len(pkt); in iwl_mvm_rx_rx_phy_cmd() local 25 if (unlikely(pkt_len < sizeof(mvm->last_phy_info))) in iwl_mvm_rx_rx_phy_cmd() 303 u32 len, pkt_len = iwl_rx_packet_payload_len(pkt); in iwl_mvm_rx_rx_mpdu() local 308 if (unlikely(pkt_len < sizeof(*rx_res))) { in iwl_mvm_rx_rx_mpdu() 318 if (unlikely(len + sizeof(*rx_res) + sizeof(__le32) > pkt_len)) { in iwl_mvm_rx_rx_mpdu()
|
/freebsd/contrib/unbound/services/ |
H A D | outside_network.c | 610 (int)w->pkt_len, w->timeout); 612 pend->c->tcp_write_pkt_len = w->pkt_len; 638 log_assert(w->pkt_len > 0); 1010 sldns_buffer_init_frm_data(&tmp, w->pkt, w->pkt_len); 1051 pend->c->tcp_write_pkt_len == pend->query->pkt_len) { 1054 if(verbosity >= VERB_CLIENT && pend->query->pkt_len > 12+2+2 && 1056 dname_valid(pend->query->pkt+12, pend->query->pkt_len-12)) { 1079 if(verbosity >= VERB_CLIENT && w->pkt_len > 12+2+2 && 1081 dname_valid(w->pkt+12, w->pkt_len-12)) { 1308 log_assert(pend->query->pkt_len == pend->c->tcp_write_pkt_len); [all …]
|
H A D | outside_network.h | 344 size_t pkt_len; member 405 size_t pkt_len; member
|
/freebsd/crypto/heimdal/kpasswd/ |
H A D | kpasswdd.c | 446 uint16_t pkt_len, pkt_ver, ap_req_len; in verify() local 462 pkt_len = (msg[0] << 8) | (msg[1]); in verify() 465 if (pkt_len != len) { in verify() 467 (long)pkt_len, (long)len); in verify()
|
/freebsd/sys/dev/irdma/ |
H A D | irdma_utils.c | 1435 u16 pkt_len; in irdma_gen1_puda_get_tcpip_info() local 1454 pkt_len = ntohs(iph->ip_len); in irdma_gen1_puda_get_tcpip_info() 1457 pkt_len = ntohs(ip6h->ip6_plen) + iphlen; in irdma_gen1_puda_get_tcpip_info() 1460 buf->totallen = pkt_len + buf->maclen; in irdma_gen1_puda_get_tcpip_info() 1470 buf->datalen = pkt_len - iphlen - buf->tcphlen; in irdma_gen1_puda_get_tcpip_info() 1488 u32 pkt_len; in irdma_puda_get_tcpip_info() local 1507 pkt_len = info->payload_len; in irdma_puda_get_tcpip_info() 1508 buf->totallen = pkt_len; in irdma_puda_get_tcpip_info() 1510 buf->datalen = pkt_len - IRDMA_TCP_OFFSET - buf->tcphlen; in irdma_puda_get_tcpip_info()
|
/freebsd/sys/dev/ice/ |
H A D | ice_switch.h | 433 u16 *pkt_len, 439 const u8 *dummy_pkt, u16 pkt_len,
|