Home
last modified time | relevance | path

Searched refs:uh (Results 1 – 25 of 47) sorted by relevance

12

/kernel/linux/linux-5.10/net/6lowpan/
Dnhc_udp.c40 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/
Dudp_offload.c23 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 …]
Dudp.c642 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 …]
Dudp_tunnel_core.c176 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()
Dxfrm4_input.c85 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/
Dudp_offload.c40 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 …]
Dip6_checksum.c65 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 …]
Dudp.c506 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 …]
Dip6_udp_tunnel.c83 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()
Dfou6.c24 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()
Desp6.c268 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/
Dusnjrnl.c39 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/
Dtest_blackhole_dev.c33 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/
Dip_set_getport.c56 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/
Dila_common.c94 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/
Dnf_log_common.c25 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()
Dxt_tcpudp.c131 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/
Dlag.c19 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/
Dlsm_audit.c70 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/
Dactions.c357 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/
Dtest_select_reuseport_kern.c129 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/
Dip_vs_proto_udp.c37 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/
Dudplite.h38 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/
Dtso.c47 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/
Dcxgb4_ptp.c60 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()

12