Received: with ECARTIS (v1.0.0; list netdev); Wed, 30 Mar 2005 21:46:09 -0800 (PST) Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.200]) by oss.sgi.com (8.13.0/8.13.0) with ESMTP id j2V5k4bc027903 for ; Wed, 30 Mar 2005 21:46:04 -0800 Received: by rproxy.gmail.com with SMTP id r35so298868rna for ; Wed, 30 Mar 2005 21:46:03 -0800 (PST) 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= Received: by 10.38.153.43 with SMTP id a43mr1292711rne; Wed, 30 Mar 2005 21:46:03 -0800 (PST) Received: by 10.38.162.72 with HTTP; Wed, 30 Mar 2005 21:46:03 -0800 (PST) Message-ID: <72252ed05033021463a1f45b6@mail.gmail.com> Date: Thu, 31 Mar 2005 00:46:03 -0500 From: Akshay Kawale Reply-To: Akshay Kawale To: netdev@oss.sgi.com Subject: Difference between skb_put() and skb_push() Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.83/795/Wed Mar 30 01:58:09 2005 on oss.sgi.com X-Virus-Status: Clean X-archive-position: 1084 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: linux781@gmail.com Precedence: bulk X-list: netdev Content-Length: 486 Lines: 17 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