public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* sk_buff for frame fragmentation and reassembly
@ 2002-08-28  1:42 Seong Moon
  2002-08-28  1:49 ` David S. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Seong Moon @ 2002-08-28  1:42 UTC (permalink / raw)
  To: linux-kernel

Hi,there.

I'm writing virtual network device driver.
I want to write the function of fragmentation and reassembly of a frame
which is larger than physical MTU.

So, I've looked into the ip_fragment() and ip_defrag() and sk_buff.h .
But I couldn't understand the process of fragmentation and reassembly of
datagram.

My questions are as follows :

<fragmentation>
- ip_fragment() uses alloc_skb() and skb_copy_bit(),
Is the original sk_buff shared ? or Is another sk_buff created?
I want to know the meaning of alloc_skb() and skb_copy_bit().

<reassembly>
- ip_defrag() uses skb_shinfo(skb)->frag_list.
When I pass a reassembled frame to network layer, can I
use skb_shinfo(skb)->frag_list ?
If not, How can I pass the reassembled frame to upper layer?

<sk_buff>
what does the usage of pskb_pull() and pskb_trim()?

Thanks in advance.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: sk_buff for frame fragmentation and reassembly
  2002-08-28  1:42 sk_buff for frame fragmentation and reassembly Seong Moon
@ 2002-08-28  1:49 ` David S. Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2002-08-28  1:49 UTC (permalink / raw)
  To: seong; +Cc: linux-kernel

   From: "Seong Moon" <seong@etri.re.kr>
   Date: Wed, 28 Aug 2002 10:42:50 +0900

   I want to know the meaning of alloc_skb() and skb_copy_bit().
   
alloc_skb allocates a new SKB.
skb_copy_bit copies data from a SKB to a kernel buffer.

net/core/skbuff.c has full documentation in the comments
above alloc_skb, perhaps you should read it :-)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-08-28  1:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-28  1:42 sk_buff for frame fragmentation and reassembly Seong Moon
2002-08-28  1:49 ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox