Lines Matching defs:iph
271 const struct iphdr *iph;
285 iph = ip_hdr(skb);
287 opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
301 &iph->saddr,
302 &iph->daddr);
316 static bool ip_can_use_hint(const struct sk_buff *skb, const struct iphdr *iph,
319 return hint && !skb_dst(skb) && ip_hdr(hint)->daddr == iph->daddr &&
320 ip_hdr(hint)->tos == iph->tos;
329 const struct iphdr *iph = ip_hdr(skb);
333 if (ip_can_use_hint(skb, iph, hint)) {
334 err = ip_route_use_hint(skb, iph->daddr, iph->saddr, iph->tos,
343 !ip_is_fragment(iph)) {
344 switch (iph->protocol) {
349 /* must reload iph, skb->head might have changed */
350 iph = ip_hdr(skb);
359 /* must reload iph, skb->head might have changed */
360 iph = ip_hdr(skb);
371 err = ip_route_input_noref(skb, iph->daddr, iph->saddr,
372 iph->tos, dev);
393 if (iph->ihl > 5 && ip_rcv_options(skb, dev))
460 const struct iphdr *iph;
480 iph = ip_hdr(skb);
493 if (iph->ihl < 5 || iph->version != 4)
500 IPSTATS_MIB_NOECTPKTS + (iph->tos & INET_ECN_MASK),
503 if (!pskb_may_pull(skb, iph->ihl*4))
506 iph = ip_hdr(skb);
508 if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl)))
511 len = ntohs(iph->tot_len);
515 } else if (len < (iph->ihl*4))
520 * Note this now means skb->len holds ntohs(iph->tot_len).
527 iph = ip_hdr(skb);
528 skb->transport_header = skb->network_header + iph->ihl*4;