Home
last modified time | relevance | path

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

123456

/Linux-v5.4/tools/testing/selftests/net/
Dip_defrag.c31 #define UDP_HLEN (sizeof(struct udphdr))
101 static uint16_t udp_checksum(struct ip *iphdr, struct udphdr *udphdr) in udp_checksum() argument
108 sum = raw_checksum((uint8_t *)udphdr, UDP_HLEN, sum); in udp_checksum()
117 static uint16_t udp6_checksum(struct ip6_hdr *iphdr, struct udphdr *udphdr) in udp6_checksum() argument
124 sum = raw_checksum((uint8_t *)&udphdr->len, sizeof(udphdr->len), sum); in udp6_checksum()
125 sum = raw_checksum((uint8_t *)udphdr, UDP_HLEN, sum); in udp6_checksum()
144 struct udphdr udphdr; in send_fragment() local
145 udphdr.source = htons(cfg_port + 1); in send_fragment()
146 udphdr.dest = htons(cfg_port); in send_fragment()
147 udphdr.len = htons(UDP_HLEN + payload_len); in send_fragment()
[all …]
Dpsock_snd.c80 vh->hdr_len = ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr); in build_vnet_header()
85 vh->csum_offset = __builtin_offsetof(struct udphdr, check); in build_vnet_header()
89 vh->csum_start += sizeof(struct udphdr) + cfg_payload_len - in build_vnet_header()
124 iph->tot_len = htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len); in build_ipv4_header()
137 struct udphdr *udph = header; in build_udp_header()
/Linux-v5.4/net/ipv4/
Dudp_offload.c23 struct udphdr *uh = udp_hdr(skb); in __skb_udp_tunnel_segment()
141 skb->csum_offset = offsetof(struct udphdr, check); in __skb_udp_tunnel_segment()
193 struct udphdr *uh; in __udp_gso_segment()
294 struct udphdr *uh; in udp4_ufo_fragment()
307 if (!pskb_may_pull(skb, sizeof(struct udphdr))) in udp4_ufo_fragment()
352 struct udphdr *uh = udp_hdr(skb); in udp_gro_receive_segment()
354 struct udphdr *uh2; in udp_gro_receive_segment()
371 skb_gro_pull(skb, sizeof(struct udphdr)); in udp_gro_receive_segment()
372 skb_gro_postpull_rcsum(skb, uh, sizeof(struct udphdr)); in udp_gro_receive_segment()
407 struct udphdr *uh, udp_lookup_t lookup) in udp_gro_receive()
[all …]
Dxfrm4_input.c90 struct udphdr *uh; in xfrm4_udp_encap_rcv()
104 len = skb->len - sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
105 if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) in xfrm4_udp_encap_rcv()
110 udpdata = (__u8 *)uh + sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
121 len = sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
134 len = sizeof(struct udphdr) + 2 * sizeof(u32); in xfrm4_udp_encap_rcv()
/Linux-v5.4/drivers/infiniband/sw/rxe/
Drxe_icrc.c43 struct udphdr *udph; in rxe_icrc_hdr()
47 int hdr_size = sizeof(struct udphdr) + in rxe_icrc_hdr()
53 u8 pshdr[sizeof(struct udphdr) + in rxe_icrc_hdr()
65 udph = (struct udphdr *)(ip4h + 1); in rxe_icrc_hdr()
73 udph = (struct udphdr *)(ip6h + 1); in rxe_icrc_hdr()
/Linux-v5.4/net/6lowpan/
Dnhc_udp.c40 struct udphdr uh; in udp_uncompress()
95 uh.len = htons(skb->len + sizeof(struct udphdr)); in udp_uncompress()
98 uh.len = htons(skb->len + sizeof(struct udphdr)); in udp_uncompress()
110 skb_push(skb, sizeof(struct udphdr)); in udp_uncompress()
111 skb_copy_to_linear_data(skb, &uh, sizeof(struct udphdr)); in udp_uncompress()
118 const struct udphdr *uh = udp_hdr(skb); in udp_compress()
178 LOWPAN_NHC(nhc_udp, "RFC6282 UDP", NEXTHDR_UDP, sizeof(struct udphdr),
/Linux-v5.4/net/ipv4/netfilter/
Dnf_nat_snmp_basic_main.c129 struct udphdr *udph = (struct udphdr *)((__be32 *)iph + iph->ihl); in snmp_translate()
130 u16 datalen = ntohs(udph->len) - sizeof(struct udphdr); in snmp_translate()
131 char *data = (unsigned char *)udph + sizeof(struct udphdr); in snmp_translate()
146 ctx.begin = (unsigned char *)udph + sizeof(struct udphdr); in snmp_translate()
167 const struct udphdr *udph = (struct udphdr *)((__be32 *)iph + iph->ihl); in help()
/Linux-v5.4/lib/
Dtest_blackhole_dev.c33 struct udphdr *uh; in test_blackholedev_init()
50 uh = (struct udphdr *)skb_push(skb, sizeof(struct udphdr)); in test_blackholedev_init()
59 ip6h->payload_len = data_len + sizeof(struct udphdr); in test_blackholedev_init()
/Linux-v5.4/net/ipv6/
Dudp_offload.c40 struct udphdr *uh; in udp6_ufo_fragment()
45 if (!pskb_may_pull(skb, sizeof(struct udphdr))) in udp6_ufo_fragment()
117 struct udphdr *uh = udp_gro_udphdr(skb); in udp6_gro_receive()
145 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp6_gro_complete()
Dudp.c167 sizeof(struct udphdr)); in udp6_lib_lookup2()
372 sizeof(struct udphdr), off); in udpv6_recvmsg()
450 struct udphdr *uh, in __udp6_lib_err_encap()
499 struct udphdr *uh = (struct udphdr *)(skb->data+offset); in __udp6_lib_err()
665 if (sk_filter_trim_cap(sk, skb, sizeof(struct udphdr))) in udpv6_queue_rcv_one_skb()
748 const struct udphdr *uh = udp_hdr(skb); in __udp6_lib_mcast_deliver()
825 struct udphdr *uh) in udp6_unicast_rcv_skb()
845 struct udphdr *uh; in __udp6_lib_rcv()
849 if (!pskb_may_pull(skb, sizeof(struct udphdr))) in __udp6_lib_rcv()
975 const struct udphdr *uh; in udp_v6_early_demux()
[all …]
Dip6_checksum.c65 int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh, int proto) in udp6_csum_init()
119 struct udphdr *uh = udp_hdr(skb); in udp6_set_csum()
133 skb->csum_offset = offsetof(struct udphdr, check); in udp6_set_csum()
Dfou6.c24 struct udphdr *uh; in fou6_build_udp()
26 skb_push(skb, sizeof(struct udphdr)); in fou6_build_udp()
97 len = sizeof(struct udphdr) + sizeof(struct guehdr); in gue6_err()
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/
Den_selftest.c100 sizeof(struct udphdr) + sizeof(struct mlx5ehdr))
108 struct udphdr *udph; in mlx5e_test_get_udp_skb()
129 udph = skb_put(skb, sizeof(struct udphdr)); in mlx5e_test_get_udp_skb()
139 udph->len = htons(sizeof(struct mlx5ehdr) + sizeof(struct udphdr)); in mlx5e_test_get_udp_skb()
147 iplen = sizeof(struct iphdr) + sizeof(struct udphdr) + in mlx5e_test_get_udp_skb()
189 struct udphdr *udph; in mlx5e_test_loopback_validate()
205 udph = (struct udphdr *)((u8 *)iph + 4 * iph->ihl); in mlx5e_test_loopback_validate()
/Linux-v5.4/tools/testing/selftests/bpf/progs/
Dtest_select_reuseport_kern.c123 struct udphdr *uh = data; in _select_by_skb_data()
131 if (sizeof(struct udphdr) + sizeof(*cmd) > data_check.len) in _select_by_skb_data()
133 if (data + sizeof(struct udphdr) + sizeof(*cmd) > data_end) { in _select_by_skb_data()
134 if (bpf_skb_load_bytes(reuse_md, sizeof(struct udphdr), in _select_by_skb_data()
139 cmd = data + sizeof(struct udphdr); in _select_by_skb_data()
/Linux-v5.4/include/linux/
Dudp.h21 static inline struct udphdr *udp_hdr(const struct sk_buff *skb) in udp_hdr()
23 return (struct udphdr *)skb_transport_header(skb); in udp_hdr()
26 static inline struct udphdr *inner_udp_hdr(const struct sk_buff *skb) in inner_udp_hdr()
28 return (struct udphdr *)skb_inner_transport_header(skb); in inner_udp_hdr()
/Linux-v5.4/arch/powerpc/platforms/ps3/
Dgelic_udbg.c63 static __iomem struct udphdr *h_udp;
176 header_size += sizeof(struct udphdr); in gelic_debug_init()
177 h_udp = (struct udphdr *)(h_ip + 1); in gelic_debug_init()
199 h_ip->tot_len = msgsize + sizeof(struct udphdr) + in gelic_sendbuf()
201 h_udp->len = msgsize + sizeof(struct udphdr); in gelic_sendbuf()
/Linux-v5.4/net/batman-adv/
Dgateway_client.c628 struct udphdr *udphdr; in batadv_gw_dhcp_recipient_get() local
682 if (!pskb_may_pull(skb, *header_len + sizeof(*udphdr))) in batadv_gw_dhcp_recipient_get()
685 udphdr = (struct udphdr *)(skb->data + *header_len); in batadv_gw_dhcp_recipient_get()
686 *header_len += sizeof(*udphdr); in batadv_gw_dhcp_recipient_get()
691 if (udphdr->dest == htons(67)) in batadv_gw_dhcp_recipient_get()
693 else if (udphdr->source == htons(67)) in batadv_gw_dhcp_recipient_get()
697 if (udphdr->dest == htons(547)) in batadv_gw_dhcp_recipient_get()
699 else if (udphdr->source == htons(547)) in batadv_gw_dhcp_recipient_get()
/Linux-v5.4/include/net/
Dudp.h130 sizeof(struct udphdr), 0); in udp_csum_outgoing()
140 sizeof(struct udphdr), skb->csum); in udp_csum()
160 skb->csum = csum_partial(skb->data, sizeof(struct udphdr), in udp_csum_pull_header()
162 skb_pull_rcsum(skb, sizeof(struct udphdr)); in udp_csum_pull_header()
163 UDP_SKB_CB(skb)->cscov -= sizeof(struct udphdr); in udp_csum_pull_header()
170 struct udphdr *uh, udp_lookup_t lookup);
176 static inline struct udphdr *udp_gro_udphdr(struct sk_buff *skb) in udp_gro_udphdr()
178 struct udphdr *uh; in udp_gro_udphdr()
Dvxlan.h33 #define VXLAN_HLEN (sizeof(struct udphdr) + sizeof(struct vxlanhdr))
318 sizeof(struct udphdr) + sizeof(struct vxlanhdr)) || in vxlan_features_check()
362 offsetof(struct udphdr, check) : in vxlan_rco_offset()
370 if (offset == offsetof(struct udphdr, check)) in vxlan_compute_rco()
/Linux-v5.4/drivers/net/ethernet/mellanox/mlx5/core/en/
Dtc_tun_vxlan.c88 struct udphdr *udp = (struct udphdr *)(buf); in mlx5e_gen_ip_tunnel_header_vxlan()
91 vxh = (struct vxlanhdr *)((char *)udp + sizeof(struct udphdr)); in mlx5e_gen_ip_tunnel_header_vxlan()
Dtc_tun_geneve.c17 return sizeof(struct udphdr) + in mlx5e_tc_tun_calc_hlen_geneve()
97 struct udphdr *udp = (struct udphdr *)(buf); in mlx5e_gen_ip_tunnel_header_geneve()
100 geneveh = (struct genevehdr *)((char *)udp + sizeof(struct udphdr)); in mlx5e_gen_ip_tunnel_header_geneve()
/Linux-v5.4/net/ipv6/ila/
Dila_common.c93 if (likely(pskb_may_pull(skb, nhoff + sizeof(struct udphdr)))) { in ila_csum_adjust_transport()
94 struct udphdr *uh = (struct udphdr *) in ila_csum_adjust_transport()
/Linux-v5.4/net/netfilter/
Dnf_conntrack_proto_udp.c50 const struct udphdr *hdr; in udp_error()
51 struct udphdr _hdr; in udp_error()
139 const struct udphdr *hdr; in udplite_error()
140 struct udphdr _hdr; in udplite_error()
/Linux-v5.4/net/netfilter/ipvs/
Dip_vs_proto_udp.c37 struct udphdr _udph, *uh; in udp_conn_schedule()
93 udp_fast_csum_update(int af, struct udphdr *uhdr, in udp_fast_csum_update()
115 udp_partial_csum_update(int af, struct udphdr *uhdr, in udp_partial_csum_update()
139 struct udphdr *udph; in udp_snat_handler()
222 struct udphdr *udph; in udp_dnat_handler()
302 struct udphdr _udph, *uh; in udp_csum_check()
/Linux-v5.4/net/netfilter/ipset/
Dip_set_getport.c55 struct udphdr _udph; in get_port()
56 const struct udphdr *uh; in get_port()

123456