Creates a copy of all or part of a list of mbuf structures.
#include <sys/mbuf.h>
struct mbuf *m_copy (m, off, len) struct mbuf *m; int off; int len;
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. |
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.
The m_copy macro can be called from either the process or interrupt environment.
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.
The m_copy macro is part of Base Operating System (BOS) Runtime.
The m_copydata kernel service, m_copym kernel service.
I/O Kernel Services in AIX Kernel Extensions and Device Support Programming Concepts.