- macOS 10.4–10.15.4Deprecated
The first mbuf in the chain to copy the data in to.
Offset in bytes to skip before copying data.
The length, in bytes, of the data to copy in to the mbuf chain.
A pointer to data in the kernel's address space.
Blocking or non-blocking.
0 upon success, EINVAL or ENOBUFS upon failure.
Copies data from a buffer to an mbuf chain. mbuf_copyback will grow the chain to fit the specified buffer.
If mbuf_copydata is unable to allocate enough mbufs to grow the chain, ENOBUFS will be returned. The mbuf chain will be shorter than expected but all of the data up to the end of the mbuf chain will be valid.
If an offset is specified, mbuf_copyback will skip that many bytes in the mbuf chain before starting to write the buffer in to the chain. If the mbuf chain does not contain this many bytes, mbufs will be allocated to create the space.