Am Donnerstag, 21. Februar 2002 15:22 schrieb Atif Syed:
> Dear all,
>
> I am trying to copy sk_buffer.
>
>
> skb_new=alloc_skb(sizeof(struct sk_buff) , GFP_ATOMIC);
> skb_new=pskb_copy(skb,GFP_KERNEL);
>
> These lines make hang the kernel. Should i have to allocate memory or only
> copy the skb to the new one. I am confused after reading the
> documentation.
>
> Thanks in advance for help.
>
>
> Atif Syed
> NEC Europe Ltd. - Network Laboratories
>
> Email: Atif.Syed@xxxxxxxxxxxx
Have a look at:
http://lxr.linux.no/source/
choose "identifier search", and search for "pskb_copy".
If you choose kernel 2.4.16 (and i386) you get
the source code position: net/core/skbuff.c, line 559 .
Click on this link and see, that alloc is done.
BTW: thanks, I just need this function also.
--
Joachim Franek
www.de-franek.de
rs485.de-franek.de
|