Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
Kernel Functions for Driversmsgpullup(9F)


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

 

msgpullup() 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

 

msgpullup returns the following values:

Non-null
Successful completion. A pointer to the new message is returned.
NULL
An error occurred.

CONTEXT

 

msgpullup() can be called from user or interrupt context.

SEE ALSO

 

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

Writing Device Drivers

STREAMS Programming Guide

NOTES

 

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


SunOS 5.9Go To TopLast Changed 11 Nov 1996

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.