Hallo, dies ist ein Test.
PWD: /www/data-lst1/unixsoft/unixsoft/kaempfer/.public_html
Running in File Mode
Relative path: ./../../.././../../../usr/man/man9f/mexchange.9f
Real path: /usr/share/man/man9f/mexchange.9f
Zurück
'\" te .\" Copyright (c) 2004, 2020, Oracle and/or its affiliates. .TH mexchange 9F "9 June 2004" "Oracle Solaris 11.4" "Kernel Functions" .SH NAME mexchange \- Exchange one message for another .SH SYNOPSIS .LP .nf #include <sys/stream.h> #include <sys/strsun.h> \fBmblk_t *\fR\fBmexchange\fR(\fBqueue_t *\fR\fIwq\fR, \fBmblk_t *\fR\fImp\fR, \fBsize_t\fR \fIsize\fR, \fBuchar_t\fR \fItype\fR, \fBint32_t\fR \fIprimtype\fR); .fi .SH INTERFACE LEVEL .sp .LP Solaris DDI specific (Solaris DDI). .SH PARAMETERS .sp .ne 2 .mk .na \fB\fIwq\fR\fR .ad .RS 12n .rt Optionally, write queue associated with the read queue to be used on failure (see below). .RE .sp .ne 2 .mk .na \fB\fImp\fR\fR .ad .RS 12n .rt Optionally, the message to exchange. .RE .sp .ne 2 .mk .na \fB\fIsize\fR\fR .ad .RS 12n .rt Size of the returned message. .RE .sp .ne 2 .mk .na \fB\fItype\fR\fR .ad .RS 12n .rt Type of the returned message. .RE .sp .ne 2 .mk .na \fB\fIprimtype\fR\fR .ad .RS 12n .rt Optionally, a 4 byte value to store at the beginning of the returned message. .RE .SH DESCRIPTION .sp .LP The \fBmexchange()\fR function exchanges the passed in message for another message of the specified \fIsize\fR and \fItype\fR. .sp .LP If \fImp\fR is not NULL, is of at least \fIsize\fR bytes, and has only one reference (see \fBdupmsg\fR(9F)), \fImp\fR is converted to be of the specified \fIsize\fR and \fItype\fR. Otherwise, a new message of the specified \fIsize\fR and \fItype\fR is allocated. If allocation fails, and \fIwq\fR is not NULL, \fBmerror\fR(9F) attempts to send an error to the stream head. .sp .LP Finally, if \fIprimtype\fR is not -1 and \fIsize\fR is at least 4 bytes, the first 4 bytes are assigned to be \fIprimtype\fR. This is chiefly useful for STREAMS-based protocols such as \fBDLPI\fR and \fBTPI\fR which store the protocol message type in the first 4 bytes of each message. .SH RETURN VALUES .sp .LP A pointer to the requested message is returned on success. NULL is returned on failure. .SH CONTEXT .sp .LP This function can be called from user, kernel or interrupt context. .SH SEE ALSO .sp .LP \fBdupmsg\fR(9F), \fBmerror\fR(9F) .sp .LP \fISTREAMS Programming Guide\fR