Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
#include <sys/stream.h> #include <sys/strsun.h> int miocpullup(mblk_t *mp, size_t size);
Solaris DDI specific (Solaris DDI).
mp
M_IOCTL message.
size
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