diff options
author | 2003-03-14 19:44:32 +0000 | |
---|---|---|
committer | 2003-03-14 19:44:32 +0000 | |
commit | 7baf0ebc5443297903e079da59eeb9c61c76a12f (patch) | |
tree | 7b1101c4926eced9c0009305fa532571909af0c3 | |
parent | dead functions (diff) | |
download | wireguard-openbsd-7baf0ebc5443297903e079da59eeb9c61c76a12f.tar.xz wireguard-openbsd-7baf0ebc5443297903e079da59eeb9c61c76a12f.zip |
more cleaning: document 'how'
-rw-r--r-- | share/man/man9/mbuf.9 | 67 |
1 files changed, 49 insertions, 18 deletions
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index 0ce1c2dc1a9..cdd7ab7917b 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mbuf.9,v 1.9 2003/03/14 19:29:54 jason Exp $ +.\" $OpenBSD: mbuf.9,v 1.10 2003/03/14 19:44:32 jason Exp $ .\" .\" Copyright (c) 2001 Jean-Jacques Bernard-Gundol <jjbg@openbsd.org> .\" All rights reserved. @@ -41,12 +41,12 @@ .Fn m_free "struct mbuf *m" .Fn MFREE "struct mbuf *m" "struct mbuf *n" .Ft struct mbuf * -.Fn m_get "int nowait" "int type" +.Fn m_get "int how" "int type" .Fn MGET "struct mbuf *m" "int how" "int type" .Ft struct mbuf * -.Fn m_getclr "int nowait" "int type" +.Fn m_getclr "int how" "int type" .Ft struct mbuf * -.Fn m_gethdr "int nowait" "int type" +.Fn m_gethdr "int how" "int type" .Fn MGETHDR "struct mbuf *m" "int how" "int type" .Ft struct mbuf * .Fn m_prepend "struct mbuf *m" "int len" "int how" @@ -359,30 +359,49 @@ to point to the next mbuf in the chain if it exists. See .Fn m_free . -.It Fn m_get "int nowait" "int type" +.It Fn m_get "int how" "int type" Return a pointer to an mbuf of the type specified. +If the +.Fa how +argument is +.Fa M_WAITOK , +the function may call +.Xr sleep 9 +to await resources. +If how is +.Fa M_DONTWAIT +and resources are not available, +.Fn m_get +returns NULL. .It Fn MGET "m" "how" "type" Return a pointer to an mbuf in .Fa m of the type specified. -Returns NULL on failure. See -.Fn m_get . -.It Fn m_getclr "int nowait" "int type" +.Fn m_get +for a description of +.Fa how . +.It Fn m_getclr "int how" "int type" Return a pointer to an mbuf of the type specified, and clear the data area of the mbuf. -Returns NULL on failure. -.It Fn m_gethdr "int nowait" "int type" -Return a pointer to an mbuf after initializing it to contain a packet -header. -Returns NULL on failure. -The type is specified. +See +.Fn m_get +for a description of +.Fa how . +.It Fn m_gethdr "int how" "int type" +Return a pointer to an mbuf of the type specified after initializing +it to contain a packet header. +See +.Fn m_get +for a description of +.Fa how . .It Fn MGETHDR "m" "int how" "int type" -Return a pointer to an mbuf in m after initializing it to contain a -packet header. -Returns NULL on failure. +Return a pointer to an mbuf of the type specified after initializing +it to contain a packet header. See -.Fn m_gethdr . +.Fn m_get +for a description of +.Fa how . .It Fn m_prepend "struct mbuf *m" "int len" "int how" Allocate a new mbuf and prepend it to the mbuf chain pointed to by .Fa m . @@ -394,6 +413,10 @@ The return value is a pointer on the new mbuf chain. If this function fails to allocate a new mbuf, .Fa m is freed. +See +.Fn m_get +for a description of +.Fa how . .It Fn M_PREPEND "m" "plen" "how" Prepend space of size .Fa plen @@ -550,12 +573,20 @@ casted to Allocate and add an mbuf cluster to the mbuf pointed to by .Fa m . On success, 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 and add it to the mbuf pointed to by .Fa m . On success, the flag M_EXT is set in the mbuf. +See +.Fn m_get +for a description of +.Fa how . .It Fn MEXTADD "struct mbuf *m" "caddr_t buf" "int type" \ "void (*free)(caddr_t, u_int, void *)" "void *arg" Add pre-allocated storage to the mbuf pointed to by |