Go to main content

man pages section 9: DDI and DKI Kernel Functions

Exit Print View

Updated: July 2017
 
 

miocpullup(9F)

Name

miocpullup - Prepare the payload of an M_IOCTL message for access

Synopsis

#include <sys/stream.h>
#include <sys/strsun.h>

int miocpullup(mblk_t *mp, size_t size);

Interface Level

Solaris DDI specific (Solaris DDI).

Parameters

mp

M_IOCTL message.

size

Number of bytes to prepare.

Description

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.

Return Values

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

Context

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

See Also

STREAMS Programming Guide