Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266607AbUFWSqA (ORCPT ); Wed, 23 Jun 2004 14:46:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266606AbUFWSqA (ORCPT ); Wed, 23 Jun 2004 14:46:00 -0400 Received: from mail.njit.edu ([128.235.251.173]:6858 "EHLO mail-gw5.njit.edu") by vger.kernel.org with ESMTP id S266605AbUFWSpv (ORCPT ); Wed, 23 Jun 2004 14:45:51 -0400 Date: Wed, 23 Jun 2004 14:45:47 -0400 (EDT) From: rahul b jain cs student To: linux-kernel@vger.kernel.org Subject: Question about ip_rcv() function In-Reply-To: <20040622212403.21346.qmail@lwn.net> Message-ID: References: <20040622212403.21346.qmail@lwn.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 713 Lines: 26 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/