LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-08-2006, 08:39 AM   #1
shrishailnk
Member
 
Registered: Mar 2006
Posts: 47

Rep: Reputation: 15
addding data to sk_buff


i used the function
skb_put(skb,len);
to append data . this fun will return a ptr to the next free location in the skbuff.

i have caught a packet at post_routing i need to append data to it. NOw i have the ptr to the free location in the caught sk_buff.

is there any function which can be used to copy the actual data bits into sk_buff

OR

do we just have to use that pointer to free location and
copy data to that location...................
 
Old 04-10-2006, 12:40 AM   #2
paragn
Member
 
Registered: Jan 2006
Distribution: Red Hat EL5, Fedora 7
Posts: 259

Rep: Reputation: 30
hi,
check tcp layer in kernel. TCP layer also does same. it create new sk_buff and then uses skb_put to put data from application layer and tcp header. so go throu that code and do something similar to that.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
checksum in sk_buff shrishailnk Linux - Networking 1 04-08-2006 03:41 AM
sk_buff questions? kpachopoulos Programming 1 01-14-2006 09:36 PM
Help with sk_buff cstrask Programming 0 11-23-2005 09:55 PM
how to use sk_buff wangjinyi Programming 0 10-27-2005 02:28 AM
Question about sk_buff auron Linux - Networking 0 10-06-2005 03:57 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration