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

m_copy Macro for mbuf Kernel Services

Purpose

Creates a copy of all or part of a list of mbuf structures.

Syntax

#include <sys/mbuf.h>
struct mbuf *m_copy (m, off, len)
struct mbuf *m;
int off;
int len;

Parameters

m Specifies the mbuf structure, or the head of a list of mbuf structures, to be copied.
off Specifies an offset into data from which copying starts.
len Denotes the total number of bytes to copy.

Description

The m_copy macro makes a copy of the structure specified by the m parameter. The copy begins at the specified bytes (represented by the off parameter) and continues for the number of bytes specified by the len parameter. If the len parameter is set to M_COPYALL, the entire mbuf chain is copied.

Execution Environment

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

Return Values

Upon successful completion, the address of the copied list (the mbuf structure that heads the list) is returned. If the copy fails, a value of null is returned.

Implementation Specifics

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

Related Information

The m_copydata kernel service, m_copym kernel service.

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


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