Home
last modified time | relevance | path

Searched refs:uh (Results 1 – 22 of 22) 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()
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.c594 struct udphdr *uh, in __udp4_lib_err_encap() argument
610 sk = __udp4_lib_lookup(net, iph->daddr, uh->source, in __udp4_lib_err_encap()
611 iph->saddr, uh->dest, skb->dev->ifindex, 0, in __udp4_lib_err_encap()
646 struct udphdr *uh = (struct udphdr *)(skb->data+(iph->ihl<<2)); in __udp4_lib_err() local
655 sk = __udp4_lib_lookup(net, iph->daddr, uh->dest, in __udp4_lib_err()
656 iph->saddr, uh->source, skb->dev->ifindex, in __udp4_lib_err()
662 sk = __udp4_lib_err_encap(net, iph, uh, udptable, skb, in __udp4_lib_err()
724 ip_icmp_error(sk, skb, err, uh->dest, info, (u8 *)(uh+1)); in __udp4_lib_err()
761 struct udphdr *uh = udp_hdr(skb); in udp4_hwcsum() local
773 uh->check = ~csum_tcpudp_magic(src, dst, len, in udp4_hwcsum()
[all …]
Dudp_tunnel.c178 struct udphdr *uh; in udp_tunnel_xmit_skb() local
180 __skb_push(skb, sizeof(*uh)); in udp_tunnel_xmit_skb()
182 uh = udp_hdr(skb); in udp_tunnel_xmit_skb()
184 uh->dest = dst_port; in udp_tunnel_xmit_skb()
185 uh->source = src_port; in udp_tunnel_xmit_skb()
186 uh->len = htons(skb->len); in udp_tunnel_xmit_skb()
Dxfrm4_input.c90 struct udphdr *uh; in xfrm4_udp_encap_rcv() local
109 uh = udp_hdr(skb); in xfrm4_udp_encap_rcv()
110 udpdata = (__u8 *)uh + sizeof(struct udphdr); in xfrm4_udp_encap_rcv()
Desp4.c231 struct udphdr *uh; in esp_output_udp_encap() local
248 uh = (struct udphdr *)esph; in esp_output_udp_encap()
249 uh->source = sport; in esp_output_udp_encap()
250 uh->dest = dport; in esp_output_udp_encap()
251 uh->len = htons(len); in esp_output_udp_encap()
252 uh->check = 0; in esp_output_udp_encap()
257 esph = (struct ip_esp_hdr *)(uh + 1); in esp_output_udp_encap()
260 udpdata32 = (__be32 *)(uh + 1); in esp_output_udp_encap()
604 struct udphdr *uh = (void *)(skb_network_header(skb) + ihl); in esp_input_done2() local
613 uh->source != encap->encap_sport) { in esp_input_done2()
[all …]
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.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()
117 struct udphdr *uh = udp_gro_udphdr(skb); in udp6_gro_receive() local
121 if (unlikely(!uh)) in udp6_gro_receive()
128 if (skb_gro_checksum_validate_zero_check(skb, IPPROTO_UDP, uh->check, in udp6_gro_receive()
131 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.c467 struct udphdr *uh, in __udp6_lib_err_encap() argument
485 sk = __udp6_lib_lookup(net, &hdr->daddr, uh->source, in __udp6_lib_err_encap()
486 &hdr->saddr, uh->dest, in __udp6_lib_err_encap()
516 struct udphdr *uh = (struct udphdr *)(skb->data+offset); in __udp6_lib_err() local
523 sk = __udp6_lib_lookup(net, daddr, uh->dest, saddr, uh->source, in __udp6_lib_err()
529 sk = __udp6_lib_err_encap(net, hdr, offset, uh, in __udp6_lib_err()
573 ipv6_icmp_error(sk, skb, err, uh->dest, ntohl(info), (u8 *)(uh+1)); in __udp6_lib_err()
765 const struct udphdr *uh = udp_hdr(skb); in __udp6_lib_mcast_deliver() local
766 unsigned short hnum = ntohs(uh->dest); in __udp6_lib_mcast_deliver()
785 if (!__udp_v6_is_mcast_sock(net, sk, uh->dest, daddr, in __udp6_lib_mcast_deliver()
[all …]
Dip6_udp_tunnel.c88 struct udphdr *uh; in udp_tunnel6_xmit_skb() local
91 __skb_push(skb, sizeof(*uh)); in udp_tunnel6_xmit_skb()
93 uh = udp_hdr(skb); in udp_tunnel6_xmit_skb()
95 uh->dest = dst_port; in udp_tunnel6_xmit_skb()
96 uh->source = src_port; in udp_tunnel6_xmit_skb()
98 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()
/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/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()
Dnft_payload.c410 struct udphdr *uh, _uh; in nft_payload_udp_checksum() local
412 uh = skb_header_pointer(skb, thoff, sizeof(_uh), &_uh); in nft_payload_udp_checksum()
413 if (!uh) in nft_payload_udp_checksum()
416 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.c1211 const struct udphdr *uh; in get_udp_data() local
1215 uh = skb_header_pointer(skb, protoff, sizeof(_uh), &_uh); in get_udp_data()
1216 if (uh == NULL) in get_udp_data()
/net/openvswitch/
Dactions.c362 struct udphdr *uh = udp_hdr(skb); in update_ip_l4_checksum() local
364 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ip_l4_checksum()
365 inet_proto_csum_replace4(&uh->check, skb, in update_ip_l4_checksum()
367 if (!uh->check) in update_ip_l4_checksum()
368 uh->check = CSUM_MANGLED_0; in update_ip_l4_checksum()
395 struct udphdr *uh = udp_hdr(skb); in update_ipv6_checksum() local
397 if (uh->check || skb->ip_summed == CHECKSUM_PARTIAL) { in update_ipv6_checksum()
398 inet_proto_csum_replace16(&uh->check, skb, in update_ipv6_checksum()
400 if (!uh->check) in update_ipv6_checksum()
401 uh->check = CSUM_MANGLED_0; in update_ipv6_checksum()
[all …]
/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/l2tp/
Dl2tp_core.c1064 struct udphdr *uh; in l2tp_xmit_skb() local
1112 __skb_push(skb, sizeof(*uh)); in l2tp_xmit_skb()
1114 uh = udp_hdr(skb); in l2tp_xmit_skb()
1115 uh->source = inet->inet_sport; in l2tp_xmit_skb()
1116 uh->dest = inet->inet_dport; in l2tp_xmit_skb()
1118 uh->len = htons(udp_len); in l2tp_xmit_skb()