12.07.2015 Views

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

INTRO (9) NetBSD Kernel Developer's Manual INTRO (9) NAME ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

M_TAG (9) <strong>NetBSD</strong> <strong>Kernel</strong> Developer’s <strong>Manual</strong> M_TAG (9)m_tag_prepend(m , t)Prepend the mbuf tag t to the mbuf m. t will become the first tag of the mbuf m. When m isfreed, t will also be freed.m_tag_unlink(m , t)Unlink the mbuf tag t from the mbuf m.m_tag_delete(m , t)The same as m_tag_unlink() followed by m_tag_free().m_tag_delete_chain(m , t)Unlink and free mbuf tags beginning with the mbuf tag 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_tag_delete_nonpersistent(m)Unlink and free all non persistent tags associated with the mbuf m.m_tag_find(m , type , t)Find an mbuf tag with type type after the mbuf tag t in the tag chain associated with the mbufm. If t is NULL, search from the first mbuf tag. If an mbuf tag is found, return a pointer to it.Otherwise return NULL.m_tag_copy(t)Copy anmbuf tag t. Return a new mbuf tag on success. Otherwise return NULL.m_tag_copy_chain(to , from)Copy all mbuf tags associated with the mbuf from to the mbuf to. If to already has any mbuftags, they will be unlinked and freed beforehand. Return 1 on success. Otherwise return 0.m_tag_init(m)Initialize mbuf tag chain of the mbuf m.m_tag_first(m)Return the first mbuf tag associated with the mbuf m. Return NULL if no mbuf tags are found.m_tag_next(m , t)Return the next mbuf tag after t associated with the mbuf m. Return NULL if t is the last tag inthe chain.CODE REFERENCESThis section describes places within the <strong>NetBSD</strong> source tree where actual code implementing the mbuf tagginginterfaces can be found. All pathnames are relative to /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.SEE ALSOintro(9), malloc(9), mbuf(9)BUGSThe semantics of the term "persistent tag" are vague.<strong>NetBSD</strong> 3.0 September 7, 2004 2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!