* Difference between skb_put() and skb_push() @ 2005-03-31 5:46 Akshay Kawale 2005-03-31 5:54 ` YOSHIFUJI Hideaki / 吉藤英明 2005-04-02 18:44 ` Akshay Kawale 0 siblings, 2 replies; 3+ messages in thread From: Akshay Kawale @ 2005-03-31 5:46 UTC (permalink / raw) To: netdev Hi, 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). I am using these functions in a Netfilter hook to insert a header between TCP and IP for a course project I am doing. Please help me!!! :-) Thanks. - Akshay ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Difference between skb_put() and skb_push() 2005-03-31 5:46 Difference between skb_put() and skb_push() Akshay Kawale @ 2005-03-31 5:54 ` YOSHIFUJI Hideaki / 吉藤英明 2005-04-02 18:44 ` Akshay Kawale 1 sibling, 0 replies; 3+ messages in thread From: YOSHIFUJI Hideaki / 吉藤英明 @ 2005-03-31 5:54 UTC (permalink / raw) To: linux781; +Cc: netdev In article <72252ed05033021463a1f45b6@mail.gmail.com> (at Thu, 31 Mar 2005 00:46:03 -0500), Akshay Kawale <linux781@gmail.com> 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Difference between skb_put() and skb_push() 2005-03-31 5:46 Difference between skb_put() and skb_push() Akshay Kawale 2005-03-31 5:54 ` YOSHIFUJI Hideaki / 吉藤英明 @ 2005-04-02 18:44 ` Akshay Kawale 1 sibling, 0 replies; 3+ messages in thread From: Akshay Kawale @ 2005-04-02 18:44 UTC (permalink / raw) To: netdev Hi, I am trying to access the tot_len field in the IP Header using a sk_buff structure inside a Netfilter hook. I do something like: (**skb).nh.iph->tot_len += 64 I have tried other variants of the same statement but none of them work. I want to increment the length by 64 bytes, but it gives me an error saying that I am trying to access an 'incomplete data type'. Can anyone shed some light on this problem? tot_len if of type __u16 (unsigned short int). Thanks. - Akshay ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-02 18:44 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-03-31 5:46 Difference between skb_put() and skb_push() Akshay Kawale 2005-03-31 5:54 ` YOSHIFUJI Hideaki / 吉藤英明 2005-04-02 18:44 ` Akshay Kawale
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).