/linux-6.12.1/tools/testing/selftests/net/ |
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 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 …]
|
D | tap.c | 272 htons(sizeof(*iph) + sizeof(struct udphdr) + payload_len); in build_ipv4_header() 285 struct udphdr *udph = (struct udphdr *)buf; in build_udp_packet() 293 memset(buf + sizeof(struct udphdr), PKT_DATA, payload_len); in build_udp_packet() 311 vh->hdr_len = ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr); in build_test_packet_valid_udp_gso() 314 vh->csum_offset = __builtin_offsetof(struct udphdr, check); in build_test_packet_valid_udp_gso() 348 vh->hdr_len = ETH_HLEN + sizeof(struct iphdr) + sizeof(struct udphdr); in build_test_packet_crash_tap_invalid_eth_proto() 355 cur += sizeof(struct iphdr) + sizeof(struct udphdr); in build_test_packet_crash_tap_invalid_eth_proto()
|
D | psock_snd.c | 80 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-6.12.1/net/ipv4/ |
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() 306 gso_skb->csum_offset = offsetof(struct udphdr, check); in __udp_gso_segment() 419 struct udphdr *uh; in udp4_ufo_fragment() 432 if (!pskb_may_pull(skb, sizeof(struct udphdr))) in udp4_ufo_fragment() 478 struct udphdr *uh = udp_gro_udphdr(skb); in udp_gro_receive_segment() [all …]
|
D | xfrm4_input.c | 84 struct udphdr *uh; in __xfrm4_udp_encap_rcv() 98 len = skb->len - sizeof(struct udphdr); in __xfrm4_udp_encap_rcv() 99 if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) in __xfrm4_udp_encap_rcv() 104 udpdata = (__u8 *)uh + sizeof(struct udphdr); in __xfrm4_udp_encap_rcv() 115 len = sizeof(struct udphdr); in __xfrm4_udp_encap_rcv() 187 offset = offset - sizeof(struct udphdr); in xfrm4_gro_udp_encap_rcv()
|
/linux-6.12.1/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ |
D | en_accel.h | 104 int payload_len = skb_shinfo(skb)->gso_size + sizeof(struct udphdr); in mlx5e_udp_gso_handle_tx_skb() 105 struct udphdr *udphdr; in mlx5e_udp_gso_handle_tx_skb() local 108 udphdr = (struct udphdr *)skb_inner_transport_header(skb); in mlx5e_udp_gso_handle_tx_skb() 110 udphdr = udp_hdr(skb); in mlx5e_udp_gso_handle_tx_skb() 112 udphdr->len = htons(payload_len); in mlx5e_udp_gso_handle_tx_skb()
|
/linux-6.12.1/net/6lowpan/ |
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),
|
/linux-6.12.1/net/ipv4/netfilter/ |
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()
|
/linux-6.12.1/lib/ |
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()
|
/linux-6.12.1/net/core/ |
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()
|
/linux-6.12.1/drivers/infiniband/core/ |
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()
|
/linux-6.12.1/drivers/infiniband/sw/rxe/ |
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()
|
/linux-6.12.1/tools/testing/selftests/bpf/progs/ |
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()
|
D | test_assign_reuse.c | 21 struct udphdr udp; 94 maybe_assign_udp(struct __sk_buff *skb, struct udphdr *uh) in maybe_assign_udp() 126 return maybe_assign_udp(skb, (struct udphdr *)(iph + 1)); in tc_main() 138 return maybe_assign_udp(skb, (struct udphdr *)(ip6h + 1)); in tc_main()
|
D | xdp_features.c | 71 struct udphdr *uh; in xdp_process_echo_packet() 97 uh = (struct udphdr *)(ih + 1); in xdp_process_echo_packet() 115 uh = (struct udphdr *)(ih6 + 1); in xdp_process_echo_packet() 120 if (uh + 1 > (struct udphdr *)data_end) in xdp_process_echo_packet()
|
/linux-6.12.1/include/net/ |
D | pfcp.h | 31 #define PFCP_HLEN (sizeof(struct udphdr) + sizeof(struct pfcphdr)) 64 #define PFCP_HEADROOM (sizeof(struct iphdr) + sizeof(struct udphdr) + \ 66 #define PFCP6_HEADROOM (sizeof(struct ipv6hdr) + sizeof(struct udphdr) + \
|
/linux-6.12.1/drivers/net/ethernet/mellanox/mlx5/core/ |
D | en_selftest.c | 77 sizeof(struct udphdr) + sizeof(struct mlx5ehdr)) 85 struct udphdr *udph; in mlx5e_test_get_udp_skb() 106 udph = skb_put(skb, sizeof(struct udphdr)); in mlx5e_test_get_udp_skb() 116 udph->len = htons(sizeof(struct mlx5ehdr) + sizeof(struct udphdr)); in mlx5e_test_get_udp_skb() 124 iplen = sizeof(struct iphdr) + sizeof(struct udphdr) + in mlx5e_test_get_udp_skb() 166 struct udphdr *udph; in mlx5e_test_loopback_validate() 182 udph = (struct udphdr *)((u8 *)iph + 4 * iph->ihl); in mlx5e_test_loopback_validate()
|
/linux-6.12.1/net/ipv6/ |
D | xfrm6_input.c | 79 struct udphdr *uh; in __xfrm6_udp_encap_rcv() 94 len = skb->len - sizeof(struct udphdr); in __xfrm6_udp_encap_rcv() 95 if (!pskb_may_pull(skb, sizeof(struct udphdr) + min(len, 8))) in __xfrm6_udp_encap_rcv() 100 udpdata = (__u8 *)uh + sizeof(struct udphdr); in __xfrm6_udp_encap_rcv() 111 len = sizeof(struct udphdr); in __xfrm6_udp_encap_rcv() 187 offset = offset - sizeof(struct udphdr); in xfrm6_gro_udp_encap_rcv()
|
D | udp_offload.c | 38 struct udphdr *uh; in udp6_ufo_fragment() 43 if (!pskb_may_pull(skb, sizeof(struct udphdr))) in udp6_ufo_fragment() 133 struct udphdr *uh = udp_gro_udphdr(skb); in udp6_gro_receive() 169 struct udphdr *uh = (struct udphdr *)(skb->data + nhoff); in udp6_gro_complete()
|
D | udp.c | 191 result = inet6_lookup_reuseport(net, sk, skb, sizeof(struct udphdr), in udp6_lib_lookup2() 245 sk = inet6_lookup_run_sk_lookup(net, IPPROTO_UDP, skb, sizeof(struct udphdr), in __udp6_lib_lookup() 436 sizeof(struct udphdr), off); in udpv6_recvmsg() 514 struct udphdr *uh, in __udp6_lib_err_encap() 575 struct udphdr *uh = (struct udphdr *)(skb->data+offset); in __udp6_lib_err() 761 if (sk_filter_trim_cap(sk, skb, sizeof(struct udphdr))) { in udpv6_queue_rcv_one_skb() 847 const struct udphdr *uh = udp_hdr(skb); in __udp6_lib_mcast_deliver() 921 struct udphdr *uh) in udp6_unicast_rcv_skb() 943 struct udphdr *uh; in __udp6_lib_rcv() 947 if (!pskb_may_pull(skb, sizeof(struct udphdr))) in __udp6_lib_rcv() [all …]
|
/linux-6.12.1/net/batman-adv/ |
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->source == htons(547)) in batadv_gw_dhcp_recipient_get()
|
/linux-6.12.1/arch/powerpc/platforms/ps3/ |
D | gelic_udbg.c | 64 static __iomem struct udphdr *h_udp; 177 header_size += sizeof(struct udphdr); in gelic_debug_init() 178 h_udp = (struct udphdr *)(h_ip + 1); in gelic_debug_init() 200 h_ip->tot_len = msgsize + sizeof(struct udphdr) + in gelic_sendbuf() 202 h_udp->len = msgsize + sizeof(struct udphdr); in gelic_sendbuf()
|
/linux-6.12.1/include/net/netfilter/ |
D | nf_reject.h | 17 const struct udphdr *udp_hdr; in nf_reject_verify_csum() 18 struct udphdr _udp_hdr; in nf_reject_verify_csum()
|
/linux-6.12.1/include/linux/ |
D | ptp_classify.h | 171 struct udphdr *uhdr; in ptp_header_update_correction() 183 uhdr = (struct udphdr *)((char *)hdr - sizeof(struct udphdr)); in ptp_header_update_correction()
|
/linux-6.12.1/drivers/net/ethernet/mellanox/mlx5/core/en/ |
D | tc_tun_mplsoudp.c | 15 return sizeof(struct udphdr) + MPLS_HLEN; in calc_hlen() 34 struct udphdr *udp = (struct udphdr *)(buf); in generate_ip_tun_hdr()
|