[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Kernel and Subsystems Technical Reference, Volume 1

MTOD Macro for mbuf Kernel Services

Purpose

Converts a pointer to an mbuf structure to a pointer to the data stored in that mbuf structure.

Syntax

#include <sys/mbuf.h>
MTOD (m, type);

Parameters

m Identifies the address of an mbuf structure.
type Indicates the type to which the resulting pointer should be cast.

Description

The MTOD macro converts a pointer to an mbuf structure into a pointer to the data stored in the mbuf structure. This macro can be used as in the following example:

char    *bufp;
         bufp = MTOD(m, char *);

Execution Environment

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

Implementation Specifics

The MTOD macro is part of Base Operating System (BOS) Runtime.

Related Information

The DTOM macro for mbuf Kernel Services.

I/O Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]