diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-29 02:39:31 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-11-29 02:39:31 +0000 |
commit | 0160b279c9b2097e53f46d7ada9fe9ac1aa46add (patch) | |
tree | 0203b3d6ad7b606640f17130dfa5f2b445732698 /share/man | |
parent | a7b494491d3dddc2abea5041ec32aa5276c5a9af (diff) |
document MCLGETI
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man9/Makefile | 7 | ||||
-rw-r--r-- | share/man/man9/mbuf.9 | 26 |
2 files changed, 28 insertions, 5 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index b29e8dbd172..a51d22654e6 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.146 2008/11/04 21:37:07 deraadt Exp $ +# $OpenBSD: Makefile,v 1.147 2008/11/29 02:39:30 deraadt Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. @@ -203,8 +203,9 @@ MLINKS+=mbuf.9 m_copym2.9 mbuf.9 m_copym.9 mbuf.9 m_free.9 mbuf.9 MFREE.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_zero.9 mbuf.9 m_apply.9 \ - mbuf.9 MEXTALLOC.9 mbuf.9 MCLGET.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 \ + mbuf.9 MEXTALLOC.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 \ mbuf.9 M_TRAILINGSPACE.9 mbuf.9 MCHTYPE.9 mbuf.9 mtod.9 MLINKS+=mbuf_tags.9 m_tag_get.9 mbuf_tags.9 m_tag_find.9 \ mbuf_tags.9 m_tag_prepend.9 mbuf_tags.9 m_tag_delete.9 \ diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index 4af24dbce58..6337ee1b337 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mbuf.9,v 1.37 2008/11/03 22:16:51 claudio Exp $ +.\" $OpenBSD: mbuf.9,v 1.38 2008/11/29 02:39:30 deraadt 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: November 3 2008 $ +.Dd $Mdocdate: November 29 2008 $ .Dt MBUF 9 .Os .Sh NAME @@ -85,6 +85,8 @@ "int (*func)(caddr_t, caddr_t, unsigned int)" "caddr_t fstate" .Fn MEXTMALLOC "struct mbuf *m" "int size" "int how" .Fn MCLGET "struct mbuf *m" "int how" +.Ft struct mbuf * +.Fn MCLGETI "struct mbuf" "int how" "struct ifnet *ifp" "int len" .Fn MEXTADD "struct mbuf *m" "caddr_t buf" "u_int size" "int type" \ "void (*free)(caddr_t, u_int, void *)" "void *arg" .Fn M_ALIGN "struct mbuf *m" "int len" @@ -616,6 +618,26 @@ See .Fn m_get for a description of .Fa how . +.It Fn MCLGETI "struct mbuf *m" "int how" "struct ifnet *ifp" "int len" +If +.Fa m +is NULL, allocate it. +Then allocate and add an mbuf cluster of length +.Fa len +to the mbuf pointed to by +.Fa m . +If +.Fa ifp +is passed in, then per-interface accounting for the mbuf will occur, +and thus mbuf allocation can fail in when limits are reached. +Returns either the mbuf +.Fa m +that was passed in, or the newly allocated one which was allocated; in +either case the flag M_EXT is set in the mbuf. +See +.Fn m_get +for a description of +.Fa how . .It Fn MEXTMALLOC "struct mbuf *m" "int size" "int how" Allocate external storage of size .Fa size |