summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2004-10-09 13:25:19 +0000
committerglebius <glebius@FreeBSD.org>2004-10-09 13:25:19 +0000
commit0c7bb9f633cd6804fdc80dc3bf4b9e6d3781f85b (patch)
tree2147d29faa0ab375bc3aab3bb1f570a107256410 /share
parent80780fc5fc83abf44c53f3c8c728b4e4037cf24d (diff)
downloadFreeBSD-src-0c7bb9f633cd6804fdc80dc3bf4b9e6d3781f85b.zip
FreeBSD-src-0c7bb9f633cd6804fdc80dc3bf4b9e6d3781f85b.tar.gz
Remove inlined m_tag_free(). Rename _m_tag_free() to m_tag_free()
and make it visible (same way as in OpenBSD). Describe usage in manpage. This change is useful for creating custom free methods, which call default free method at their end. While here, make malloc declaration for mbuf tags more informative. Approved by: julian (mentor), sam MFC after: 1 month
Diffstat (limited to 'share')
-rw-r--r--share/man/man9/mbuf_tags.918
1 files changed, 11 insertions, 7 deletions
diff --git a/share/man/man9/mbuf_tags.9 b/share/man/man9/mbuf_tags.9
index ab74791..6992b05 100644
--- a/share/man/man9/mbuf_tags.9
+++ b/share/man/man9/mbuf_tags.9
@@ -91,8 +91,7 @@ fields are set to type, length,
and
cookie, respectively.
.Va m_tag_free
-points to
-.Xr free 9 .
+points to a function which will be used to free this tag.
Following this structure are
.Va m_tag_len
bytes of space that can be used to store tag-specific information.
@@ -194,11 +193,16 @@ Return the first tag associated with
.It Fn m_tag_free tag
Free
.Fa tag
-using its
-.Va m_tag_free
-method.
-.Xr free 9
-is used by default.
+using default free method.
+This function should only be used at the end of a custom free method.
+It should never be used to free a packet tag of an unknown origination.
+To perform the latter
+.Fn m_tag_delete
+should be used in case of an attached
+.Fa tag
+or (tag->m_tag_free)(tag)
+should be called in case of a detached
+.Fa tag .
.It Fn m_tag_init mbuf
Initialize the tag storage for packet
.Fa mbuf .
OpenPOWER on IntegriCloud