Date: Thu, 7 Feb 2008 15:38:05 -0600 From: "Biks N" <freebsd.dev@gmail.com> To: "Sam Leffler" <sam@errno.com> Cc: freebsd-hackers@freebsd.org Subject: Re: retrive data from mbuf chain Message-ID: <50cd4e5f0802071338h63b4fcbax9ceb9643aa5d7504@mail.gmail.com> In-Reply-To: <47AB7775.2040000@errno.com> References: <50cd4e5f0802071222w1222d901o3ce8770b5f5725b4@mail.gmail.com> <47AB7775.2040000@errno.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Feb 7, 2008 3:26 PM, Sam Leffler <sam@errno.com> wrote: > > Biks N 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? > > > > man 9 mbuf; look for m_copydata. m_copydata(mbuf, offset, len, buf) Will it copy data from entire "mbuf chain" or just from the current mbuf ? Thanks for your help > > Sam > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50cd4e5f0802071338h63b4fcbax9ceb9643aa5d7504>