2 .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Copyright 1989 AT&T
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH STROPTIONS 9S "Nov 14, 1996"
9 stroptions \- options structure for M_SETOPTS message
13 #include <sys/stream.h>
14 #include <sys/stropts.h>
16 #include <sys/sunddi.h>
22 Architecture independent level 1 (DDI/DKI)
26 The \fBM_SETOPTS\fR message contains a \fBstroptions\fR structure and is used
27 to control options in the stream head.
32 uint_t so_flags; /* options to set */
33 short so_readopt; /* read option */
34 ushort_t so_wroff; /* write offset */
35 ssize_t so_minpsz; /* minimum read packet size */
36 ssize_t so_maxpsz; /* maximum read packet size */
37 size_t so_hiwat; /* read queue high water mark */
38 size_t so_lowat; /* read queue low water mark */
39 unsigned char so_band; /* band for water marks */
40 ushort_t so_erropt; /* error option */
46 The following are the flags that can be set in the \fBso_flags\fR bit mask in
47 the \fBstroptions\fR structure. Note that multiple flags can be set.
51 \fB\fBSO_READOPT\fR\fR
72 Set minimum packet size
81 Set maximum packet size.
105 \fB\fBSO_MREADON\fR\fR
108 Set read notification ON.
114 \fB\fBSO_MREADOFF\fR\fR
117 Set read notification OFF.
123 \fB\fBSO_NDELON\fR\fR
126 Old TTY semantics for NDELAY reads and writes.
132 \fB\fBSO_NDELOFFSTREAMS\fR\fR
135 Semantics for NDELAY reads and writes.
144 The stream is acting as a terminal.
150 \fB\fBSO_ISNTTY\fR\fR
153 The stream is not acting as a terminal.
159 \fB\fBSO_TOSTOP\fR\fR
162 Stop on background writes to this stream.
168 \fB\fBSO_TONSTOP\fR\fR
171 Do not stop on background writes to this stream.
180 Water marks affect band.
186 \fB\fBSO_ERROPT\fR\fR
194 When \fBSO_READOPT\fR is set, the \fBso_readopt\fR field of the
195 \fBstroptions\fR structure can take one of the following values. See
212 Read message discard.
221 Read message, no discard.
226 When \fBSO_BAND\fR is set, \fBso_band\fR determines to which band
227 \fBso_hiwat\fR and \fBso_lowat\fR apply.
230 When \fBSO_ERROPT\fR is set, the \fBso_erropt\fR field of the \fBstroptions\fR
231 structure can take a value that is either none or one of:
238 Persistent read errors; default.
244 \fB\fBRERRNONPERSIST\fR\fR
247 Non-persistent read errors.
252 \fBOR'ed \fRwith either none or one of:
259 Persistent write errors; default.
265 \fB\fBWERRNONPERSIST\fR\fR
268 Non-persistent write errors.
274 \fBread\fR(2), \fBstreamio\fR(7I)
277 \fISTREAMS Programming Guide\fR