mexchange man page on SmartOS

Man page or keyword search:  
man Server   16655 pages
apropos Keyword Search (all sections)
Output format
SmartOS logo
[printable version]

MEXCHANGE(9F)							 MEXCHANGE(9F)

NAME
       mexchange - Exchange one message for another

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

       mblk_t *mexchange(queue_t *wq, mblk_t *mp, size_t size,
	    uchar_t type, int32_t primtype);

INTERFACE LEVEL
       Solaris DDI specific (Solaris DDI).

PARAMETERS
       wq
		   Optionally,	write  queue associated with the read queue to
		   be used on failure (see below).

       mp
		   Optionally, the message to exchange.

       size
		   Size of the returned message.

       type
		   Type of the returned message.

       primtype
		   Optionally, a 4 byte value to store at the beginning of the
		   returned message.

DESCRIPTION
       The  mexchange()	 function  exchanges the passed in message for another
       message of the specified size and type.

       If mp is not NULL, is of at least size bytes, and has only  one	refer‐
       ence  (see dupmsg(9F)), mp is converted to be of the specified size and
       type. Otherwise, a new message of the specified size and type is	 allo‐
       cated.  If allocation fails, and wq is not NULL, merror(9F) attempts to
       send an error to the stream head.

       Finally, if primtype is not -1 and size is at least 4 bytes, the	 first
       4  bytes	 are  assigned	to  be	primtype.  This	 is chiefly useful for
       STREAMS-based protocols such as DLPI and TPI which store	 the  protocol
       message type in the first 4 bytes of each message.

RETURN VALUES
       A  pointer  to  the  requested  message is returned on success. NULL is
       returned on failure.

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

SEE ALSO
       dupmsg(9F), merror(9F)

       STREAMS Programming Guide

				  Jun 9, 2004			 MEXCHANGE(9F)
[top]

List of man pages available for SmartOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net