Home
last modified time | relevance | path

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

123456789

/OK3568_Linux_fs/kernel/tools/testing/selftests/net/
H A 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 …]
H A 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()
/OK3568_Linux_fs/kernel/net/ipv4/
H A 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()
191 struct udphdr *uh; in __udpv4_gso_segment_csum()
217 struct udphdr *uh, *uh2; in __udpv4_gso_segment_list_csum()
255 udp_hdr(skb)->len = htons(sizeof(struct udphdr) + mss); in __udp_gso_segment_list()
266 struct udphdr *uh; in __udp_gso_segment()
370 struct udphdr *uh; in udp4_ufo_fragment()
383 if (!pskb_may_pull(skb, sizeof(struct udphdr))) in udp4_ufo_fragment()
428 struct udphdr *uh = udp_gro_udphdr(skb); in udp_gro_receive_segment()
430 struct udphdr *uh2; in udp_gro_receive_segment()
[all …]
H A Dxfrm4_input.c85 struct udphdr *uh; in xfrm4_udp_encap_rcv()
99 len = skb->len - sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
100 if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) in xfrm4_udp_encap_rcv()
105 udpdata = (__u8 *)uh + sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
116 len = sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
129 len = sizeof(struct udphdr) + 2 * sizeof(u32); in xfrm4_udp_encap_rcv()
/OK3568_Linux_fs/kernel/drivers/infiniband/sw/rxe/
H A Drxe_icrc.c16 struct udphdr *udph; in rxe_icrc_hdr()
20 int hdr_size = sizeof(struct udphdr) + in rxe_icrc_hdr()
26 u8 pshdr[sizeof(struct udphdr) + in rxe_icrc_hdr()
38 udph = (struct udphdr *)(ip4h + 1); in rxe_icrc_hdr()
46 udph = (struct udphdr *)(ip6h + 1); in rxe_icrc_hdr()
/OK3568_Linux_fs/kernel/net/6lowpan/
H A 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),
/OK3568_Linux_fs/kernel/net/ipv4/netfilter/
H A 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()
/OK3568_Linux_fs/kernel/net/core/
H A Dtso.c35 if (tso->tlen != sizeof(struct udphdr)) { in tso_build_hdr()
47 struct udphdr *uh = (struct udphdr *)hdr; in tso_build_hdr()
74 int tlen = skb_is_gso_tcp(skb) ? tcp_hdrlen(skb) : sizeof(struct udphdr); in tso_start()
79 tso->tcp_seq = (tlen != sizeof(struct udphdr)) ? ntohl(tcp_hdr(skb)->seq) : 0; in tso_start()
/OK3568_Linux_fs/kernel/lib/
H A 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()
/OK3568_Linux_fs/kernel/net/ipv6/
H A Dxfrm6_input.c80 struct udphdr *uh; in xfrm6_udp_encap_rcv()
95 len = skb->len - sizeof(struct udphdr); in xfrm6_udp_encap_rcv()
96 if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) in xfrm6_udp_encap_rcv()
101 udpdata = (__u8 *)uh + sizeof(struct udphdr); in xfrm6_udp_encap_rcv()
112 len = sizeof(struct udphdr); in xfrm6_udp_encap_rcv()
125 len = sizeof(struct udphdr) + 2 * sizeof(u32); in xfrm6_udp_encap_rcv()
H A Dudp_offload.c40 struct udphdr *uh; in udp6_ufo_fragment()
45 if (!pskb_may_pull(skb, sizeof(struct udphdr))) in udp6_ufo_fragment()
127 struct udphdr *uh = udp_gro_udphdr(skb); in udp6_gro_receive()
164 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp6_gro_complete()
H A Dudp.c158 sizeof(struct udphdr)); in lookup_reuseport()
428 sizeof(struct udphdr), off); in udpv6_recvmsg()
506 struct udphdr *uh, in __udp6_lib_err_encap()
555 struct udphdr *uh = (struct udphdr *)(skb->data+offset); in __udp6_lib_err()
721 if (sk_filter_trim_cap(sk, skb, sizeof(struct udphdr))) in udpv6_queue_rcv_one_skb()
803 const struct udphdr *uh = udp_hdr(skb); in __udp6_lib_mcast_deliver()
880 struct udphdr *uh) in udp6_unicast_rcv_skb()
900 struct udphdr *uh; in __udp6_lib_rcv()
905 if (!pskb_may_pull(skb, sizeof(struct udphdr))) in __udp6_lib_rcv()
1033 const struct udphdr *uh; in udp_v6_early_demux()
[all …]
/OK3568_Linux_fs/kernel/drivers/net/ethernet/mellanox/mlx5/core/
H A Den_selftest.c99 sizeof(struct udphdr) + sizeof(struct mlx5ehdr))
107 struct udphdr *udph; in mlx5e_test_get_udp_skb()
128 udph = skb_put(skb, sizeof(struct udphdr)); in mlx5e_test_get_udp_skb()
138 udph->len = htons(sizeof(struct mlx5ehdr) + sizeof(struct udphdr)); in mlx5e_test_get_udp_skb()
146 iplen = sizeof(struct iphdr) + sizeof(struct udphdr) + in mlx5e_test_get_udp_skb()
188 struct udphdr *udph; in mlx5e_test_loopback_validate()
204 udph = (struct udphdr *)((u8 *)iph + 4 * iph->ihl); in mlx5e_test_loopback_validate()
/OK3568_Linux_fs/kernel/drivers/infiniband/core/
H A Dlag.c19 struct udphdr *uh; in rdma_build_skb()
25 hdr_len = ETH_HLEN + sizeof(struct udphdr) + LL_RESERVED_SPACE(netdev); in rdma_build_skb()
34 skb_push(skb, sizeof(struct udphdr)); in rdma_build_skb()
40 uh->len = htons(sizeof(struct udphdr)); in rdma_build_skb()
50 iph->tot_len = htons(sizeof(struct udphdr) + sizeof(struct in rdma_build_skb()
/OK3568_Linux_fs/kernel/tools/testing/selftests/bpf/progs/
H A Dtest_select_reuseport_kern.c129 struct udphdr *uh = data; in _select_by_skb_data()
137 if (sizeof(struct udphdr) + sizeof(*cmd) > data_check.len) in _select_by_skb_data()
139 if (data + sizeof(struct udphdr) + sizeof(*cmd) > data_end) { in _select_by_skb_data()
140 if (bpf_skb_load_bytes(reuse_md, sizeof(struct udphdr), in _select_by_skb_data()
145 cmd = data + sizeof(struct udphdr); in _select_by_skb_data()
/OK3568_Linux_fs/kernel/include/linux/
H A 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()
/OK3568_Linux_fs/kernel/net/batman-adv/
H A Dgateway_client.c618 struct udphdr *udphdr; in batadv_gw_dhcp_recipient_get() local
672 if (!pskb_may_pull(skb, *header_len + sizeof(*udphdr))) in batadv_gw_dhcp_recipient_get()
675 udphdr = (struct udphdr *)(skb->data + *header_len); in batadv_gw_dhcp_recipient_get()
676 *header_len += sizeof(*udphdr); in batadv_gw_dhcp_recipient_get()
681 if (udphdr->dest == htons(67)) in batadv_gw_dhcp_recipient_get()
683 else if (udphdr->source == htons(67)) in batadv_gw_dhcp_recipient_get()
687 if (udphdr->dest == htons(547)) in batadv_gw_dhcp_recipient_get()
689 else if (udphdr->source == htons(547)) in batadv_gw_dhcp_recipient_get()
/OK3568_Linux_fs/kernel/arch/powerpc/platforms/ps3/
H A 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()
/OK3568_Linux_fs/kernel/include/net/
H A Dudp.h131 sizeof(struct udphdr), 0); in udp_csum_outgoing()
141 sizeof(struct udphdr), skb->csum); in udp_csum()
161 skb->csum = csum_partial(skb->data, sizeof(struct udphdr), in udp_csum_pull_header()
163 skb_pull_rcsum(skb, sizeof(struct udphdr)); in udp_csum_pull_header()
164 UDP_SKB_CB(skb)->cscov -= sizeof(struct udphdr); in udp_csum_pull_header()
177 struct udphdr *uh, struct sock *sk);
184 static inline struct udphdr *udp_gro_udphdr(struct sk_buff *skb) in udp_gro_udphdr()
186 struct udphdr *uh; in udp_gro_udphdr()
/OK3568_Linux_fs/kernel/drivers/net/ethernet/mellanox/mlx5/core/en/
H A Dtc_tun_mplsoudp.c15 return sizeof(struct udphdr) + MPLS_HLEN; in calc_hlen()
33 struct udphdr *udp = (struct udphdr *)(buf); in generate_ip_tun_hdr()
H A 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()
/OK3568_Linux_fs/kernel/net/netfilter/
H A Dnf_conntrack_proto_udp.c50 const struct udphdr *hdr; in udp_error()
51 struct udphdr _hdr; in udp_error()
145 const struct udphdr *hdr; in udplite_error()
146 struct udphdr _hdr; in udplite_error()
/OK3568_Linux_fs/kernel/net/ipv6/ila/
H A 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()
/OK3568_Linux_fs/kernel/net/netfilter/ipvs/
H A 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()
/OK3568_Linux_fs/app/forlinx/quectelCM/libmnl/dhcp/
H A Dpacket.c85 struct udphdr udp; in send_packet()
154 struct udphdr udp; in receive_packet()
172 if (nread < (int)(sizeof(struct iphdr) + sizeof(struct udphdr))) { in receive_packet()
220 ((int)(nread - sizeof(struct iphdr) - sizeof(struct udphdr)) < dhcp_size) || in receive_packet()

123456789