MIOCPULLUP(9F) Kernel Functions for Drivers MIOCPULLUP(9F)

miocpullup - Prepare the payload of an M_IOCTL message for access

#include <sys/stream.h>
#include <sys/strsun.h>
int miocpullup(mblk_t *mp, size_t size);

illumos DDI specific (illumos DDI).

M_IOCTL message.


Number of bytes to prepare.

The miocpullup() function prepares the payload of the specified M_IOCTL message for access by ensuring that it consists of at least size bytes of data.

If the M_IOCTL message is transparent, or its total payload is less than size bytes, an error is returned. Otherwise, the payload is concatenated as necessary to provide contiguous access to at least size bytes of data. As a special case, if size is zero, miocpullup() returns successfully, even if no payload exists.

Zero is returned on success. Otherwise an errno value is returned indicating the problem.

This function can be called from user, kernel or interrupt context.

STREAMS Programming Guide
June 9, 2004 OmniOS