netdev
[Top] [All Lists]

Difference between skb_put() and skb_push()

To: netdev@xxxxxxxxxxx
Subject: Difference between skb_put() and skb_push()
From: Akshay Kawale <linux781@xxxxxxxxx>
Date: Thu, 31 Mar 2005 00:46:03 -0500
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=heI04ry8bebzYeugI0OHJEy2WVYhbI/C8Vy0tJtBiVwGq/fnR4102tDfGqJJP0rM0SI++sdcd2bpoNJM37EvCX3Yp+aEesf4ujr79cdJV/B5AbU3GIclSTPDDQ006H31UBr8Q7DJgDRplLDuHZ2xFhzGS1z38PJvFmafWrsdsfQ=
Reply-to: Akshay Kawale <linux781@xxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>