retrive data from mbuf chain

Julian Elischer julian at elischer.org
Thu Feb 7 21:30:19 UTC 2008


Vlad GALU wrote:
> On 2/7/08, Biks N <freebsd.dev at gmail.com> wrote:
>> Hi,
>>
>> I am new to FreeBSD kernel programming.
>>
>> Currently I am trying to work on mbuf data manupulation.
>>
>> >From my understanding: data (payload) is stored into one or more mufs
>> which are chained together through m_next pointer.
>>
>> Now, I need to retrive all data in mbuf chain ( mbufs linked by
>> m_next). I am working ip_output() in netinet/ip_output.c
>>
>> Does there exist inbuilt function/macro to retrive all the data in mbuf chain?
> 
>    I may be wrong on this one, but according to my understanding, a
> m_pullup() followed by a mtod() should do the trick.

depends what he wants to do..
check /sys/sys/mbuf.h and
/sys/kern/uipc_mbuf.c
for all sorts of methods for handling mbufs.

> 
>> thanks in advance :)
>> _______________________________________________
>> freebsd-hackers at freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"
>>
> 
> 



More information about the freebsd-hackers mailing list