lkml.org 
[lkml]   [2004]   [Dec]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateFri, 10 Dec 2004 01:54:55 -0800 (PST)
Fromcranium2003 <>
Subjectanalysing ip_rcv code problems
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
-
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/
\
 
 \ /
  Last update: 2005-03-22 14:08    [from the cache]
©2003-2008