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

m_copydata Kernel Service

Purpose

Copies data from an mbuf chain to a specified buffer.

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <sys/mbuf.h>
void m_copydata (m, off, len, cp)
struct mbuf  *m;
int  off;
int  len;
caddr_t  cp;

Parameters

m Indicates 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.
cp Points to a data buffer into which to copy the mbuf data.

Description

The m_copydata kernel service 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. The data is copied into the buffer specified by the cp parameter.

Execution Environment

The m_copydata kernel service can be called from either the process or interrupt environment.

Return Values

The mcopydata service has no return values.

Implementation Specifics

The m_copydata kernel service is part of Base Operating System (BOS) Runtime.

Related Information

The m_copy macro.

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


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