retrive data from mbuf chain

Singh, Vijay Vijay.Singh at netapp.com
Thu Feb 7 22:10:43 UTC 2008


>From the entire chain.

best regards,
Vijay  

> -----Original Message-----
> From: Biks N [mailto:freebsd.dev at gmail.com] 
> Sent: Thursday, February 07, 2008 1:38 PM
> To: Sam Leffler
> Cc: freebsd-hackers at freebsd.org
> Subject: Re: retrive data from mbuf chain
> 
> On Feb 7, 2008 3:26 PM, Sam Leffler <sam at 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
> >
> >
> _______________________________________________
> 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