| /xnu-10002.41.9/bsd/netinet6/ |
| H A D | udp6_usrreq.c | 177 static int udp6_input_checksum(struct mbuf *, struct udphdr *, int, int); 245 struct udphdr *uh; in udp6_input() 257 IP6_EXTHDR_CHECK(m, off, sizeof(struct udphdr), return IPPROTO_DONE); in udp6_input() 278 uh = (struct udphdr *)(void *)((caddr_t)ip6 + off); in udp6_input() 450 off + sizeof(struct udphdr), ifp); in udp6_input() 482 uh = (struct udphdr *)(void *)((caddr_t)ip6 + off); in udp6_input() 530 int payload_len = ulen - sizeof(struct udphdr) > 4 ? 4 : in udp6_input() 531 ulen - sizeof(struct udphdr); in udp6_input() 533 if (m->m_len < off + sizeof(struct udphdr) + payload_len) { in udp6_input() 534 if ((m = m_pullup(m, off + sizeof(struct udphdr) + in udp6_input() [all …]
|
| H A D | udp6_output.c | 152 u_int32_t plen = sizeof(struct udphdr) + ulen; in udp6_output() 154 struct udphdr *udp6; in udp6_output() 407 M_PREPEND(m, hlen + sizeof(struct udphdr), M_DONTWAIT, 1); in udp6_output() 416 udp6 = (struct udphdr *)(void *)(mtod(m, caddr_t) + hlen); in udp6_output() 444 m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); in udp6_output() 626 sizeof(struct udphdr) + in udp6_output() 685 sizeof(struct udphdr) + in udp6_output()
|
| H A D | esp_output.c | 197 hdrsiz += sizeof(struct udphdr) + 4; in esp_hdrsiz() 215 return sizeof(struct newesp) + esp_max_ivlen() + 17 + AH_MAXSUMSIZE + sizeof(struct udphdr); in esp_hdrsiz() 265 struct udphdr *udp = NULL; in esp_output() 483 udp = mtod(md, struct udphdr *); in esp_output() 510 esphlen += sizeof(struct udphdr); in esp_output() 511 espoff += sizeof(struct udphdr); in esp_output() 532 udp = mtod(n, struct udphdr *); in esp_output() 533 esp = (struct esp *)(void *)((caddr_t)udp + sizeof(struct udphdr)); in esp_output() 543 udp = mtod(md, struct udphdr *); in esp_output() 544 esp = (struct esp *)(void *)((caddr_t)udp + sizeof(struct udphdr)); in esp_output() [all …]
|
| H A D | esp_input.c | 143 u_int8_t stripsiz = (u_int8_t)sizeof(struct udphdr); in esp4_input_strip_udp_encap() 161 u_int8_t stripsiz = (u_int8_t)sizeof(struct udphdr); in esp6_input_strip_udp_encap() 261 !(ip->ip_p == IPPROTO_UDP && off >= sizeof(struct udphdr))) { in esp4_input_extended() 550 off -= sizeof(struct udphdr); // off no longer includes the udphdr's size in esp4_input_extended() 556 struct udphdr *encap_uh = (__typeof__(encap_uh))(void *)((caddr_t)ip + off); in esp4_input_extended() 792 struct udphdr *udp; in esp4_input_extended() 799 if (m->m_len < off + sizeof(struct udphdr)) { in esp4_input_extended() 800 m = m_pullup(m, off + sizeof(struct udphdr)); in esp4_input_extended() 809 udp = (struct udphdr *)(void *)(((u_int8_t *)ip) + off); in esp4_input_extended() 972 off >= (sizeof(struct udphdr) + sizeof(struct ip6_hdr))))) { in esp6_input_extended() [all …]
|
| H A D | ipsec.c | 1216 struct udphdr uh; in ipsec4_get_ulp() 1264 if (off + sizeof(struct udphdr) > m->m_pkthdr.len) { in ipsec4_get_ulp() 1329 struct udphdr uh; in ipsec6_get_ulp() 1369 if (off + sizeof(struct udphdr) > m->m_pkthdr.len) { in ipsec6_get_ulp() 3739 struct udphdr *udp; in ipsec4_output() 3746 if (state->m->m_len < hlen + sizeof(struct udphdr)) { in ipsec4_output() 3747 state->m = m_pullup(state->m, hlen + sizeof(struct udphdr)); in ipsec4_output() 3755 udp = (struct udphdr *)(void *)(((u_int8_t *)ip) + hlen); in ipsec4_output() 5224 struct udphdr *uh = (__typeof__(uh))(void *)((char *)m_mtod(m) + sizeof(*ip)); in ipsec_send_natt_keepalive() 5283 struct udphdr *uh = (__typeof__(uh))(void *)((char *)m_mtod(m) + sizeof(*ip6)); in ipsec_send_natt_keepalive() [all …]
|
| /xnu-10002.41.9/bsd/netinet/ |
| H A D | udp_usrreq.c | 210 static int udp_input_checksum(struct mbuf *, struct udphdr *, int, int); 285 struct udphdr *uh; in udp_input() 342 if (m->m_len < iphlen + sizeof(struct udphdr)) { in udp_input() 343 m = m_pullup(m, iphlen + sizeof(struct udphdr)); in udp_input() 352 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen); in udp_input() 369 if (len > ip->ip_len || len < sizeof(struct udphdr)) { in udp_input() 542 iphlen + sizeof(struct udphdr), in udp_input() 576 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen); in udp_input() 624 int payload_len = len - sizeof(struct udphdr) > 4 ? 4 : in udp_input() 625 len - sizeof(struct udphdr); in udp_input() [all …]
|
| H A D | udp.h | 79 struct udphdr { struct
|
| H A D | dhcp.h | 62 struct udphdr udp;
|
| H A D | bootp.h | 130 struct udphdr bp_udp;
|
| H A D | udp_var.h | 76 struct udphdr ui_u; /* udp header */
|
| H A D | ip_compat.h | 705 typedef struct udphdr udphdr_t;
|
| H A D | ip_output.c | 1702 struct udphdr *uh = NULL; in ip_output_list() 1704 if (m->m_len < hlen + sizeof(struct udphdr)) { in ip_output_list() 1705 m = m_pullup(m, hlen + sizeof(struct udphdr)); in ip_output_list() 1718 uh = (struct udphdr *)(void *)((caddr_t)ip + hlen); in ip_output_list()
|
| /xnu-10002.41.9/tests/ |
| H A D | net_test_lib.h | 92 struct udphdr udp; 123 struct udphdr udp;
|
| H A D | bpf_write.c | 228 T_ASSERT_GE((size_t)ip_len, sizeof(struct ip) + sizeof(struct udphdr) + sizeof(dhcp_min_payload), in do_bpf_write() 230 payload_len = ip_len - (sizeof(struct ip) + sizeof(struct udphdr)); in do_bpf_write()
|
| H A D | bpf_write_batch.c | 237 T_ASSERT_GE((size_t)ip_len, sizeof(struct ip) + sizeof(struct udphdr) + sizeof(dhcp_min_payload), in make_bootp_packet() 239 payload_len = ip_len - (sizeof(struct ip) + sizeof(struct udphdr)); in make_bootp_packet()
|
| H A D | net_test_lib.c | 196 ip6_udp->ip6.ip6_plen = htons(sizeof(struct udphdr) + data_len); in ethernet_udp6_frame_populate()
|
| /xnu-10002.41.9/bsd/net/ |
| H A D | if_ports_used.c | 1454 struct udphdr uh = {}; in if_ports_used_match_mbuf() 1457 error = mbuf_copydata(m, udp_offset, sizeof(struct udphdr), &uh); in if_ports_used_match_mbuf() 1471 if (is_encapsulated_esp(m, udp_offset + sizeof(struct udphdr))) { in if_ports_used_match_mbuf() 1479 if (pkt_data_len < sizeof(struct udphdr)) { in if_ports_used_match_mbuf() 1482 pkt_data_len -= sizeof(struct udphdr); in if_ports_used_match_mbuf() 1598 struct udphdr uh = {}; in if_ports_used_match_mbuf() 1600 error = mbuf_copydata(m, l3_len, sizeof(struct udphdr), &uh); in if_ports_used_match_mbuf() 1615 if (is_encapsulated_esp(m, l3_len + sizeof(struct udphdr))) { in if_ports_used_match_mbuf() 1623 if (pkt_data_len < sizeof(struct udphdr)) { in if_ports_used_match_mbuf() 1626 pkt_data_len -= sizeof(struct udphdr); in if_ports_used_match_mbuf() [all …]
|
| H A D | bpf.c | 3557 uint32_t trunc_len = sizeof(struct udphdr); /* By default no UDP payload */ in get_udp_trunc_len() 3563 struct udphdr udphdr; in get_udp_trunc_len() local 3564 err = bpf_copydata(pkt, off, sizeof(struct udphdr), &udphdr); in get_udp_trunc_len() 3571 sport = EXTRACT_SHORT(&udphdr.uh_sport); in get_udp_trunc_len() 3572 dport = EXTRACT_SHORT(&udphdr.uh_dport); in get_udp_trunc_len() 3589 trunc_len += get_isakmp_trunc_len(pkt, off + sizeof(struct udphdr), in get_udp_trunc_len() 3590 remaining_caplen - sizeof(struct udphdr)); in get_udp_trunc_len() 3592 trunc_len += get_isakmp_natt_trunc_len(pkt, off + sizeof(struct udphdr), in get_udp_trunc_len() 3593 remaining_caplen - sizeof(struct udphdr)); in get_udp_trunc_len()
|
| H A D | pktap.c | 981 struct udphdr uh; in pktap_fill_proc_info() 984 sizeof(struct udphdr), &uh); in pktap_fill_proc_info() 1046 struct udphdr uh; in pktap_fill_proc_info() 1049 sizeof(struct udphdr), &uh); in pktap_fill_proc_info()
|
| H A D | if_bridge.c | 4828 struct udphdr * udp; 4883 udp = (struct udphdr *)(void *) 7621 struct udphdr udp; 7623 minlen += sizeof(struct udphdr); 7642 sizeof(struct udphdr), &udp); 7660 offset += sizeof(struct udphdr); 8305 struct udphdr udphdr; 8309 error = mbuf_copydata(m, offset, sizeof(struct udphdr), &udphdr); 8316 if (ntohs(udphdr.uh_sport) != IPPORT_BOOTPC || 8317 ntohs(udphdr.uh_dport) != IPPORT_BOOTPS) { [all …]
|
| H A D | nat464_utils.c | 861 struct udphdr *uh = (struct udphdr *)pbuf_contig_segment(pbuf, hlen, in nat464_translate_proto()
|
| H A D | pf.c | 4919 struct udphdr *uh; in pf_nat64_ipv4() 4922 uh = (struct udphdr *)pbuf_contig_segment(pbuf, hlen, in pf_nat64_ipv4() 4955 struct udphdr *uh = pd->hdr.udp; in pf_test_rule() 7646 struct udphdr *uh = pd->hdr.udp; in pf_test_state_udp() 8367 struct udphdr uh; in pf_test_state_icmp() 9627 if (off < (int)sizeof(struct ip) || len < (int)sizeof(struct udphdr)) { in pf_check_proto_cksum() 9905 struct udphdr uh; in pf_test() 9919 ntohs(uh.uh_ulen) < sizeof(struct udphdr)) { in pf_test() 10562 struct udphdr uh; in pf_test6() 10576 ntohs(uh.uh_ulen) < sizeof(struct udphdr)) { in pf_test6()
|
| /xnu-10002.41.9/bsd/skywalk/nexus/flowswitch/flow/ |
| H A D | flow_track.c | 905 struct udphdr *uh; in flow_track_abort_quic() 927 ulen = sizeof(struct udphdr) + sizeof(struct quic_stateless_reset); in flow_track_abort_quic() 956 uh = (struct udphdr *)(void *)((char *)ip + sizeof(*ip)); in flow_track_abort_quic() 963 uh = (struct udphdr *)(void *)((char *)ip6 + sizeof(*ip6)); in flow_track_abort_quic()
|
| H A D | flow_classifier.c | 95 volatile struct udphdr *_udph; in flow_pkt_classify()
|
| H A D | flow_manager.c | 1227 struct udphdr *uh; in rx_flow_demux_match() 1246 uh = (struct udphdr *)pkt->pkt_flow_udp_hdr; in rx_flow_demux_match()
|