Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Feb 2008 13:30:21 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Vlad GALU <dudu@dudu.ro>
Cc:        freebsd-hackers@freebsd.org, Biks N <freebsd.dev@gmail.com>
Subject:   Re: retrive data from mbuf chain
Message-ID:  <47AB786D.8070403@elischer.org>
In-Reply-To: <ad79ad6b0802071312q2538b3e0i3fb8d8c218ee5cfe@mail.gmail.com>
References:  <50cd4e5f0802071222w1222d901o3ce8770b5f5725b4@mail.gmail.com> <ad79ad6b0802071312q2538b3e0i3fb8d8c218ee5cfe@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Vlad GALU wrote:
> On 2/7/08, Biks N <freebsd.dev@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@freebsd.org mailing list
>> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
>>
> 
> 




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47AB786D.8070403>