Lines Matching refs:iph
80 static int ip_clear_mutable_options(const struct iphdr *iph, __be32 *daddr) in ip_clear_mutable_options() argument
82 unsigned char *optptr = (unsigned char *)(iph+1); in ip_clear_mutable_options()
83 int l = iph->ihl*4 - sizeof(struct iphdr); in ip_clear_mutable_options()
123 struct iphdr *iph; in ah_output_done() local
131 iph = AH_SKB_CB(skb)->tmp; in ah_output_done()
132 icv = ah_tmp_icv(ahp->ahash, iph, ihl); in ah_output_done()
135 top_iph->tos = iph->tos; in ah_output_done()
136 top_iph->ttl = iph->ttl; in ah_output_done()
137 top_iph->frag_off = iph->frag_off; in ah_output_done()
139 top_iph->daddr = iph->daddr; in ah_output_done()
140 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output_done()
157 struct iphdr *iph, *top_iph; in ah_output() local
181 iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + seqhi_len); in ah_output()
182 if (!iph) in ah_output()
184 seqhi = (__be32 *)((char *)iph + ihl); in ah_output()
194 iph->tos = top_iph->tos; in ah_output()
195 iph->ttl = top_iph->ttl; in ah_output()
196 iph->frag_off = top_iph->frag_off; in ah_output()
199 iph->daddr = top_iph->daddr; in ah_output()
200 memcpy(iph+1, top_iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output()
237 AH_SKB_CB(skb)->tmp = iph; in ah_output()
251 top_iph->tos = iph->tos; in ah_output()
252 top_iph->ttl = iph->ttl; in ah_output()
253 top_iph->frag_off = iph->frag_off; in ah_output()
255 top_iph->daddr = iph->daddr; in ah_output()
256 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output()
260 kfree(iph); in ah_output()
315 struct iphdr *iph, *work_iph; in ah_input() local
360 iph = ip_hdr(skb); in ah_input()
382 memcpy(work_iph, iph, ihl); in ah_input()
386 iph->ttl = 0; in ah_input()
387 iph->tos = 0; in ah_input()
388 iph->frag_off = 0; in ah_input()
389 iph->check = 0; in ah_input()
390 if (ihl > sizeof(*iph)) { in ah_input()
392 err = ip_clear_mutable_options(iph, &dummy); in ah_input()
445 const struct iphdr *iph = (const struct iphdr *)skb->data; in ah4_err() local
446 struct ip_auth_hdr *ah = (struct ip_auth_hdr *)(skb->data+(iph->ihl<<2)); in ah4_err()
460 x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr, in ah4_err()