| M_TAG(9) | Kernel Developer's Manual | M_TAG(9) | 
m_tag, m_tag_get,
  m_tag_free, m_tag_prepend,
  m_tag_unlink, m_tag_delete,
  m_tag_delete_chain,
  m_tag_find, m_tag_copy,
  m_tag_copy_chain —
#include <sys/mbuf.h>
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 *
  
  m_tag_find(struct
    mbuf *m, int
  type);
struct m_tag *
  
  m_tag_copy(struct
    m_tag *m);
int
  
  m_tag_copy_chain(struct
    mbuf *to, struct mbuf
    *from);
m_tag interface is used to “tag”
  mbufs.
m_tag_get(type,
    len, wait)PACKET_TAG_ macros. len is
      the size of the data associated with the tag, in bytes.
      wait is either M_WAITOK or
      M_NOWAIT.m_tag_free(t)m_tag_prepend(m,
    t)m_tag_unlink(m,
    t)m_tag_delete(m,
    t)m_tag_unlink() followed by
      m_tag_free().m_tag_delete_chain(m)m_tag_find(m,
    type)NULL.m_tag_copy(t)NULL.m_tag_copy_chain(to,
    from)The PACKET_TAG_ macros are defined in the
    file sys/sys/mbuf.h.
| November 15, 2018 | NetBSD 10.0 |