Lines Matching refs:iph
261 const struct iphdr *iph; in ip_rcv_options() local
275 iph = ip_hdr(skb); in ip_rcv_options()
277 opt->optlen = iph->ihl*4 - sizeof(struct iphdr); in ip_rcv_options()
291 &iph->saddr, in ip_rcv_options()
292 &iph->daddr); in ip_rcv_options()
306 static bool ip_can_use_hint(const struct sk_buff *skb, const struct iphdr *iph, in ip_can_use_hint() argument
309 return hint && !skb_dst(skb) && ip_hdr(hint)->daddr == iph->daddr && in ip_can_use_hint()
310 ip_hdr(hint)->tos == iph->tos; in ip_can_use_hint()
319 const struct iphdr *iph = ip_hdr(skb); in ip_rcv_finish_core() local
324 if (ip_can_use_hint(skb, iph, hint)) { in ip_rcv_finish_core()
325 err = ip_route_use_hint(skb, iph->daddr, iph->saddr, iph->tos, in ip_rcv_finish_core()
334 !ip_is_fragment(iph)) { in ip_rcv_finish_core()
336 int protocol = iph->protocol; in ip_rcv_finish_core()
345 iph = ip_hdr(skb); in ip_rcv_finish_core()
354 err = ip_route_input_noref(skb, iph->daddr, iph->saddr, in ip_rcv_finish_core()
355 iph->tos, dev); in ip_rcv_finish_core()
371 if (iph->ihl > 5 && ip_rcv_options(skb, dev)) in ip_rcv_finish_core()
438 const struct iphdr *iph; in ip_rcv_core() local
458 iph = ip_hdr(skb); in ip_rcv_core()
471 if (iph->ihl < 5 || iph->version != 4) in ip_rcv_core()
478 IPSTATS_MIB_NOECTPKTS + (iph->tos & INET_ECN_MASK), in ip_rcv_core()
481 if (!pskb_may_pull(skb, iph->ihl*4)) in ip_rcv_core()
484 iph = ip_hdr(skb); in ip_rcv_core()
486 if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl))) in ip_rcv_core()
489 len = ntohs(iph->tot_len); in ip_rcv_core()
493 } else if (len < (iph->ihl*4)) in ip_rcv_core()
505 iph = ip_hdr(skb); in ip_rcv_core()
506 skb->transport_header = skb->network_header + iph->ihl*4; in ip_rcv_core()