Hi, skb_put is used to put stuff at the end of the current data (call it if you want to add a tail, not a head), skb_push is used to put data before the current data, ie if you want to add a header and not a tail. But be aware of the following points: i. skb_push will panic if headroom<amount you want to push ii. skb_put will panic if amount>tailroom (= 4kb - skb->tail), as 4kb is the max size an skb->data can point to. -Regards, On Thu, 31 Mar 2005 14:54:42 +0900 (JST), YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxx> wrote: > In article <72252ed05033021463a1f45b6@xxxxxxxxxxxxxx> (at Thu, 31 Mar 2005 00:46:03 -0500), Akshay Kawale <linux781@xxxxxxxxx> says: > > > I was wondering about the difference between skb_put() and skb_push(). > > Both appear to take in the same parameters and produce the same result > > - that of lengthening the data area. > > > > If I wanted to add data before the current data area, which one should I use? > > (e.g. my data is 5678... and I wanted to prepend 1234 to it). > > http://www.skbuff.net/skbbasic.html > > --yoshfuji > > -- Devesh Agrawal ============== The program is absolutely right; therefore the computer must be wrong. ----------------- How an engineer writes a program: Start by debugging an empty file... ---------------------- Systems programmers are the high priests of a low cult. - R. S. Barton -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/