LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   addding data to sk_buff (https://www.linuxquestions.org/questions/linux-networking-3/addding-data-to-sk_buff-433013/)

shrishailnk 04-08-2006 08:39 AM

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...................

paragn 04-10-2006 12:40 AM

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.


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