add m_copyup(9) obtained from FreeBSD (manual only)
This commit is contained in:
parent
0b17430ea3
commit
dedc54f76f
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.371 2013/05/22 16:01:44 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.372 2013/06/17 09:58:21 ryo Exp $
|
||||
|
||||
# Makefile for section 9 (kernel function and variable) manual pages.
|
||||
|
||||
|
@ -462,8 +462,8 @@ MLINKS+=mbuf.9 m_get.9 mbuf.9 m_getclr.9 mbuf.9 m_gethdr.9 mbuf.9 m_devget.9 \
|
|||
mbuf.9 m_copyback.9 mbuf.9 m_cat.9 mbuf.9 m_dup.9 mbuf.9 m_prepend.9 \
|
||||
mbuf.9 m_copyback_cow.9 \
|
||||
mbuf.9 m_makewritable.9 \
|
||||
mbuf.9 m_pulldown.9 \
|
||||
mbuf.9 m_pullup.9 mbuf.9 m_split.9 mbuf.9 m_adj.9 mbuf.9 m_free.9 \
|
||||
mbuf.9 m_pulldown.9 mbuf.9 m_pullup.9 mbuf.9 m_copyup.9 \
|
||||
mbuf.9 m_split.9 mbuf.9 m_adj.9 mbuf.9 m_free.9 \
|
||||
mbuf.9 m_freem.9 mbuf.9 mtod.9 mbuf.9 mtocl.9 mbuf.9 cltom.9 \
|
||||
mbuf.9 MGET.9 mbuf.9 MGETHDR.9 mbuf.9 MEXTMALLOC.9 \
|
||||
mbuf.9 MEXTADD.9 mbuf.9 MCLGET.9 mbuf.9 M_COPY_PKTHDR.9 \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.\" $NetBSD: mbuf.9,v 1.50 2010/12/02 12:54:13 wiz Exp $
|
||||
.\" $NetBSD: mbuf.9,v 1.51 2013/06/17 09:58:21 ryo Exp $
|
||||
.\"
|
||||
.\" Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
.\" All rights reserved.
|
||||
|
@ -27,7 +27,7 @@
|
|||
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
.\" POSSIBILITY OF SUCH DAMAGE.
|
||||
.\"
|
||||
.Dd March 24, 2008
|
||||
.Dd June 17, 2013
|
||||
.Dt MBUF 9
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
@ -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 @@ contiguous region to possibly avoid being called again.
|
|||
.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
|
||||
|
|
Loading…
Reference in New Issue