cvs -q diff -au mbuf.9 Index: mbuf.9 =================================================================== RCS file: /cvsroot/src/share/man/man9/mbuf.9,v retrieving revision 1.50 diff -a -u -r1.50 mbuf.9 --- mbuf.9 2 Dec 2010 12:54:13 -0000 1.50 +++ mbuf.9 14 Jun 2013 09:37:04 -0000 @@ -47,6 +47,7 @@ .Nm m_prepend , .Nm m_pulldown , .Nm m_pullup , +.Nm m_copyup , .Nm m_split , .Nm m_adj , .Nm m_apply , @@ -101,6 +102,8 @@ .Ft struct mbuf * .Fn m_pullup "struct mbuf *n" "int len" .Ft struct mbuf * +.Fn m_copyup "struct mbuf *m" "int len" "int dstoff" +.Ft struct mbuf * .Fn m_split "struct mbuf *m0" "int len0" "int wait" .Ft void .Fn m_adj "struct mbuf *mp" "int req_len" @@ -485,6 +488,26 @@ .Fa len must be smaller or equal than .Dv MHLEN . +.It Fn m_copyup "struct mbuf *m" "int len" "int dstoff" +Similar to +.Fn m_pullup +but copies +.Fa len +bytes of data into a new mbuf at +.Fa dstoff +bytes into the mbuf. +The +.Fa dstoff +argument aligns the data and leaves room for a link layer header. +Returns the new +mbuf chain on success, and frees the mbuf chain and returns +.Dv NULL +on failure. +Note that +the function does not allocate mbuf clusters, so +.Fa len + dstoff +must be less than +.Dv MHLEN . .It Fn m_split "struct mbuf *m0" "int len0" "int wait" Partitions an mbuf chain in two pieces, returning the tail, which is all but the first