+1.

Besides, I'd like to see more mbuf utility functions from BSD be 
introuduced into OpenSolaris, such as m_prepend(struct mbuf *m, int len, 
int how).

- Michael

Darren Reed wrote:
> A pair of convenience functions that I'd like to eventually
> see make their way into OpenSolaris is to copy data from a
> static buffer into an mblk and to copy data from an mblk
> into a static buffer.
> 
> In modern BSD kernels, these functions live under the names of
> m_copydata() and m_copyback() (see below.)  I'm not particularly
> attached to the names, only the functionality.  Actually, if
> there are some suggestions on what they should be called in
> OpenSolaris, I'm open...
> 
> Comments?
> 
> Darren
> 
> /*
>  * Copy data from an mbuf chain starting "off" bytes from the beginning,
>  * continuing for "len" bytes, into the indicated buffer.
>  */
> void m_copydata(struct mbuf *m, int off, int len, void *vp)
> 
> /*
>  * Copy data from a buffer back into the indicated mbuf chain,
>  * starting "off" bytes from the beginning, extending the mbuf
>  * chain if necessary.
>  */
> void m_copyback(struct mbuf *m0, int off, int len, const void *cp)
> 
> 
> _______________________________________________
> networking-discuss mailing list
> [email protected]
_______________________________________________
networking-discuss mailing list
[email protected]

Reply via email to