Home
last modified time | relevance | path

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

/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 …]
/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()
117 uh = udp_hdr(skb); in __skb_udp_tunnel_segment()
124 uh->len = htons(skb_shinfo(skb)->gso_size + in __skb_udp_tunnel_segment()
126 skb->head - (unsigned char *)uh); in __skb_udp_tunnel_segment()
128 uh->len = htons(len); in __skb_udp_tunnel_segment()
134 uh->check = ~csum_fold(csum_add(partial, in __skb_udp_tunnel_segment()
138 uh->check = gso_make_checksum(skb, ~uh->check); in __skb_udp_tunnel_segment()
139 if (uh->check == 0) in __skb_udp_tunnel_segment()
[all …]
Dudp.c657 struct udphdr *uh, in __udp4_lib_err_encap() argument
685 sk = __udp4_lib_lookup(net, iph->daddr, uh->source, in __udp4_lib_err_encap()
686 iph->saddr, uh->dest, skb->dev->ifindex, 0, in __udp4_lib_err_encap()
721 struct udphdr *uh = (struct udphdr *)(skb->data+(iph->ihl<<2)); in __udp4_lib_err() local
730 sk = __udp4_lib_lookup(net, iph->daddr, uh->dest, in __udp4_lib_err()
731 iph->saddr, uh->source, skb->dev->ifindex, in __udp4_lib_err()
737 sk = __udp4_lib_err_encap(net, iph, uh, udptable, sk, skb, in __udp4_lib_err()
802 ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1)); in __udp4_lib_err()
839 struct udphdr *uh = udp_hdr(skb); in udp4_hwcsum() local
851 uh->check = ~csum_tcpudp_magic(src, dst, len, in udp4_hwcsum()
[all …]
Dudp_tunnel_core.c161 struct udphdr *uh; in udp_tunnel_xmit_skb() local
163 __skb_push(skb, sizeof(*uh)); in udp_tunnel_xmit_skb()
165 uh = udp_hdr(skb); in udp_tunnel_xmit_skb()
167 uh->dest = dst_port; in udp_tunnel_xmit_skb()
168 uh->source = src_port; in udp_tunnel_xmit_skb()
169 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()
Desp4.c348 struct udphdr *uh; in esp_output_udp_encap() local
356 uh = (struct udphdr *)esp->esph; in esp_output_udp_encap()
357 uh->source = sport; in esp_output_udp_encap()
358 uh->dest = dport; in esp_output_udp_encap()
359 uh->len = htons(len); in esp_output_udp_encap()
360 uh->check = 0; in esp_output_udp_encap()
365 udpdata32 = (__be32 *)(uh + 1); in esp_output_udp_encap()
370 return (struct ip_esp_hdr *)(uh + 1); in esp_output_udp_encap()
777 struct udphdr *uh = (void *)(skb_network_header(skb) + ihl); in esp_input_done2() local
786 source = uh->source; in esp_input_done2()
Dfou.c1065 struct udphdr *uh; in fou_build_udp() local
1070 uh = udp_hdr(skb); in fou_build_udp()
1072 uh->dest = e->dport; in fou_build_udp()
1073 uh->source = sport; in fou_build_udp()
1074 uh->len = htons(skb->len); in fou_build_udp()
/net/ipv6/
Dudp_offload.c36 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.c527 struct udphdr *uh, in __udp6_lib_err_encap() argument
557 sk = __udp6_lib_lookup(net, &hdr->daddr, uh->source, in __udp6_lib_err_encap()
558 &hdr->saddr, uh->dest, in __udp6_lib_err_encap()
588 struct udphdr *uh = (struct udphdr *)(skb->data+offset); in __udp6_lib_err() local
595 sk = __udp6_lib_lookup(net, daddr, uh->dest, saddr, uh->source, in __udp6_lib_err()
601 sk = __udp6_lib_err_encap(net, hdr, offset, uh, in __udp6_lib_err()
649 ipv6_icmp_error(sk, skb, err, uh->dest, ntohl(info), (u8 *)(uh+1)); in __udp6_lib_err()
844 const struct udphdr *uh = udp_hdr(skb); in __udp6_lib_mcast_deliver() local
845 unsigned short hnum = ntohs(uh->dest); in __udp6_lib_mcast_deliver()
864 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 …]
Dxfrm6_input.c80 struct udphdr *uh; in xfrm6_udp_encap_rcv() local
103 uh = udp_hdr(skb); in xfrm6_udp_encap_rcv()
104 udpdata = (__u8 *)uh + sizeof(struct udphdr); in xfrm6_udp_encap_rcv()
/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()
/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()
/net/openvswitch/
Dactions.c358 struct udphdr *uh = udp_hdr(skb); in update_ip_l4_checksum() local
360 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ip_l4_checksum()
361 inet_proto_csum_replace4(&uh->check, skb, in update_ip_l4_checksum()
363 if (!uh->check) in update_ip_l4_checksum()
364 uh->check = CSUM_MANGLED_0; in update_ip_l4_checksum()
391 struct udphdr *uh = udp_hdr(skb); in update_ipv6_checksum() local
393 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ipv6_checksum()
394 inet_proto_csum_replace16(&uh->check, skb, in update_ipv6_checksum()
396 if (!uh->check) in update_ipv6_checksum()
397 uh->check = CSUM_MANGLED_0; in update_ipv6_checksum()
[all …]
/net/netfilter/
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()
Dnf_log_syslog.c264 const struct udphdr *uh; in nf_log_dump_udp_header() local
276 uh = skb_header_pointer(skb, offset, sizeof(_udph), &_udph); in nf_log_dump_udp_header()
277 if (!uh) { in nf_log_dump_udp_header()
285 ntohs(uh->source), ntohs(uh->dest), ntohs(uh->len)); in nf_log_dump_udp_header()
Dnft_payload.c537 struct udphdr *uh, _uh; in nft_payload_udp_checksum() local
539 uh = skb_header_pointer(skb, thoff, sizeof(_uh), &_uh); in nft_payload_udp_checksum()
540 if (!uh) in nft_payload_udp_checksum()
543 return (__force bool)uh->check; in nft_payload_udp_checksum()
Dnf_nat_sip.c283 struct udphdr *uh; in nf_nat_sip() local
290 uh = (void *)skb->data + protoff; in nf_nat_sip()
291 uh->dest = ct_sip_info->forced_dport; in nf_nat_sip()
Dnf_conntrack_h323_main.c1212 const struct udphdr *uh; in get_udp_data() local
1216 uh = skb_header_pointer(skb, protoff, sizeof(_uh), &_uh); in get_udp_data()
1217 if (uh == NULL) in get_udp_data()
/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()
/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()
/net/l2tp/
Dl2tp_core.c1020 struct udphdr *uh; in l2tp_xmit_core() local
1026 uhlen = (tunnel->encap == L2TP_ENCAPTYPE_UDP) ? sizeof(*uh) : 0; in l2tp_xmit_core()
1069 __skb_push(skb, sizeof(*uh)); in l2tp_xmit_core()
1071 uh = udp_hdr(skb); in l2tp_xmit_core()
1072 uh->source = inet->inet_sport; in l2tp_xmit_core()
1073 uh->dest = inet->inet_dport; in l2tp_xmit_core()
1075 uh->len = htons(udp_len); in l2tp_xmit_core()