| /xnu-8792.61.2/bsd/netinet6/ |
| H A D | udp6_usrreq.c | 175 static int udp6_input_checksum(struct mbuf *, struct udphdr *, int, int); 244 struct udphdr *uh; in udp6_input() 256 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() 449 off + sizeof(struct udphdr), ifp); in udp6_input() 481 uh = (struct udphdr *)(void *)((caddr_t)ip6 + off); in udp6_input() 529 int payload_len = ulen - sizeof(struct udphdr) > 4 ? 4 : in udp6_input() 530 ulen - sizeof(struct udphdr); in udp6_input() 532 if (m->m_len < off + sizeof(struct udphdr) + payload_len) { in udp6_input() 533 if ((m = m_pullup(m, off + sizeof(struct udphdr) + in udp6_input() [all …]
|
| H A D | esp_output.c | 193 hdrsiz += sizeof(struct udphdr) + 4; in esp_hdrsiz() 211 return sizeof(struct newesp) + esp_max_ivlen() + 17 + AH_MAXSUMSIZE + sizeof(struct udphdr); in esp_hdrsiz() 261 struct udphdr *udp = NULL; in esp_output() 479 udp = mtod(md, struct udphdr *); in esp_output() 506 esphlen += sizeof(struct udphdr); in esp_output() 507 espoff += sizeof(struct udphdr); in esp_output() 528 udp = mtod(n, struct udphdr *); in esp_output() 529 esp = (struct esp *)(void *)((caddr_t)udp + sizeof(struct udphdr)); in esp_output() 539 udp = mtod(md, struct udphdr *); in esp_output() 540 esp = (struct esp *)(void *)((caddr_t)udp + sizeof(struct udphdr)); in esp_output() [all …]
|
| H A D | udp6_output.c | 154 u_int32_t plen = sizeof(struct udphdr) + ulen; in udp6_output() 156 struct udphdr *udp6; in udp6_output() 406 M_PREPEND(m, hlen + sizeof(struct udphdr), M_DONTWAIT, 1); in udp6_output() 415 udp6 = (struct udphdr *)(void *)(mtod(m, caddr_t) + hlen); in udp6_output() 443 m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); in udp6_output() 625 sizeof(struct udphdr) + in udp6_output() 684 sizeof(struct udphdr) + in udp6_output()
|
| H A D | esp_input.c | 139 u_int8_t stripsiz = (u_int8_t)sizeof(struct udphdr); in esp4_input_strip_udp_encap() 157 u_int8_t stripsiz = (u_int8_t)sizeof(struct udphdr); in esp6_input_strip_udp_encap() 257 !(ip->ip_p == IPPROTO_UDP && off >= sizeof(struct udphdr))) { in esp4_input_extended() 536 off -= sizeof(struct udphdr); // off no longer includes the udphdr's size in esp4_input_extended() 542 struct udphdr *encap_uh = (__typeof__(encap_uh))(void *)((caddr_t)ip + off); in esp4_input_extended() 779 struct udphdr *udp; in esp4_input_extended() 786 if (m->m_len < off + sizeof(struct udphdr)) { in esp4_input_extended() 787 m = m_pullup(m, off + sizeof(struct udphdr)); in esp4_input_extended() 796 udp = (struct udphdr *)(void *)(((u_int8_t *)ip) + off); in esp4_input_extended() 963 !(*nproto == IPPROTO_UDP && off >= sizeof(struct udphdr)))) { in esp6_input_extended() [all …]
|
| H A D | ipsec.c | 1214 struct udphdr uh; in ipsec4_get_ulp() 1262 if (off + sizeof(struct udphdr) > m->m_pkthdr.len) { in ipsec4_get_ulp() 1327 struct udphdr uh; in ipsec6_get_ulp() 1367 if (off + sizeof(struct udphdr) > m->m_pkthdr.len) { in ipsec6_get_ulp() 3455 struct udphdr *udp; in ipsec4_output() 3462 if (state->m->m_len < hlen + sizeof(struct udphdr)) { in ipsec4_output() 3463 state->m = m_pullup(state->m, hlen + sizeof(struct udphdr)); in ipsec4_output() 3471 udp = (struct udphdr *)(void *)(((u_int8_t *)ip) + hlen); in ipsec4_output() 4922 struct udphdr *uh = (__typeof__(uh))(void *)((char *)m_mtod(m) + sizeof(*ip)); in ipsec_send_natt_keepalive() 4981 struct udphdr *uh = (__typeof__(uh))(void *)((char *)m_mtod(m) + sizeof(*ip6)); in ipsec_send_natt_keepalive() [all …]
|
| H A D | ip6_input.c | 2305 if (off + sizeof(struct udphdr) > m->m_pkthdr.len) { in ip6_pkt_has_ulp()
|
| /xnu-8792.61.2/bsd/netinet/ |
| H A D | udp_usrreq.c | 206 static int udp_input_checksum(struct mbuf *, struct udphdr *, int, int); 277 struct udphdr *uh; in udp_input() 334 if (m->m_len < iphlen + sizeof(struct udphdr)) { in udp_input() 335 m = m_pullup(m, iphlen + sizeof(struct udphdr)); in udp_input() 344 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen); in udp_input() 361 if (len > ip->ip_len || len < sizeof(struct udphdr)) { in udp_input() 534 iphlen + sizeof(struct udphdr), in udp_input() 568 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen); in udp_input() 616 int payload_len = len - sizeof(struct udphdr) > 4 ? 4 : in udp_input() 617 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 | 127 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 | 1692 struct udphdr *uh = NULL; in ip_output_list() 1694 if (m->m_len < hlen + sizeof(struct udphdr)) { in ip_output_list() 1695 m = m_pullup(m, hlen + sizeof(struct udphdr)); in ip_output_list() 1708 uh = (struct udphdr *)(void *)((caddr_t)ip + hlen); in ip_output_list()
|
| /xnu-8792.61.2/bsd/net/ |
| H A D | if_ports_used.c | 1397 struct udphdr uh = {}; in if_ports_used_match_mbuf() 1400 error = mbuf_copydata(m, udp_offset, sizeof(struct udphdr), &uh); in if_ports_used_match_mbuf() 1414 if (is_encapsulated_esp(m, udp_offset + sizeof(struct udphdr))) { in if_ports_used_match_mbuf() 1422 if (pkt_data_len < sizeof(struct udphdr)) { in if_ports_used_match_mbuf() 1425 pkt_data_len -= sizeof(struct udphdr); in if_ports_used_match_mbuf() 1541 struct udphdr uh = {}; in if_ports_used_match_mbuf() 1543 error = mbuf_copydata(m, l3_len, sizeof(struct udphdr), &uh); in if_ports_used_match_mbuf() 1558 if (is_encapsulated_esp(m, l3_len + sizeof(struct udphdr))) { in if_ports_used_match_mbuf() 1566 if (pkt_data_len < sizeof(struct udphdr)) { in if_ports_used_match_mbuf() 1569 pkt_data_len -= sizeof(struct udphdr); in if_ports_used_match_mbuf() [all …]
|
| H A D | bpf.c | 3275 uint32_t trunc_len = sizeof(struct udphdr); /* By default no UDP payload */ in get_udp_trunc_len() 3281 struct udphdr udphdr; in get_udp_trunc_len() local 3282 err = bpf_copydata(pkt, off, sizeof(struct udphdr), &udphdr); in get_udp_trunc_len() 3289 sport = EXTRACT_SHORT(&udphdr.uh_sport); in get_udp_trunc_len() 3290 dport = EXTRACT_SHORT(&udphdr.uh_dport); in get_udp_trunc_len() 3307 trunc_len += get_isakmp_trunc_len(pkt, off + sizeof(struct udphdr), in get_udp_trunc_len() 3308 remaining_caplen - sizeof(struct udphdr)); in get_udp_trunc_len() 3310 trunc_len += get_isakmp_natt_trunc_len(pkt, off + sizeof(struct udphdr), in get_udp_trunc_len() 3311 remaining_caplen - sizeof(struct udphdr)); in get_udp_trunc_len()
|
| H A D | pktap.c | 983 struct udphdr uh; in pktap_fill_proc_info() 986 sizeof(struct udphdr), &uh); in pktap_fill_proc_info() 1048 struct udphdr uh; in pktap_fill_proc_info() 1051 sizeof(struct udphdr), &uh); in pktap_fill_proc_info()
|
| H A D | if_bridge.c | 4709 struct udphdr * udp; 4764 udp = (struct udphdr *)(void *) 7498 struct udphdr udp; 7500 minlen += sizeof(struct udphdr); 7519 sizeof(struct udphdr), &udp); 7537 offset += sizeof(struct udphdr); 8154 struct udphdr udphdr; 8158 error = mbuf_copydata(m, offset, sizeof(struct udphdr), &udphdr); 8165 if (ntohs(udphdr.uh_sport) != IPPORT_BOOTPC || 8166 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 | 4863 struct udphdr *uh; in pf_nat64_ipv4() 4866 uh = (struct udphdr *)pbuf_contig_segment(pbuf, hlen, in pf_nat64_ipv4() 4899 struct udphdr *uh = pd->hdr.udp; in pf_test_rule() 7590 struct udphdr *uh = pd->hdr.udp; in pf_test_state_udp() 8311 struct udphdr uh; in pf_test_state_icmp() 9573 if (off < (int)sizeof(struct ip) || len < (int)sizeof(struct udphdr)) { in pf_check_proto_cksum() 9851 struct udphdr uh; in pf_test() 9865 ntohs(uh.uh_ulen) < sizeof(struct udphdr)) { in pf_test() 10508 struct udphdr uh; in pf_test6() 10522 ntohs(uh.uh_ulen) < sizeof(struct udphdr)) { in pf_test6()
|
| H A D | pfvar.h | 1417 struct udphdr *udp;
|
| /xnu-8792.61.2/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() 1247 uh = (struct udphdr *)pkt->pkt_flow_udp_hdr; in rx_flow_demux_match()
|
| /xnu-8792.61.2/bsd/skywalk/nexus/ |
| H A D | nexus_traffic_rule.c | 319 volatile struct udphdr *_udph; in fill_inet_td()
|
| /xnu-8792.61.2/tests/ |
| H A D | net_bridge.c | 94 struct udphdr udp; 125 struct udphdr udp; 1106 ip6_udp->ip6.ip6_plen = htons(sizeof(struct udphdr) + data_len); in ethernet_udp6_frame_populate()
|