struct m_tag *
m_tag_get(int type, int len, int wait)
void
m_tag_free(struct m_tag *t)
void
m_tag_prepend(struct mbuf *m, struct m_tag *t)
void
m_tag_unlink(struct mbuf *m, struct m_tag *t)
void
m_tag_delete(struct mbuf *m, struct m_tag *t)
void
m_tag_delete_chain(struct mbuf *m, struct m_tag *t)
void
m_tag_delete_nonpersistent(struct mbuf *)
struct m_tag *
m_tag_find(struct mbuf *m, int type, struct m_tag *t)
struct m_tag *
m_tag_copy(struct m_tag *m)
int
m_tag_copy_chain(struct mbuf *to, struct mbuf *from)
void
m_tag_init(struct mbuf *m)
struct m_tag *
m_tag_first(struct mbuf *m)
struct m_tag *
m_tag_next(struct mbuf *m, struct m_tag *t)
type, len, wait)type
is one of the
PACKET_TAG_
macros.
len
is the size of the data associated with the tag, in bytes.
wait
is either
M_WAITOK
or
M_NOWAIT.
t)t.
m, t)t
to the mbuf
m.
t
will become the first tag of the mbuf
m.
When
m
is freed,
t
will also be freed.
m, t)t
from the mbuf
m.
m, t))
followed by
m_tag_free().
m, t)t
from the mbuf
m.
If
t
is
NULL,
m_tag_delete_chain()
unlinks and frees all mbuf tags associated with the mbuf
m.
m)m.
m, type, t)type
after the mbuf tag
t
in the tag chain associated with the mbuf
m.
If
t
is
NULL,
search from the first mbuf tag.
If an mbuf tag is found, return a pointer to it.
Otherwise return
NULL.
t)t.
Return a new mbuf tag on success.
Otherwise return
NULL.
to, from)from
to the mbuf
to.
If
to
already has any mbuf tags, they will be unlinked and freed beforehand.
Return 1 on success.
Otherwise return 0.
m)m.
m)m.
Return
NULL
if no mbuf tags are found.
m, t)t
associated with the mbuf
m.
Return
NULL
if
t
is the last tag in the chain.
/usr/src.
The mbuf tagging interfaces are implemented within the file
sys/kern/uipc_mbuf2.c.
The
PACKET_TAG_
macros are defined in the file
sys/sys/mbuf.h.