MTOCL Macro for mbuf Kernel Services

Purpose

Converts a pointer to an mbuf structure to a pointer to the head of an attached cluster.

Syntax

#include <sys/mbuf.h>

struct mbuf * m;
MTOCL (m);

Parameter

Item Description
m Indicates the address of the mbuf structure in question.

Description

The MTOCL macro converts a pointer to an mbuf structure to a pointer to the head of an attached cluster.

The MTOCL macro can be used as in the following example:

caddr_t attcls;
struct mbuf      *m;
attcls = (caddr_t) MTOCL(m);

Execution Environment

The MTOCL macro can be called from either the process or interrupt environment.