Home
last modified time | relevance | path

Searched refs:top_iph (Results 1 – 6 of 6) sorted by relevance

/Linux-v4.19/net/ipv4/
Dxfrm4_mode_tunnel.c33 struct iphdr *top_iph; in xfrm4_mode_tunnel_output() local
42 skb->transport_header = skb->network_header + sizeof(*top_iph); in xfrm4_mode_tunnel_output()
43 top_iph = ip_hdr(skb); in xfrm4_mode_tunnel_output()
45 top_iph->ihl = 5; in xfrm4_mode_tunnel_output()
46 top_iph->version = 4; in xfrm4_mode_tunnel_output()
48 top_iph->protocol = xfrm_af2proto(skb_dst(skb)->ops->family); in xfrm4_mode_tunnel_output()
52 top_iph->tos = 0; in xfrm4_mode_tunnel_output()
54 top_iph->tos = XFRM_MODE_SKB_CB(skb)->tos; in xfrm4_mode_tunnel_output()
55 top_iph->tos = INET_ECN_encapsulate(top_iph->tos, in xfrm4_mode_tunnel_output()
60 IP_ECN_clear(top_iph); in xfrm4_mode_tunnel_output()
[all …]
Dah4.c126 struct iphdr *top_iph = ip_hdr(skb); in ah_output_done() local
134 top_iph->tos = iph->tos; in ah_output_done()
135 top_iph->ttl = iph->ttl; in ah_output_done()
136 top_iph->frag_off = iph->frag_off; in ah_output_done()
137 if (top_iph->ihl != 5) { in ah_output_done()
138 top_iph->daddr = iph->daddr; in ah_output_done()
139 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output_done()
156 struct iphdr *iph, *top_iph; in ah_output() local
191 top_iph = ip_hdr(skb); in ah_output()
193 iph->tos = top_iph->tos; in ah_output()
[all …]
Dxfrm4_mode_beet.c42 struct iphdr *top_iph; in xfrm4_beet_output() local
51 hdrlen + (XFRM_MODE_SKB_CB(skb)->ihl - sizeof(*top_iph))); in xfrm4_beet_output()
56 skb->transport_header = skb->network_header + sizeof(*top_iph); in xfrm4_beet_output()
62 top_iph = ip_hdr(skb); in xfrm4_beet_output()
69 ph->nexthdr = top_iph->protocol; in xfrm4_beet_output()
73 top_iph->protocol = IPPROTO_BEETPH; in xfrm4_beet_output()
74 top_iph->ihl = sizeof(struct iphdr) / 4; in xfrm4_beet_output()
77 top_iph->saddr = x->props.saddr.a4; in xfrm4_beet_output()
78 top_iph->daddr = x->id.daddr.a4; in xfrm4_beet_output()
/Linux-v4.19/net/ipv6/
Dxfrm6_mode_tunnel.c36 struct ipv6hdr *top_iph; in xfrm6_mode_tunnel_output() local
45 skb->transport_header = skb->network_header + sizeof(*top_iph); in xfrm6_mode_tunnel_output()
46 top_iph = ipv6_hdr(skb); in xfrm6_mode_tunnel_output()
48 top_iph->version = 6; in xfrm6_mode_tunnel_output()
50 memcpy(top_iph->flow_lbl, XFRM_MODE_SKB_CB(skb)->flow_lbl, in xfrm6_mode_tunnel_output()
51 sizeof(top_iph->flow_lbl)); in xfrm6_mode_tunnel_output()
52 top_iph->nexthdr = xfrm_af2proto(skb_dst(skb)->ops->family); in xfrm6_mode_tunnel_output()
61 ipv6_change_dsfield(top_iph, 0, dsfield); in xfrm6_mode_tunnel_output()
62 top_iph->hop_limit = ip6_dst_hoplimit(xfrm_dst_child(dst)); in xfrm6_mode_tunnel_output()
63 top_iph->saddr = *(struct in6_addr *)&x->props.saddr; in xfrm6_mode_tunnel_output()
[all …]
Dxfrm6_mode_beet.c42 struct ipv6hdr *top_iph; in xfrm6_beet_output() local
56 skb->transport_header = skb->network_header + sizeof(*top_iph); in xfrm6_beet_output()
61 top_iph = ipv6_hdr(skb); in xfrm6_beet_output()
68 ph->nexthdr = top_iph->nexthdr; in xfrm6_beet_output()
72 top_iph->nexthdr = IPPROTO_BEETPH; in xfrm6_beet_output()
75 top_iph->saddr = *(struct in6_addr *)&x->props.saddr; in xfrm6_beet_output()
76 top_iph->daddr = *(struct in6_addr *)&x->id.daddr; in xfrm6_beet_output()
Dah6.c307 struct ipv6hdr *top_iph = ipv6_hdr(skb); in ah6_output_done() local
320 memcpy(top_iph, iph_base, IPV6HDR_BASELEN); in ah6_output_done()
324 memcpy(&top_iph->saddr, iph_ext, extlen); in ah6_output_done()
326 memcpy(&top_iph->daddr, iph_ext, extlen); in ah6_output_done()
346 struct ipv6hdr *top_iph; in ah6_output() local
388 top_iph = ipv6_hdr(skb); in ah6_output()
389 top_iph->payload_len = htons(skb->len - sizeof(*top_iph)); in ah6_output()
397 memcpy(iph_base, top_iph, IPV6HDR_BASELEN); in ah6_output()
401 memcpy(iph_ext, &top_iph->saddr, extlen); in ah6_output()
403 memcpy(iph_ext, &top_iph->daddr, extlen); in ah6_output()
[all …]