summaryrefslogtreecommitdiff
path: root/usr/src/man/man9s/stroptions.9s
blob: 3c00ba8c1346176e73d70686469cdcb95448a08b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
'\" te
.\" Copyright (c) 2002, Sun Microsystems, Inc.  All Rights Reserved.
.\" Copyright 1989 AT&T
.\" 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]
.TH stroptions 9S "14 Nov 1996" "SunOS 5.11" "Data Structures for Drivers"
.SH NAME
stroptions \- options structure for M_SETOPTS message
.SH SYNOPSIS
.LP
.nf
#include <sys/stream.h>
#include <sys/stropts.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
.fi

.SH INTERFACE LEVEL
.sp
.LP
Architecture independent level 1 (DDI/DKI)
.SH DESCRIPTION
.sp
.LP
The \fBM_SETOPTS\fR message contains a \fBstroptions\fR structure and is used
to control options in the stream head.
.SH STRUCTURE MEMBERS
.sp
.in +2
.nf
uint_t           so_flags;      /* options to set */
short            so_readopt;    /* read option */
ushort_t         so_wroff;      /* write offset */
ssize_t          so_minpsz;     /* minimum read packet size */
ssize_t          so_maxpsz;     /* maximum read packet size */
size_t           so_hiwat;      /* read queue high water mark */
size_t           so_lowat;      /* read queue low water mark */
unsigned char    so_band;       /* band for water marks */
ushort_t         so_erropt;     /* error option */
.fi
.in -2

.sp
.LP
The following are the flags that can be set in the \fBso_flags\fR bit mask in
the \fBstroptions\fR structure.  Note that multiple flags can be set.
.sp
.ne 2
.mk
.na
\fB\fBSO_READOPT\fR\fR
.ad
.RS 21n
.rt  
Set read option.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_WROFF\fR\fR
.ad
.RS 21n
.rt  
Set write offset.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_MINPSZ\fR\fR
.ad
.RS 21n
.rt  
Set minimum packet size
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_MAXPSZ\fR\fR
.ad
.RS 21n
.rt  
Set maximum packet size.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_HIWAT\fR\fR
.ad
.RS 21n
.rt  
Set high water mark.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_LOWAT\fR\fR
.ad
.RS 21n
.rt  
Set low water mark.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_MREADON\fR\fR
.ad
.RS 21n
.rt  
Set read notification ON.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_MREADOFF\fR\fR
.ad
.RS 21n
.rt  
Set read notification OFF.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_NDELON\fR\fR
.ad
.RS 21n
.rt  
Old TTY semantics for NDELAY reads and writes.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_NDELOFFSTREAMS\fR\fR
.ad
.RS 21n
.rt  
Semantics for NDELAY reads and writes.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_ISTTY\fR\fR
.ad
.RS 21n
.rt  
The stream is acting as a terminal.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_ISNTTY\fR\fR
.ad
.RS 21n
.rt  
The stream is not acting as a terminal.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_TOSTOP\fR\fR
.ad
.RS 21n
.rt  
Stop on background writes to this stream.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_TONSTOP\fR\fR
.ad
.RS 21n
.rt  
Do not stop on background writes to this stream.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_BAND\fR\fR
.ad
.RS 21n
.rt  
Water marks affect band.
.RE

.sp
.ne 2
.mk
.na
\fB\fBSO_ERROPT\fR\fR
.ad
.RS 21n
.rt  
Set error option.
.RE

.sp
.LP
When \fBSO_READOPT\fR is set, the \fBso_readopt\fR field of the
\fBstroptions\fR structure can take one of the following values. See
\fBread\fR(2).
.sp
.ne 2
.mk
.na
\fB\fBRNORM\fR\fR
.ad
.RS 9n
.rt  
Read message normal.
.RE

.sp
.ne 2
.mk
.na
\fB\fBRMSGD\fR\fR
.ad
.RS 9n
.rt  
Read message discard.
.RE

.sp
.ne 2
.mk
.na
\fB\fBRMSGN\fR\fR
.ad
.RS 9n
.rt  
Read message, no discard.
.RE

.sp
.LP
When \fBSO_BAND\fR is set, \fBso_band\fR determines to which band
\fBso_hiwat\fR and \fBso_lowat\fR apply.
.sp
.LP
When \fBSO_ERROPT\fR is set, the \fBso_erropt\fR field of the \fBstroptions\fR
structure can take a value that is either none or one of:
.sp
.ne 2
.mk
.na
\fB\fBRERRNORM\fR\fR
.ad
.RS 18n
.rt  
Persistent read errors; default.
.RE

.sp
.ne 2
.mk
.na
\fB\fBRERRNONPERSIST\fR\fR
.ad
.RS 18n
.rt  
Non-persistent read errors.
.RE

.sp
.LP
\fBOR'ed \fRwith either none or one of:
.sp
.ne 2
.mk
.na
\fB\fBWERRNORM\fR\fR
.ad
.RS 18n
.rt  
Persistent write errors; default.
.RE

.sp
.ne 2
.mk
.na
\fB\fBWERRNONPERSIST\fR\fR
.ad
.RS 18n
.rt  
Non-persistent write errors.
.RE

.SH SEE ALSO
.sp
.LP
\fBread\fR(2), \fBstreamio\fR(7I)
.sp
.LP
\fISTREAMS Programming Guide\fR