Lines Matching defs:iph
269 const struct iphdr *iph;
284 iph = ip_hdr(skb);
286 opt->optlen = iph->ihl*4 - sizeof(struct iphdr);
300 &iph->saddr,
301 &iph->daddr);
313 static bool ip_can_use_hint(const struct sk_buff *skb, const struct iphdr *iph,
316 return hint && !skb_dst(skb) && ip_hdr(hint)->daddr == iph->daddr &&
317 ip_hdr(hint)->tos == iph->tos;
326 const struct iphdr *iph = ip_hdr(skb);
330 if (ip_can_use_hint(skb, iph, hint)) {
331 drop_reason = ip_route_use_hint(skb, iph->daddr, iph->saddr,
332 ip4h_dscp(iph), dev, hint);
340 !ip_is_fragment(iph)) {
341 switch (iph->protocol) {
346 /* must reload iph, skb->head might have changed */
347 iph = ip_hdr(skb);
356 /* must reload iph, skb->head might have changed */
357 iph = ip_hdr(skb);
368 drop_reason = ip_route_input_noref(skb, iph->daddr, iph->saddr,
369 ip4h_dscp(iph), dev);
390 if (iph->ihl > 5) {
462 const struct iphdr *iph;
487 iph = ip_hdr(skb);
500 if (iph->ihl < 5 || iph->version != 4)
507 IPSTATS_MIB_NOECTPKTS + (iph->tos & INET_ECN_MASK),
510 if (!pskb_may_pull(skb, iph->ihl*4))
513 iph = ip_hdr(skb);
515 if (unlikely(ip_fast_csum((u8 *)iph, iph->ihl)))
518 len = iph_totlen(skb, iph);
523 } else if (len < (iph->ihl*4))
528 * Note this now means skb->len holds ntohs(iph->tot_len).
535 iph = ip_hdr(skb);
536 skb->transport_header = skb->network_header + iph->ihl*4;
591 const struct iphdr *iph = ip_hdr(skb);
594 ipv4_is_lbcast(iph->daddr) ||
595 ipv4_is_zeronet(iph->daddr) ||