/kernel/linux/linux-5.10/net/6lowpan/ |
D | nhc_udp.c | 40 struct udphdr uh; in udp_uncompress() local 49 fail |= lowpan_fetch_skb(skb, &uh.source, sizeof(uh.source)); in udp_uncompress() 50 fail |= lowpan_fetch_skb(skb, &uh.dest, sizeof(uh.dest)); in udp_uncompress() 53 fail |= lowpan_fetch_skb(skb, &uh.source, sizeof(uh.source)); in udp_uncompress() 55 uh.dest = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); in udp_uncompress() 59 uh.source = htons(val + LOWPAN_NHC_UDP_8BIT_PORT); in udp_uncompress() 60 fail |= lowpan_fetch_skb(skb, &uh.dest, sizeof(uh.dest)); in udp_uncompress() 64 uh.source = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val >> 4)); in udp_uncompress() 65 uh.dest = htons(LOWPAN_NHC_UDP_4BIT_PORT + (val & 0x0f)); in udp_uncompress() 72 ntohs(uh.source), ntohs(uh.dest)); in udp_uncompress() [all …]
|
/kernel/linux/linux-5.10/net/ipv4/ |
D | udp_offload.c | 23 struct udphdr *uh = udp_hdr(skb); in __skb_udp_tunnel_segment() local 41 partial = (__force __wsum)uh->len; in __skb_udp_tunnel_segment() 44 partial = csum_sub(csum_unfold(uh->check), partial); in __skb_udp_tunnel_segment() 114 uh = udp_hdr(skb); in __skb_udp_tunnel_segment() 121 uh->len = htons(skb_shinfo(skb)->gso_size + in __skb_udp_tunnel_segment() 123 skb->head - (unsigned char *)uh); in __skb_udp_tunnel_segment() 125 uh->len = htons(len); in __skb_udp_tunnel_segment() 131 uh->check = ~csum_fold(csum_add(partial, in __skb_udp_tunnel_segment() 135 uh->check = gso_make_checksum(skb, ~uh->check); in __skb_udp_tunnel_segment() 136 if (uh->check == 0) in __skb_udp_tunnel_segment() [all …]
|
D | udp.c | 642 struct udphdr *uh, in __udp4_lib_err_encap() argument 658 sk = __udp4_lib_lookup(net, iph->daddr, uh->source, in __udp4_lib_err_encap() 659 iph->saddr, uh->dest, skb->dev->ifindex, 0, in __udp4_lib_err_encap() 694 struct udphdr *uh = (struct udphdr *)(skb->data+(iph->ihl<<2)); in __udp4_lib_err() local 703 sk = __udp4_lib_lookup(net, iph->daddr, uh->dest, in __udp4_lib_err() 704 iph->saddr, uh->source, skb->dev->ifindex, in __udp4_lib_err() 710 sk = __udp4_lib_err_encap(net, iph, uh, udptable, skb, in __udp4_lib_err() 772 ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1)); in __udp4_lib_err() 809 struct udphdr *uh = udp_hdr(skb); in udp4_hwcsum() local 821 uh->check = ~csum_tcpudp_magic(src, dst, len, in udp4_hwcsum() [all …]
|
D | udp_tunnel_core.c | 176 struct udphdr *uh; in udp_tunnel_xmit_skb() local 178 __skb_push(skb, sizeof(*uh)); in udp_tunnel_xmit_skb() 180 uh = udp_hdr(skb); in udp_tunnel_xmit_skb() 182 uh->dest = dst_port; in udp_tunnel_xmit_skb() 183 uh->source = src_port; in udp_tunnel_xmit_skb() 184 uh->len = htons(skb->len); in udp_tunnel_xmit_skb()
|
D | xfrm4_input.c | 85 struct udphdr *uh; in xfrm4_udp_encap_rcv() local 104 uh = udp_hdr(skb); in xfrm4_udp_encap_rcv() 105 udpdata = (__u8 *)uh + sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
|
/kernel/linux/linux-5.10/net/ipv6/ |
D | udp_offload.c | 40 struct udphdr *uh; in udp6_ufo_fragment() local 55 uh = udp_hdr(skb); in udp6_ufo_fragment() 58 uh->check = 0; in udp6_ufo_fragment() 60 uh->check = udp_v6_check(skb->len, &ipv6h->saddr, in udp6_ufo_fragment() 62 if (uh->check == 0) in udp6_ufo_fragment() 63 uh->check = CSUM_MANGLED_0; in udp6_ufo_fragment() 127 struct udphdr *uh = udp_gro_udphdr(skb); in udp6_gro_receive() local 131 if (unlikely(!uh)) in udp6_gro_receive() 138 if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check, in udp6_gro_receive() 141 else if (uh->check) in udp6_gro_receive() [all …]
|
D | ip6_checksum.c | 65 int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh, int proto) in udp6_csum_init() argument 73 err = udplite_checksum_init(skb, uh); in udp6_csum_init() 91 err = (__force int)skb_checksum_init_zero_check(skb, proto, uh->check, in udp6_csum_init() 119 struct udphdr *uh = udp_hdr(skb); in udp6_set_csum() local 122 uh->check = 0; in udp6_set_csum() 124 uh->check = ~udp_v6_check(len, saddr, daddr, 0); in udp6_set_csum() 126 uh->check = 0; in udp6_set_csum() 127 uh->check = udp_v6_check(len, saddr, daddr, lco_csum(skb)); in udp6_set_csum() 128 if (uh->check == 0) in udp6_set_csum() 129 uh->check = CSUM_MANGLED_0; in udp6_set_csum() [all …]
|
D | udp.c | 506 struct udphdr *uh, in __udp6_lib_err_encap() argument 524 sk = __udp6_lib_lookup(net, &hdr->daddr, uh->source, in __udp6_lib_err_encap() 525 &hdr->saddr, uh->dest, in __udp6_lib_err_encap() 555 struct udphdr *uh = (struct udphdr *)(skb->data+offset); in __udp6_lib_err() local 562 sk = __udp6_lib_lookup(net, daddr, uh->dest, saddr, uh->source, in __udp6_lib_err() 568 sk = __udp6_lib_err_encap(net, hdr, offset, uh, in __udp6_lib_err() 612 ipv6_icmp_error(sk, skb, err, uh->dest, ntohl(info), (u8 *)(uh+1)); in __udp6_lib_err() 803 const struct udphdr *uh = udp_hdr(skb); in __udp6_lib_mcast_deliver() local 804 unsigned short hnum = ntohs(uh->dest); in __udp6_lib_mcast_deliver() 823 if (!__udp_v6_is_mcast_sock(net, sk, uh->dest, daddr, in __udp6_lib_mcast_deliver() [all …]
|
D | ip6_udp_tunnel.c | 83 struct udphdr *uh; in udp_tunnel6_xmit_skb() local 86 __skb_push(skb, sizeof(*uh)); in udp_tunnel6_xmit_skb() 88 uh = udp_hdr(skb); in udp_tunnel6_xmit_skb() 90 uh->dest = dst_port; in udp_tunnel6_xmit_skb() 91 uh->source = src_port; in udp_tunnel6_xmit_skb() 93 uh->len = htons(skb->len); in udp_tunnel6_xmit_skb()
|
D | fou6.c | 24 struct udphdr *uh; in fou6_build_udp() local 29 uh = udp_hdr(skb); in fou6_build_udp() 31 uh->dest = e->dport; in fou6_build_udp() 32 uh->source = sport; in fou6_build_udp() 33 uh->len = htons(skb->len); in fou6_build_udp()
|
D | esp6.c | 268 struct udphdr *uh = udp_hdr(skb); in esp_output_encap_csum() local 270 int len = ntohs(uh->len); in esp_output_encap_csum() 274 uh->check = csum_ipv6_magic(&ip6h->saddr, &ip6h->daddr, in esp_output_encap_csum() 276 if (uh->check == 0) in esp_output_encap_csum() 277 uh->check = CSUM_MANGLED_0; in esp_output_encap_csum() 385 struct udphdr *uh; in esp6_output_udp_encap() local 393 uh = (struct udphdr *)esp->esph; in esp6_output_udp_encap() 394 uh->source = sport; in esp6_output_udp_encap() 395 uh->dest = dport; in esp6_output_udp_encap() 396 uh->len = htons(len); in esp6_output_udp_encap() [all …]
|
/kernel/linux/linux-5.10/fs/ntfs/ |
D | usnjrnl.c | 39 USN_HEADER *uh; in ntfs_stamp_usnjrnl() local 47 uh = (USN_HEADER*)page_address(page); in ntfs_stamp_usnjrnl() 53 (long long)sle64_to_cpu(uh->journal_id), in ntfs_stamp_usnjrnl() 54 (long long)sle64_to_cpu(uh->lowest_valid_usn), in ntfs_stamp_usnjrnl() 57 uh->lowest_valid_usn = in ntfs_stamp_usnjrnl() 59 uh->journal_id = stamp; in ntfs_stamp_usnjrnl()
|
/kernel/linux/linux-5.10/lib/ |
D | test_blackhole_dev.c | 33 struct udphdr *uh; in test_blackholedev_init() local 50 uh = (struct udphdr *)skb_push(skb, sizeof(struct udphdr)); in test_blackholedev_init() 52 uh->source = uh->dest = htons(UDP_PORT); in test_blackholedev_init() 53 uh->len = htons(data_len); in test_blackholedev_init() 54 uh->check = 0; in test_blackholedev_init()
|
/kernel/linux/linux-5.10/net/netfilter/ipset/ |
D | ip_set_getport.c | 56 const struct udphdr *uh; in get_port() local 58 uh = skb_header_pointer(skb, protooff, sizeof(_udph), &_udph); in get_port() 59 if (!uh) in get_port() 63 *port = src ? uh->source : uh->dest; in get_port()
|
/kernel/linux/linux-5.10/net/ipv6/ila/ |
D | ila_common.c | 94 struct udphdr *uh = (struct udphdr *) in ila_csum_adjust_transport() local 97 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in ila_csum_adjust_transport() 99 inet_proto_csum_replace_by_diff(&uh->check, skb, in ila_csum_adjust_transport() 101 if (!uh->check) in ila_csum_adjust_transport() 102 uh->check = CSUM_MANGLED_0; in ila_csum_adjust_transport()
|
/kernel/linux/linux-5.10/net/netfilter/ |
D | nf_log_common.c | 25 const struct udphdr *uh; in nf_log_dump_udp_header() local 37 uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph); in nf_log_dump_udp_header() 38 if (uh == NULL) { in nf_log_dump_udp_header() 46 ntohs(uh->source), ntohs(uh->dest), ntohs(uh->len)); in nf_log_dump_udp_header()
|
D | xt_tcpudp.c | 131 const struct udphdr *uh; in udp_mt() local 139 uh = skb_header_pointer(skb, par->thoff, sizeof(_udph), &_udph); in udp_mt() 140 if (uh == NULL) { in udp_mt() 149 ntohs(uh->source), in udp_mt() 152 ntohs(uh->dest), in udp_mt()
|
/kernel/linux/linux-5.10/drivers/infiniband/core/ |
D | lag.c | 19 struct udphdr *uh; in rdma_build_skb() local 36 uh = udp_hdr(skb); in rdma_build_skb() 37 uh->source = in rdma_build_skb() 39 uh->dest = htons(ROCE_V2_UDP_DPORT); in rdma_build_skb() 40 uh->len = htons(sizeof(struct udphdr)); in rdma_build_skb()
|
/kernel/linux/linux-5.10/security/ |
D | lsm_audit.c | 70 struct udphdr *uh = udp_hdr(skb); in ipv4_skb_to_auditdata() local 71 if (uh == NULL) in ipv4_skb_to_auditdata() 74 ad->u.net->sport = uh->source; in ipv4_skb_to_auditdata() 75 ad->u.net->dport = uh->dest; in ipv4_skb_to_auditdata() 146 struct udphdr _udph, *uh; in ipv6_skb_to_auditdata() local 148 uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph); in ipv6_skb_to_auditdata() 149 if (uh == NULL) in ipv6_skb_to_auditdata() 152 ad->u.net->sport = uh->source; in ipv6_skb_to_auditdata() 153 ad->u.net->dport = uh->dest; in ipv6_skb_to_auditdata()
|
/kernel/linux/linux-5.10/net/openvswitch/ |
D | actions.c | 357 struct udphdr *uh = udp_hdr(skb); in update_ip_l4_checksum() local 359 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ip_l4_checksum() 360 inet_proto_csum_replace4(&uh->check, skb, in update_ip_l4_checksum() 362 if (!uh->check) in update_ip_l4_checksum() 363 uh->check = CSUM_MANGLED_0; in update_ip_l4_checksum() 389 struct udphdr *uh = udp_hdr(skb); in update_ipv6_checksum() local 391 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ipv6_checksum() 392 inet_proto_csum_replace16(&uh->check, skb, in update_ipv6_checksum() 394 if (!uh->check) in update_ipv6_checksum() 395 uh->check = CSUM_MANGLED_0; in update_ipv6_checksum() [all …]
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/progs/ |
D | test_select_reuseport_kern.c | 129 struct udphdr *uh = data; in _select_by_skb_data() local 131 if (uh + 1 > data_end) in _select_by_skb_data() 134 data_check.skb_ports[0] = uh->source; in _select_by_skb_data() 135 data_check.skb_ports[1] = uh->dest; in _select_by_skb_data()
|
/kernel/linux/linux-5.10/net/netfilter/ipvs/ |
D | ip_vs_proto_udp.c | 37 struct udphdr _udph, *uh; in udp_conn_schedule() local 42 uh = skb_header_pointer(skb, iph->len, sizeof(_udph), &_udph); in udp_conn_schedule() 43 if (uh) in udp_conn_schedule() 44 ports = &uh->source; in udp_conn_schedule() 302 struct udphdr _udph, *uh; in udp_csum_check() local 312 uh = skb_header_pointer(skb, udphoff, sizeof(_udph), &_udph); in udp_csum_check() 313 if (uh == NULL) in udp_csum_check() 316 if (uh->check != 0) { in udp_csum_check()
|
/kernel/linux/linux-5.10/include/net/ |
D | udplite.h | 38 static inline int udplite_checksum_init(struct sk_buff *skb, struct udphdr *uh) in udplite_checksum_init() argument 45 if (uh->check == 0) { in udplite_checksum_init() 50 cscov = ntohs(uh->len); in udplite_checksum_init()
|
/kernel/linux/linux-5.10/net/core/ |
D | tso.c | 47 struct udphdr *uh = (struct udphdr *)hdr; in tso_build_hdr() local 49 uh->len = htons(sizeof(*uh) + size); in tso_build_hdr()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/chelsio/cxgb4/ |
D | cxgb4_ptp.c | 60 struct udphdr *uh; in cxgb4_ptp_is_ptp_tx() local 62 uh = udp_hdr(skb); in cxgb4_ptp_is_ptp_tx() 67 uh->dest == htons(PTP_EVENT_PORT); in cxgb4_ptp_is_ptp_tx() 86 struct udphdr *uh = (struct udphdr *)(skb->data + ETH_HLEN + in cxgb4_ptp_is_ptp_rx() local 89 return uh->dest == htons(PTP_EVENT_PORT) && in cxgb4_ptp_is_ptp_rx() 90 uh->source == htons(PTP_EVENT_PORT); in cxgb4_ptp_is_ptp_rx()
|