Hi Suvidh, Can you tell mw waht is the effect then if i remove the statement skb->h.raw = skb->nh.raw = skb->data; in dev.c file in net_receive_skb function? cause if i do that icmp and udp packet still travels on loopback but tcp will hangs kernel? help me understanding this. regards, parag. On Fri, 02 Jul 2004 Suvidh Mathur wrote : >Hi, > >I'm not sure what you mean by packet already mapped to skb? > >skb->data points to the start of unprocessed data, in netif_rx() >this would be the start of network layer header. >Another thing to notice is, h & nh are unions, so I can transparently >assign skb->nh.raw without bothering to figure out the actual network >protocol of the packet. The protocol's receive function can then use the >corresponding field in nh. Same goes for h.raw too, if you look closely, >you'd see that ip_local_deliver_finish() updates h.raw to point to skb->data >which would point to the unprocessed packet (read transport header). > >HTH > >Thanks & regards, >Suvidh Mathur > >-----Original Message----- > From: bunty [mailto:bunty123_4@rediffmail.com] >Sent: Friday, July 02, 2004 2:18 PM >To: kernelnewbies@nl.linux.org >Cc: michf@post.tau.ac.il; mohanlal@samsung.com >Subject: how packet stored in skb? > > hello, > > >why is it neccessary to copy skb->data to skb->h.raw and skb->nh.raw in dev.c file? >I think the whole packet structure along with data and all headers are already mapped to skb structure and after receiving packet i think no function is using raw variables to process packet they only get values from skb structure. >regards, >parag. > > >