Creates a copy of all or part of a list of mbuf structures.
#include <sys/types.h> #include <sys/errno.h> #include <sys/mbuf.h>
The m_copym kernel service makes a copy of the mbuf structure specified by the m parameter starting at the specified offset from the beginning and continuing 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.
If the mbuf structure specified by the m parameter has an external buffer attached (that is, the M_EXT flag is set), the copy is done by reference to the external cluster. In this case, the data must not be altered or both copies will be changed. Interrupt handlers can specify the wait parameter as M_DONTWAIT only.
The m_copym kernel service can be called from either the process or interrupt environment.
The address of the copy is returned upon successful completion. If the copy fails, null is returned. If the wait parameter is set to M_DONTWAIT and there are no free mbuf structures, the m_copym kernel service returns a null value.
The m_copydata kernel service.
The m_copy macro.
I/O Kernel Services in AIX® Version 6.1 Kernel Extensions and Device Support Programming Concepts.