Creates a copy of all or part of a list of mbuf structures.
Item | Description |
---|---|
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.