summaryrefslogtreecommitdiff
path: root/share/man
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2013-06-05 03:28:44 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2013-06-05 03:28:44 +0000
commit3ef9948f177202f485f22c84d5f4cfb4cf74b831 (patch)
tree4ee43c3e26ebfec4f6f20b1889008295c771dca7 /share/man
parent0586d49126fef259024fcded0aa1a81260b4c82c (diff)
m_defrag(9) wasnt documented.
Diffstat (limited to 'share/man')
-rw-r--r--share/man/man9/Makefile6
-rw-r--r--share/man/man9/mbuf.918
2 files changed, 19 insertions, 5 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile
index 5d4cbff1f17..29b3d1d1ca3 100644
--- a/share/man/man9/Makefile
+++ b/share/man/man9/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.180 2013/06/03 16:06:42 tedu Exp $
+# $OpenBSD: Makefile,v 1.181 2013/06/05 03:28:43 dlg Exp $
# $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@@ -213,8 +213,8 @@ MLINKS+=mbuf.9 m_copym2.9 mbuf.9 m_copym.9 mbuf.9 m_free.9 mbuf.9 MFREE.9 \
mbuf.9 m_pulldown.9 mbuf.9 m_pullup.9 \
mbuf.9 m_split.9 \
mbuf.9 m_inject.9 mbuf.9 m_getptr.9 mbuf.9 m_adj.9 mbuf.9 m_copyback.9 \
- mbuf.9 m_freem.9 mbuf.9 m_reclaim.9 mbuf.9 m_copydata.9 \
- mbuf.9 m_cat.9 mbuf.9 m_devget.9 mbuf.9 m_apply.9 \
+ mbuf.9 m_defrag.9 mbuf.9 m_freem.9 mbuf.9 m_reclaim.9 \
+ mbuf.9 m_copydata.9 mbuf.9 m_cat.9 mbuf.9 m_devget.9 mbuf.9 m_apply.9 \
mbuf.9 MCLGET.9 mbuf.9 MCLGETI.9 \
mbuf.9 MEXTADD.9 mbuf.9 M_ALIGN.9 mbuf.9 MH_ALIGN.9 \
mbuf.9 M_READONLY.9 mbuf.9 M_LEADINGSPACE.9 \
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9
index 4587b56abd9..7e635315345 100644
--- a/share/man/man9/mbuf.9
+++ b/share/man/man9/mbuf.9
@@ -1,4 +1,4 @@
-.\" $OpenBSD: mbuf.9,v 1.61 2013/06/04 19:27:09 schwarze Exp $
+.\" $OpenBSD: mbuf.9,v 1.62 2013/06/05 03:28:43 dlg Exp $
.\"
.\" Copyright (c) 2001 Jean-Jacques Bernard-Gundol <jjbg@openbsd.org>
.\" All rights reserved.
@@ -25,7 +25,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 4 2013 $
+.Dd $Mdocdate: June 5 2013 $
.Dt MBUF 9
.Os
.Sh NAME
@@ -65,6 +65,8 @@
.Fn m_adj "struct mbuf *mp" "int req_len"
.Ft int
.Fn m_copyback "struct mbuf *m0" "int off" "int len" "const void *cp" "int wait"
+.Ft int
+.Fn m_defrag "struct mbuf *m" "int wait"
.Ft void
.Fn m_freem "struct mbuf *m"
.Ft void
@@ -548,6 +550,18 @@ returns
.Er ENOBUFS .
The mbuf chain must be initialized properly, including setting
.Fa m_len .
+.It Fn m_defrag "struct mbuf *m" "int wait"
+Defragment the data mbufs referenced by
+.Fa m
+by replacing the chain with a copy of their contents made into a
+single mbuf or cluster.
+.Fa wait
+specifies whether it can wait or not for the replacement storage.
+.Fn m_defrag
+returns 0 on success or -1 on failure.
+The mbuf pointer
+.Fa m
+remains in existence and unchanged on failure.
.It Fn m_freem "struct mbuf *m"
Free the mbuf chain pointed to by
.Fa m .