Home
last modified time | relevance | path

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

12

/xnu-10063.101.15/bsd/netinet6/
H A Dudp6_usrreq.c179 static int udp6_input_checksum(struct mbuf *, struct udphdr *, int, int);
247 struct udphdr *uh; in udp6_input()
259 IP6_EXTHDR_CHECK(m, off, sizeof(struct udphdr), return IPPROTO_DONE); in udp6_input()
280 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()
532 int payload_len = ulen - sizeof(struct udphdr) > 4 ? 4 : in udp6_input()
533 ulen - sizeof(struct udphdr); in udp6_input()
535 if (m->m_len < off + sizeof(struct udphdr) + payload_len) { in udp6_input()
536 if ((m = m_pullup(m, off + sizeof(struct udphdr) + in udp6_input()
[all …]
H A Dudp6_output.c154 u_int32_t plen = sizeof(struct udphdr) + ulen; in udp6_output()
156 struct udphdr *udp6; in udp6_output()
408 M_PREPEND(m, hlen + sizeof(struct udphdr), M_DONTWAIT, 1); in udp6_output()
417 udp6 = (struct udphdr *)(void *)(mtod(m, caddr_t) + hlen); in udp6_output()
445 m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum); in udp6_output()
626 sizeof(struct udphdr) + in udp6_output()
691 sizeof(struct udphdr) + in udp6_output()
H A Desp_output.c197 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 Desp_input.c143 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 Dipsec.c1216 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()
5223 struct udphdr *uh = (__typeof__(uh))(void *)((char *)m_mtod(m) + sizeof(*ip)); in ipsec_send_natt_keepalive()
5282 struct udphdr *uh = (__typeof__(uh))(void *)((char *)m_mtod(m) + sizeof(*ip6)); in ipsec_send_natt_keepalive()
[all …]
/xnu-10063.101.15/bsd/netinet/
H A Dudp_usrreq.c212 static int udp_input_checksum(struct mbuf *, struct udphdr *, int, int);
287 struct udphdr *uh; in udp_input()
348 if (m->m_len < iphlen + sizeof(struct udphdr)) { in udp_input()
349 m = m_pullup(m, iphlen + sizeof(struct udphdr)); in udp_input()
358 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen); in udp_input()
375 if (len > ip->ip_len || len < sizeof(struct udphdr)) { in udp_input()
548 iphlen + sizeof(struct udphdr), in udp_input()
582 uh = (struct udphdr *)(void *)((caddr_t)ip + iphlen); in udp_input()
630 int payload_len = len - sizeof(struct udphdr) > 4 ? 4 : in udp_input()
631 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.h130 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.c1703 struct udphdr *uh = NULL; in ip_output_list()
1705 if (m->m_len < hlen + sizeof(struct udphdr)) { in ip_output_list()
1706 m = m_pullup(m, hlen + sizeof(struct udphdr)); in ip_output_list()
1719 uh = (struct udphdr *)(void *)((caddr_t)ip + hlen); in ip_output_list()
/xnu-10063.101.15/tests/
H A Dnet_test_lib.h92 struct udphdr udp;
123 struct udphdr udp;
H A Dbpf_write.c228 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 Dbpf_write_batch.c237 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 Dnet_test_lib.c196 ip6_udp->ip6.ip6_plen = htons(sizeof(struct udphdr) + data_len); in ethernet_udp6_frame_populate()
/xnu-10063.101.15/bsd/net/
H A Dif_ports_used.c1497 struct udphdr uh = {}; in if_ports_used_match_mbuf()
1500 error = mbuf_copydata(m, udp_offset, sizeof(struct udphdr), &uh); in if_ports_used_match_mbuf()
1514 if (is_encapsulated_esp(m, udp_offset + sizeof(struct udphdr))) { in if_ports_used_match_mbuf()
1522 if (pkt_data_len < sizeof(struct udphdr)) { in if_ports_used_match_mbuf()
1525 pkt_data_len -= sizeof(struct udphdr); in if_ports_used_match_mbuf()
1641 struct udphdr uh = {}; in if_ports_used_match_mbuf()
1643 error = mbuf_copydata(m, l3_len, sizeof(struct udphdr), &uh); in if_ports_used_match_mbuf()
1658 if (is_encapsulated_esp(m, l3_len + sizeof(struct udphdr))) { in if_ports_used_match_mbuf()
1666 if (pkt_data_len < sizeof(struct udphdr)) { in if_ports_used_match_mbuf()
1669 pkt_data_len -= sizeof(struct udphdr); in if_ports_used_match_mbuf()
[all …]
H A Dbpf.c3559 uint32_t trunc_len = sizeof(struct udphdr); /* By default no UDP payload */ in get_udp_trunc_len()
3565 struct udphdr udphdr; in get_udp_trunc_len() local
3566 err = bpf_copydata(pkt, off, sizeof(struct udphdr), &udphdr); in get_udp_trunc_len()
3573 sport = EXTRACT_SHORT(&udphdr.uh_sport); in get_udp_trunc_len()
3574 dport = EXTRACT_SHORT(&udphdr.uh_dport); in get_udp_trunc_len()
3591 trunc_len += get_isakmp_trunc_len(pkt, off + sizeof(struct udphdr), in get_udp_trunc_len()
3592 remaining_caplen - sizeof(struct udphdr)); in get_udp_trunc_len()
3594 trunc_len += get_isakmp_natt_trunc_len(pkt, off + sizeof(struct udphdr), in get_udp_trunc_len()
3595 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.c4839 struct udphdr * udp;
4894 udp = (struct udphdr *)(void *)
7660 struct udphdr udp;
7662 minlen += sizeof(struct udphdr);
7681 sizeof(struct udphdr), &udp);
7699 offset += sizeof(struct udphdr);
8344 struct udphdr udphdr;
8348 error = mbuf_copydata(m, offset, sizeof(struct udphdr), &udphdr);
8355 if (ntohs(udphdr.uh_sport) != IPPORT_BOOTPC ||
8356 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.c4919 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-10063.101.15/bsd/skywalk/nexus/flowswitch/flow/
H A Dflow_track.c919 struct udphdr *uh; in flow_track_abort_quic()
941 ulen = sizeof(struct udphdr) + sizeof(struct quic_stateless_reset); in flow_track_abort_quic()
970 uh = (struct udphdr *)(void *)((char *)ip + sizeof(*ip)); in flow_track_abort_quic()
977 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()
1246 uh = (struct udphdr *)pkt->pkt_flow_udp_hdr; in rx_flow_demux_match()

12