diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-09-10 12:47:03 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2018-09-10 12:47:03 +0000 |
commit | b32233bbbcde302220cc5f0e49771a864c6b2718 (patch) | |
tree | 9099427d83dd8ee506bda9e25e0a5bbe19cdc41d /share | |
parent | e96e3be30cd1aa5b1ee0a94bf541039a6ecb4afc (diff) |
During fragment reassembly, mbuf chains with packet headers were
created. Add a new function m_removehdr() do convert packet header
mbufs within the chain to regular mbufs. Assert that the mbuf at
the beginning of the chain has a packet header.
found by Maxime Villard in NetBSD; from markus@; OK claudio@
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/mbuf.9 | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/share/man/man9/mbuf.9 b/share/man/man9/mbuf.9 index d70a070fc0a..d08f1d246e0 100644 --- a/share/man/man9/mbuf.9 +++ b/share/man/man9/mbuf.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mbuf.9,v 1.111 2018/02/11 00:27:10 dlg Exp $ +.\" $OpenBSD: mbuf.9,v 1.112 2018/09/10 12:47:02 bluhm 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: February 11 2018 $ +.Dd $Mdocdate: September 10 2018 $ .Dt MGET 9 .Os .Sh NAME @@ -35,6 +35,7 @@ .Nm MGET , .Nm m_getclr , .Nm m_gethdr , +.Nm m_removehdr , .Nm m_resethdr , .Nm MGETHDR , .Nm m_prepend , @@ -79,6 +80,8 @@ .Ft struct mbuf * .Fn m_getclr "int how" "int type" .Ft void +.Fn m_removehdr "struct mbuf *m" +.Ft void .Fn m_resethdr "struct mbuf *m" .Ft struct mbuf * .Fn m_gethdr "int how" "int type" @@ -486,11 +489,19 @@ See .Fn m_get for a description of .Fa how . +.It Fn m_removehdr "struct mbuf *m" +Convert a mbuf with packet header to one without. +Delete all +.Xr pf 4 +data and all tags attached to a +.Fa mbuf . +Keep the data and mbuf chain, clear the packet header. .It Fn m_resethdr "struct mbuf *m" -Deletes all +Delete all .Xr pf 4 data and all tags attached to a .Fa mbuf . +Keep the data and mbuf chain, initialize the packet header. .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. |