From: rahul b jain cs student <rbj2@oak.njit.edu>
To: linux-kernel@vger.kernel.org
Subject: Question about ip_rcv() function
Date: Wed, 23 Jun 2004 14:45:47 -0400 (EDT) [thread overview]
Message-ID: <Pine.GSO.4.58.0406231441500.7099@chrome.njit.edu> (raw)
In-Reply-To: <20040622212403.21346.qmail@lwn.net>
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.
next prev parent reply other threads:[~2004-06-23 18:46 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-22 20:48 sk_buff structure rahul b jain cs student
2004-06-22 21:24 ` Jonathan Corbet
2004-06-22 23:03 ` rahul b jain cs student
2004-06-23 18:45 ` rahul b jain cs student [this message]
2004-06-23 18:50 ` Question about ip_rcv() function David S. Miller
2004-06-23 20:22 ` rahul b jain cs student
2004-06-23 20:32 ` David S. Miller
2004-06-23 20:43 ` rahul b jain cs student
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.GSO.4.58.0406231441500.7099@chrome.njit.edu \
--to=rbj2@oak.njit.edu \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®