| /xnu-11215.81.4/bsd/netinet/ |
| H A D | udp_usrreq.c | 212 static int udp_input_checksum(struct mbuf *, struct udphdr *, int, int); 289 struct udphdr *uh; in udp_input() 347 if (m->m_len < iphlen + sizeof(struct udphdr)) { in udp_input() 348 m = m_pullup(m, iphlen + sizeof(struct udphdr)); in udp_input() 357 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen); in udp_input() 374 if (len > ip->ip_len || len < sizeof(struct udphdr)) { in udp_input() 547 iphlen + sizeof(struct udphdr), in udp_input() 581 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen); in udp_input() 633 int payload_len = len - sizeof(struct udphdr) > 4 ? 4 : in udp_input() 634 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;
|
| /xnu-11215.81.4/bsd/netinet6/ |
| H A D | udp6_usrreq.c | 180 static int udp6_input_checksum(struct mbuf *, struct udphdr *, int, int); 246 struct udphdr *uh; in udp6_input() 259 IP6_EXTHDR_CHECK(m, off, sizeof(struct udphdr), return IPPROTO_DONE); in udp6_input() 277 uh = (struct udphdr *)(void *)((caddr_t)ip6 + off); in udp6_input() 452 off + sizeof(struct udphdr), ifp); in udp6_input() 484 uh = (struct udphdr *)(void *)((caddr_t)ip6 + off); in udp6_input() 539 int payload_len = ulen - sizeof(struct udphdr) > 4 ? 4 : in udp6_input() 540 ulen - sizeof(struct udphdr); in udp6_input() 542 if (m->m_len < off + sizeof(struct udphdr) + payload_len) { in udp6_input() 543 if ((m = m_pullup(m, off + sizeof(struct udphdr) + in udp6_input() [all …]
|
| H A D | udp6_output.c | 155 u_int32_t plen = sizeof(struct udphdr) + ulen; in udp6_output() 157 struct udphdr *__single udp6; in udp6_output() 429 M_PREPEND(m, hlen + sizeof(struct udphdr), M_DONTWAIT, 1); in udp6_output() 439 udp6 = (struct udphdr *)(void *)(mtod(m, caddr_t) + hlen); in udp6_output() 467 m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); in udp6_output() 644 sizeof(struct udphdr) + in udp6_output() 709 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() 263 !(ip->ip_p == IPPROTO_UDP && off >= sizeof(struct udphdr))) { in esp4_input_extended() 553 off -= sizeof(struct udphdr); // off no longer includes the udphdr's size in esp4_input_extended() 559 struct udphdr *encap_uh = (__typeof__(encap_uh))(void *)((caddr_t)ip + off); in esp4_input_extended() 795 struct udphdr *udp; in esp4_input_extended() 802 if (m->m_len < off + sizeof(struct udphdr)) { in esp4_input_extended() 803 m = m_pullup(m, off + sizeof(struct udphdr)); in esp4_input_extended() 812 udp = (struct udphdr *)(void *)(((u_int8_t *)ip) + off); in esp4_input_extended() 977 off >= (sizeof(struct udphdr) + sizeof(struct ip6_hdr))))) { in esp6_input_extended() [all …]
|
| H A D | ipsec.c | 1209 struct udphdr uh; in ipsec4_get_ulp() 1255 if (off + sizeof(struct udphdr) > m->m_pkthdr.len) { in ipsec4_get_ulp() 1318 struct udphdr uh; in ipsec6_get_ulp() 1358 if (off + sizeof(struct udphdr) > m->m_pkthdr.len) { in ipsec6_get_ulp() 3724 struct udphdr *udp; in ipsec4_output() 3731 if (state->m->m_len < hlen + sizeof(struct udphdr)) { in ipsec4_output() 3732 state->m = m_pullup(state->m, hlen + sizeof(struct udphdr)); in ipsec4_output() 3740 udp = (struct udphdr *)(void *)(((u_int8_t *)ip) + hlen); in ipsec4_output() 5204 struct udphdr *uh = (__typeof__(uh))(void *)(m_mtod_current(m) + sizeof(*ip)); in ipsec_send_natt_keepalive() 5263 struct udphdr *uh = (__typeof__(uh))(void *)(m_mtod_current(m) + sizeof(*ip6)); in ipsec_send_natt_keepalive() [all …]
|
| /xnu-11215.81.4/tests/ |
| H A D | net_test_lib.h | 134 struct udphdr udp; 165 struct udphdr udp;
|
| H A D | bpf_write.c | 209 T_ASSERT_GE((size_t)ip_len, sizeof(struct ip) + sizeof(struct udphdr) + sizeof(dhcp_min_payload), in do_bpf_write() 211 payload_len = ip_len - (sizeof(struct ip) + sizeof(struct udphdr)); in do_bpf_write()
|
| H A D | bpf_write_batch.c | 217 T_ASSERT_GE((size_t)ip_len, sizeof(struct ip) + sizeof(struct udphdr) + sizeof(dhcp_min_payload), in make_bootp_packet() 219 payload_len = ip_len - (sizeof(struct ip) + sizeof(struct udphdr)); in make_bootp_packet()
|
| /xnu-11215.81.4/bsd/skywalk/nexus/flowswitch/flow/ |
| H A D | flow_classifier.c | 95 volatile struct udphdr *_udph; in flow_pkt_classify() 346 CL_SKIP_ON((cls_len < l3hlen + sizeof(struct udphdr)) || in flow_pkt_classify() 347 (ulen < sizeof(struct udphdr))); in flow_pkt_classify() 348 udph = __DECONST(volatile struct udphdr *, in flow_pkt_classify()
|
| H A D | flow_track.c | 921 struct udphdr *uh; in flow_track_abort_quic() 943 ulen = sizeof(struct udphdr) + sizeof(struct quic_stateless_reset); in flow_track_abort_quic() 972 uh = (struct udphdr *)(void *)((char *)ip + sizeof(*ip)); in flow_track_abort_quic() 979 uh = (struct udphdr *)(void *)((char *)ip6 + sizeof(*ip6)); in flow_track_abort_quic()
|
| H A D | flow_manager.c | 1231 struct udphdr *uh; in rx_flow_demux_match() 1250 uh = __unsafe_forge_bidi_indexable(struct udphdr *, in rx_flow_demux_match() 1251 (struct udphdr *)pkt->pkt_flow_udp_hdr, sizeof(*uh) + pkt->pkt_flow_ulen); in rx_flow_demux_match()
|
| /xnu-11215.81.4/bsd/net/ |
| H A D | if_ports_used.c | 1576 struct udphdr uh = {}; in if_ports_used_match_mbuf() 1579 error = mbuf_copydata(m, udp_offset, sizeof(struct udphdr), &uh); in if_ports_used_match_mbuf() 1593 if (is_encapsulated_esp(m, udp_offset + sizeof(struct udphdr))) { in if_ports_used_match_mbuf() 1601 if (pkt_data_len < sizeof(struct udphdr)) { in if_ports_used_match_mbuf() 1604 pkt_data_len -= sizeof(struct udphdr); in if_ports_used_match_mbuf() 1720 struct udphdr uh = {}; in if_ports_used_match_mbuf() 1722 error = mbuf_copydata(m, l3_len, sizeof(struct udphdr), &uh); in if_ports_used_match_mbuf() 1737 if (is_encapsulated_esp(m, l3_len + sizeof(struct udphdr))) { in if_ports_used_match_mbuf() 1745 if (pkt_data_len < sizeof(struct udphdr)) { in if_ports_used_match_mbuf() 1748 pkt_data_len -= sizeof(struct udphdr); in if_ports_used_match_mbuf() [all …]
|
| H A D | bpf.c | 3687 uint32_t trunc_len = sizeof(struct udphdr); /* By default no UDP payload */ in get_udp_trunc_len() 3693 struct udphdr udphdr; in get_udp_trunc_len() local 3694 err = bpf_copydata(pkt, off, sizeof(struct udphdr), &udphdr); in get_udp_trunc_len() 3701 sport = EXTRACT_SHORT(&udphdr.uh_sport); in get_udp_trunc_len() 3702 dport = EXTRACT_SHORT(&udphdr.uh_dport); in get_udp_trunc_len() 3719 trunc_len += get_isakmp_trunc_len(pkt, off + sizeof(struct udphdr), in get_udp_trunc_len() 3720 remaining_caplen - sizeof(struct udphdr)); in get_udp_trunc_len() 3722 trunc_len += get_isakmp_natt_trunc_len(pkt, off + sizeof(struct udphdr), in get_udp_trunc_len() 3723 remaining_caplen - sizeof(struct udphdr)); in get_udp_trunc_len()
|
| H A D | pktap.c | 1012 struct udphdr uh; in pktap_fill_proc_info() 1015 sizeof(struct udphdr), &uh); in pktap_fill_proc_info() 1077 struct udphdr uh; in pktap_fill_proc_info() 1080 sizeof(struct udphdr), &uh); in pktap_fill_proc_info()
|
| H A D | if_bridge.c | 4934 struct udphdr * udp; 4988 udp = (struct udphdr *)(info_p->ip_hdr + info_p->ip_hlen 7898 struct udphdr udp; 7900 minlen += sizeof(struct udphdr); 7919 sizeof(struct udphdr), &udp); 7937 offset += sizeof(struct udphdr); 8654 struct udphdr udphdr; 8658 error = mbuf_copydata(m, offset, sizeof(struct udphdr), &udphdr); 8665 if (udphdr.uh_sport != HTONS_IPPORT_BOOTPC || 8666 udphdr.uh_dport != HTONS_IPPORT_BOOTPS) { [all …]
|
| H A D | nat464_utils.c | 867 struct udphdr *uh = (struct udphdr *)pbuf_contig_segment(pbuf, hlen, in nat464_translate_proto()
|
| /xnu-11215.81.4/tests/skywalk/ |
| H A D | skt_netifdirect.c | 100 sizeof(struct udphdr)) 197 struct udphdr udp_hdr, *udp_hdr_p; in skt_netif_ipv6_udp_frame_populate() 236 udp_hdr_p = (struct udphdr *)baddr; in skt_netif_ipv6_udp_frame_populate() 262 struct udphdr *udp_hdr; in skt_netif_ipv6_udp_frame_process() 279 udp_hdr = (struct udphdr *)(buf + sizeof(*eth_hdr) + sizeof(*ip6_hdr)); in skt_netif_ipv6_udp_frame_process()
|
| H A D | skywalk_test_utils.h | 69 struct udphdr udp; 74 struct udphdr udp;
|
| H A D | skywalk_test_utils.c | 2028 csum += htons(payload_len + sizeof(struct udphdr) + IPPROTO_UDP); in sktu_parse_udp4_frame() 2544 size_t sdu_len = data_len + sizeof(struct udphdr); in sktu_create_udp_frames() 2548 struct udphdr *udp = (struct udphdr *)sdu; in sktu_create_udp_frames() 2560 udp_pseudo.length = htons(sizeof(struct udphdr) + data_len); in sktu_create_udp_frames() 2562 + sizeof(struct udphdr), 0); in sktu_create_udp_frames() 2568 udp_pseudo.length = htons(sizeof(struct udphdr) + data_len); in sktu_create_udp_frames() 2570 + sizeof(struct udphdr), 0); in sktu_create_udp_frames() 2577 csum_stuff = offsetof(struct udphdr, uh_sum); in sktu_create_udp_frames()
|