Lines Matching refs:iph
77 static int ip_clear_mutable_options(const struct iphdr *iph, __be32 *daddr) in ip_clear_mutable_options() argument
79 unsigned char *optptr = (unsigned char *)(iph+1); in ip_clear_mutable_options()
80 int l = iph->ihl*4 - sizeof(struct iphdr); in ip_clear_mutable_options()
120 struct iphdr *iph; in ah_output_done() local
128 iph = AH_SKB_CB(skb)->tmp; in ah_output_done()
129 icv = ah_tmp_icv(iph, ihl); in ah_output_done()
132 top_iph->tos = iph->tos; in ah_output_done()
133 top_iph->ttl = iph->ttl; in ah_output_done()
134 top_iph->frag_off = iph->frag_off; in ah_output_done()
136 top_iph->daddr = iph->daddr; in ah_output_done()
137 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output_done()
154 struct iphdr *iph, *top_iph; in ah_output() local
178 iph = ah_alloc_tmp(ahash, nfrags + sglists, ihl + seqhi_len); in ah_output()
179 if (!iph) in ah_output()
181 seqhi = (__be32 *)((char *)iph + ihl); in ah_output()
191 iph->tos = top_iph->tos; in ah_output()
192 iph->ttl = top_iph->ttl; in ah_output()
193 iph->frag_off = top_iph->frag_off; in ah_output()
196 iph->daddr = top_iph->daddr; in ah_output()
197 memcpy(iph+1, top_iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output()
234 AH_SKB_CB(skb)->tmp = iph; in ah_output()
248 top_iph->tos = iph->tos; in ah_output()
249 top_iph->ttl = iph->ttl; in ah_output()
250 top_iph->frag_off = iph->frag_off; in ah_output()
252 top_iph->daddr = iph->daddr; in ah_output()
253 memcpy(top_iph+1, iph+1, top_iph->ihl*4 - sizeof(struct iphdr)); in ah_output()
257 kfree(iph); in ah_output()
312 struct iphdr *iph, *work_iph; in ah_input() local
357 iph = ip_hdr(skb); in ah_input()
379 memcpy(work_iph, iph, ihl); in ah_input()
383 iph->ttl = 0; in ah_input()
384 iph->tos = 0; in ah_input()
385 iph->frag_off = 0; in ah_input()
386 iph->check = 0; in ah_input()
387 if (ihl > sizeof(*iph)) { in ah_input()
389 err = ip_clear_mutable_options(iph, &dummy); in ah_input()
442 const struct iphdr *iph = (const struct iphdr *)skb->data; in ah4_err() local
443 struct ip_auth_hdr *ah = (struct ip_auth_hdr *)(skb->data+(iph->ihl<<2)); in ah4_err()
457 x = xfrm_state_lookup(net, skb->mark, (const xfrm_address_t *)&iph->daddr, in ah4_err()