Question about ip_rcv() function

From: rahul b jain cs student
Date: Wed Jun 23 2004 - 13:48:56 EST


Hi,

can anyone explain what is the difference between the following two pieces
of code.

1. if (!pskb_may_pull(skb, sizeof(struct iphdr)))
goto inhdr_error;

iph = skb->nh.iph;

2. if (!pskb_may_pull(skb, iph->ihl*4))
goto inhdr_error;

iph = skb->nh.iph;


Also, does anyone know how the headers are stripped from the packet at the
receiving end. Does the function __pskb_pull_tail() strip of the header fields ?

Thanks,
Rahul.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/