mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: cranium2003 <cranium2003@yahoo.com>
To: kernerl mail <linux-kernel@vger.kernel.org>
Subject: analysing ip_rcv code problems
Date: Fri, 10 Dec 2004 01:54:55 -0800 (PST)	[thread overview]
Message-ID: <20041210095455.62156.qmail@web41402.mail.yahoo.com> (raw)

hello,
                I know that in kernel 2.4 series,
function used to receive IP packets is ip_rcv. But i
am not getting where exactly IP header is removed that
is following lines from function ip_rcv can be used to
remove IP header                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                                                      
                              if (!pskb_may_pull(skb,
sizeof(struct iphdr)))                                
                                                    
goto inhdr_error;                                     
                                                      
      iph = skb->nh.iph;                              
                                                      
                                                      
                                                      
                          ...                         
                                                      
                                        ...           
                                                      
                                                     
...                                                   
                                                      
              ...                                     
                                                      
                                             and also
following lines from same kernel is used to remove
header as IP
header length is 20 bytes then which function actually
does IP header removal.                               
                      if (!pskb_may_pull(skb,
iph->ihl*4))                                          
                                                    
goto inhdr_error;                                     
                                                      
                                                      
                                                      
                    iph = skb->nh.iph;                
                                                      
                                                      
                                                      
                                                      
Also why iph = skb->nh.iph statement is used twice in
function code ip_rcv.                                 
                                                      
                                                      
              regards,                                
                                                      
                            cranium.


		
__________________________________ 
Do you Yahoo!? 
Send holiday email and support a worthy cause. Do good. 
http://celebrity.mail.yahoo.com

                 reply	other threads:[~2004-12-10  9:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20041210095455.62156.qmail@web41402.mail.yahoo.com \
    --to=cranium2003@yahoo.com \
    --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®