/kernel/linux/linux-5.10/net/ipv4/ |
H A D | udp_offload.c | 23 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 *uh in udp_gro_receive_segment() [all...] |
H A D | xfrm4_input.c | 85 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()
|
/kernel/linux/linux-5.10/tools/testing/selftests/net/ |
H A D | ip_defrag.c | 31 #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 udphd in send_fragment() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/net/ |
H A D | ip_defrag.c | 31 #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 udphd in send_fragment() local [all...] |
/kernel/linux/linux-6.6/net/ipv4/ |
H A D | udp_offload.c | 25 struct udphdr *uh = udp_hdr(skb); in __skb_udp_tunnel_segment() 146 skb->csum_offset = offsetof(struct udphdr, check); in __skb_udp_tunnel_segment() 196 struct udphdr *uh; in __udpv4_gso_segment_csum() 222 struct udphdr *uh, *uh2; in __udpv4_gso_segment_list_csum() 260 udp_hdr(skb)->len = htons(sizeof(struct udphdr) + mss); in __udp_gso_segment_list() 271 struct udphdr *uh; in __udp_gso_segment() 382 struct udphdr *uh; in udp4_ufo_fragment() 395 if (!pskb_may_pull(skb, sizeof(struct udphdr))) in udp4_ufo_fragment() 467 struct udphdr *uh = udp_gro_udphdr(skb); in udp_gro_receive_segment() 469 struct udphdr *uh in udp_gro_receive_segment() [all...] |
H A D | xfrm4_input.c | 85 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()
|
/kernel/linux/linux-5.10/drivers/infiniband/sw/rxe/ |
H A D | rxe_icrc.c | 16 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()
|
/kernel/linux/linux-5.10/net/6lowpan/ |
H A D | nhc_udp.c | 40 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),
|
/kernel/linux/linux-6.6/net/6lowpan/ |
H A D | nhc_udp.c | 39 struct udphdr uh; in udp_uncompress() 94 uh.len = htons(skb->len + sizeof(struct udphdr)); in udp_uncompress() 97 uh.len = htons(skb->len + sizeof(struct udphdr)); in udp_uncompress() 109 skb_push(skb, sizeof(struct udphdr)); in udp_uncompress() 110 skb_copy_to_linear_data(skb, &uh, sizeof(struct udphdr)); in udp_uncompress() 117 const struct udphdr *uh = udp_hdr(skb); in udp_compress() 171 LOWPAN_NHC(nhc_udp, "RFC6282 UDP", NEXTHDR_UDP, sizeof(struct udphdr),
|
/kernel/liteos_m/components/net/test/ |
H A D | net_socket_test_011.c | 146 struct udp_hdr *udphdr;
in ReplayUdp() local 162 udphdr = (struct udp_hdr *)p->payload;
in ReplayUdp() 163 udphdr->src = lwip_htons(STACK_PORT);
in ReplayUdp() 164 udphdr->dest = lwip_htons(STACK_PORT);
in ReplayUdp() 165 udphdr->len = lwip_htons(p->tot_len);
in ReplayUdp() 173 udphdr->chksum = udpchksum;
in ReplayUdp() 174 udphdr->chksum = 0;
in ReplayUdp() 200 struct udp_hdr *udphdr;
in ParsePackageIpUdp() local 201 udphdr = (struct udp_hdr *)((u8_t *)iphdr + IPH_HL_BYTES(iphdr));
in ParsePackageIpUdp() 202 scr_port = udphdr in ParsePackageIpUdp() [all...] |
/kernel/linux/linux-5.10/net/ipv4/netfilter/ |
H A D | nf_nat_snmp_basic_main.c | 129 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()
|
/kernel/linux/linux-6.6/net/ipv4/netfilter/ |
H A D | nf_nat_snmp_basic_main.c | 129 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()
|
/kernel/linux/linux-5.10/net/core/ |
H A D | tso.c | 35 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()
|
/kernel/linux/linux-6.6/net/core/ |
H A D | tso.c | 27 if (tso->tlen != sizeof(struct udphdr)) { in tso_build_hdr() 39 struct udphdr *uh = (struct udphdr *)hdr; in tso_build_hdr() 66 int tlen = skb_is_gso_tcp(skb) ? tcp_hdrlen(skb) : sizeof(struct udphdr); in tso_start() 71 tso->tcp_seq = (tlen != sizeof(struct udphdr)) ? ntohl(tcp_hdr(skb)->seq) : 0; in tso_start()
|
/kernel/linux/linux-5.10/lib/ |
H A D | test_blackhole_dev.c | 33 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()
|
/kernel/linux/linux-6.6/lib/ |
H A D | test_blackhole_dev.c | 32 struct udphdr *uh; in test_blackholedev_init() 49 uh = (struct udphdr *)skb_push(skb, sizeof(struct udphdr)); in test_blackholedev_init() 58 ip6h->payload_len = data_len + sizeof(struct udphdr); in test_blackholedev_init()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
H A D | test_select_reuseport_kern.c | 129 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()
|
/kernel/linux/linux-5.10/drivers/infiniband/core/ |
H A D | lag.c | 19 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()
|
/kernel/linux/linux-6.6/drivers/infiniband/core/ |
H A D | lag.c | 18 struct udphdr *uh; in rdma_build_skb() 24 hdr_len = ETH_HLEN + sizeof(struct udphdr) + LL_RESERVED_SPACE(netdev); in rdma_build_skb() 33 skb_push(skb, sizeof(struct udphdr)); in rdma_build_skb() 39 uh->len = htons(sizeof(struct udphdr)); in rdma_build_skb() 49 iph->tot_len = htons(sizeof(struct udphdr) + sizeof(struct in rdma_build_skb()
|
/kernel/linux/linux-6.6/drivers/infiniband/sw/rxe/ |
H A D | rxe_icrc.c | 77 struct udphdr *udph; in rxe_icrc_hdr() 81 int hdr_size = sizeof(struct udphdr) + in rxe_icrc_hdr() 87 u8 pshdr[sizeof(struct udphdr) + in rxe_icrc_hdr() 99 udph = (struct udphdr *)(ip4h + 1); in rxe_icrc_hdr() 107 udph = (struct udphdr *)(ip6h + 1); in rxe_icrc_hdr()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/progs/ |
H A D | test_select_reuseport_kern.c | 127 struct udphdr *uh = data; in _select_by_skb_data() 135 if (sizeof(struct udphdr) + sizeof(*cmd) > data_check.len) in _select_by_skb_data() 137 if (data + sizeof(struct udphdr) + sizeof(*cmd) > data_end) { in _select_by_skb_data() 138 if (bpf_skb_load_bytes(reuse_md, sizeof(struct udphdr), in _select_by_skb_data() 143 cmd = data + sizeof(struct udphdr); in _select_by_skb_data()
|
/kernel/linux/linux-5.10/net/ipv6/ |
H A D | xfrm6_input.c | 80 struct udphdr *uh; in xfrm6_udp_encap_rcv() 98 len = skb->len - sizeof(struct udphdr); in xfrm6_udp_encap_rcv() 99 if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) in xfrm6_udp_encap_rcv() 104 udpdata = (__u8 *)uh + sizeof(struct udphdr); in xfrm6_udp_encap_rcv() 115 len = sizeof(struct udphdr); in xfrm6_udp_encap_rcv() 128 len = sizeof(struct udphdr) + 2 * sizeof(u32); in xfrm6_udp_encap_rcv()
|
/kernel/linux/linux-6.6/net/ipv6/ |
H A D | xfrm6_input.c | 80 struct udphdr *uh; in xfrm6_udp_encap_rcv() 98 len = skb->len - sizeof(struct udphdr); in xfrm6_udp_encap_rcv() 99 if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) in xfrm6_udp_encap_rcv() 104 udpdata = (__u8 *)uh + sizeof(struct udphdr); in xfrm6_udp_encap_rcv() 115 len = sizeof(struct udphdr); in xfrm6_udp_encap_rcv() 128 len = sizeof(struct udphdr) + 2 * sizeof(u32); in xfrm6_udp_encap_rcv()
|
/kernel/linux/linux-6.6/net/batman-adv/ |
H A D | gateway_client.c | 569 struct udphdr *udphdr; in batadv_gw_dhcp_recipient_get() local 623 if (!pskb_may_pull(skb, *header_len + sizeof(*udphdr))) in batadv_gw_dhcp_recipient_get() 626 udphdr = (struct udphdr *)(skb->data + *header_len); in batadv_gw_dhcp_recipient_get() 627 *header_len += sizeof(*udphdr); in batadv_gw_dhcp_recipient_get() 632 if (udphdr->dest == htons(67)) in batadv_gw_dhcp_recipient_get() 634 else if (udphdr->source == htons(67)) in batadv_gw_dhcp_recipient_get() 638 if (udphdr->dest == htons(547)) in batadv_gw_dhcp_recipient_get() 640 else if (udphdr in batadv_gw_dhcp_recipient_get() [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | udp.h | 21 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()
|