Home
last modified time | relevance | path

Searched refs:udphdr (Results 1 – 25 of 27) sorted by relevance

12

/xnu-8796.121.2/bsd/netinet6/
H A Dudp6_usrreq.c175 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 Desp_output.c193 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 Dudp6_output.c154 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 Desp_input.c139 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()
537 off -= sizeof(struct udphdr); // off no longer includes the udphdr's size in esp4_input_extended()
543 struct udphdr *encap_uh = (__typeof__(encap_uh))(void *)((caddr_t)ip + off); in esp4_input_extended()
780 struct udphdr *udp; in esp4_input_extended()
787 if (m->m_len < off + sizeof(struct udphdr)) { in esp4_input_extended()
788 m = m_pullup(m, off + sizeof(struct udphdr)); in esp4_input_extended()
797 udp = (struct udphdr *)(void *)(((u_int8_t *)ip) + off); in esp4_input_extended()
964 !(*nproto == IPPROTO_UDP && off >= sizeof(struct udphdr)))) { in esp6_input_extended()
[all …]
H A Dipsec.c1214 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 Dip6_input.c2305 if (off + sizeof(struct udphdr) > m->m_pkthdr.len) { in ip6_pkt_has_ulp()
/xnu-8796.121.2/bsd/netinet/
H A Dudp_usrreq.c208 static int udp_input_checksum(struct mbuf *, struct udphdr *, int, int);
279 struct udphdr *uh; in udp_input()
336 if (m->m_len < iphlen + sizeof(struct udphdr)) { in udp_input()
337 m = m_pullup(m, iphlen + sizeof(struct udphdr)); in udp_input()
346 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen); in udp_input()
363 if (len > ip->ip_len || len < sizeof(struct udphdr)) { in udp_input()
536 iphlen + sizeof(struct udphdr), in udp_input()
570 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen); in udp_input()
618 int payload_len = len - sizeof(struct udphdr) > 4 ? 4 : in udp_input()
619 len - sizeof(struct udphdr); in udp_input()
[all …]
H A Dudp.h79 struct udphdr { struct
H A Ddhcp.h62 struct udphdr udp;
H A Dbootp.h127 struct udphdr bp_udp;
H A Dudp_var.h76 struct udphdr ui_u; /* udp header */
H A Dip_compat.h705 typedef struct udphdr udphdr_t;
H A Dip_output.c1692 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-8796.121.2/bsd/net/
H A Dif_ports_used.c1396 struct udphdr uh = {}; in if_ports_used_match_mbuf()
1399 error = mbuf_copydata(m, udp_offset, sizeof(struct udphdr), &uh); in if_ports_used_match_mbuf()
1413 if (is_encapsulated_esp(m, udp_offset + sizeof(struct udphdr))) { in if_ports_used_match_mbuf()
1421 if (pkt_data_len < sizeof(struct udphdr)) { in if_ports_used_match_mbuf()
1424 pkt_data_len -= sizeof(struct udphdr); in if_ports_used_match_mbuf()
1540 struct udphdr uh = {}; in if_ports_used_match_mbuf()
1542 error = mbuf_copydata(m, l3_len, sizeof(struct udphdr), &uh); in if_ports_used_match_mbuf()
1557 if (is_encapsulated_esp(m, l3_len + sizeof(struct udphdr))) { in if_ports_used_match_mbuf()
1565 if (pkt_data_len < sizeof(struct udphdr)) { in if_ports_used_match_mbuf()
1568 pkt_data_len -= sizeof(struct udphdr); in if_ports_used_match_mbuf()
[all …]
H A Dbpf.c3275 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 Dpktap.c981 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 Dif_bridge.c4753 struct udphdr * udp;
4808 udp = (struct udphdr *)(void *)
7542 struct udphdr udp;
7544 minlen += sizeof(struct udphdr);
7563 sizeof(struct udphdr), &udp);
7581 offset += sizeof(struct udphdr);
8198 struct udphdr udphdr;
8202 error = mbuf_copydata(m, offset, sizeof(struct udphdr), &udphdr);
8209 if (ntohs(udphdr.uh_sport) != IPPORT_BOOTPC ||
8210 ntohs(udphdr.uh_dport) != IPPORT_BOOTPS) {
[all …]
H A Dnat464_utils.c861 struct udphdr *uh = (struct udphdr *)pbuf_contig_segment(pbuf, hlen, in nat464_translate_proto()
H A Dpf.c4863 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 Dpfvar.h1417 struct udphdr *udp;
/xnu-8796.121.2/bsd/skywalk/nexus/flowswitch/flow/
H A Dflow_track.c905 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 Dflow_classifier.c95 volatile struct udphdr *_udph; in flow_pkt_classify()
H A Dflow_manager.c1227 struct udphdr *uh; in rx_flow_demux_match()
1247 uh = (struct udphdr *)pkt->pkt_flow_udp_hdr; in rx_flow_demux_match()
/xnu-8796.121.2/bsd/skywalk/nexus/
H A Dnexus_traffic_rule.c319 volatile struct udphdr *_udph; in fill_inet_td()
/xnu-8796.121.2/tests/
H A Dnet_bridge.c94 struct udphdr udp;
125 struct udphdr udp;
1106 ip6_udp->ip6.ip6_plen = htons(sizeof(struct udphdr) + data_len); in ethernet_udp6_frame_populate()

12