xref: /titanic_51/usr/src/man/man9f/msgpullup.9f (revision 036abaca93ddab92ba33036159c30112ab844810)
te
Copyright (c) 2006, 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]
msgpullup 9F "16 Jan 2006" "SunOS 5.11" "Kernel Functions for Drivers"
NAME
msgpullup - concatenate bytes in a message
SYNOPSIS

#include <sys/stream.h>



mblk_t *msgpullup(mblk_t *mp, ssize_t len);
INTERFACE LEVEL

Architecture independent level 1 (DDI/DKI).

PARAMETERS

mp

Pointer to the message whose blocks are to be concatenated.

len

Number of bytes to concatenate.

DESCRIPTION

The msgpullup() function concatenates and aligns the first len data bytes of the message pointed to by mp, copying the data into a new message. Any remaining bytes in the remaining message blocks will be copied and linked onto the new message. The original message is unaltered. If len equals -1, all data are concatenated. If len bytes of the same message type cannot be found, msgpullup() fails and returns NULL.

RETURN VALUES

The msgpullup function returns the following values:

Non-null

Successful completion. A pointer to the new message is returned.

NULL

An error occurred.

CONTEXT

The msgpullup() function can be called from user, interrupt, or kernel context.

SEE ALSO

srv(9E), allocb(9F), pullupmsg(9F), msgb(9S)

Writing Device Drivers

STREAMS Programming Guide

NOTES

The msgpullup() function is a DKI-compliant replacement for the older pullupmsg(9F) routine. Users are strongly encouraged to use msgpullup() instead of pullupmsg(9F).