1stropts.h(3HEAD)                    Headers                   stropts.h(3HEAD)
2
3
4

NAME

6       stropts.h, stropts - STREAMS interface (STREAMS)
7

SYNOPSIS

9       #include <stropts.h>
10
11

DESCRIPTION

13       The  <stropts.h>  header defines the bandinfo structure, which includes
14       the following members:
15
16         unsigned char bi_pri     /* priority band */
17         int           bi_flag    /* flushing type */
18
19
20
21       The <stropts.h> header defines the strpeek structure that includes  the
22       following members:
23
24         struct strbuf ctlbuf     /* control portion of the message */
25         struct strbuf databuf    /* data portion of the message */
26         t_uscalar_t   flags      /* RS_HIPRI or 0 */
27
28
29
30       The  <stropts.h>  header defines the strbuf structure that includes the
31       following members:
32
33         int  maxlen     /* maximum buffer length */
34         int  len        /* length of data */
35         char *buf       /* pointer to buffer */
36
37
38
39       The <stropts.h> header defines the strfdinsert structure that  includes
40       the following members:
41
42         struct strbuf ctlbuf     /* control portion of the message */
43         struct strbuf databuf    /* data portion of the message */
44         t_uscalar_t   flags      /* RS_HIPRI or 0 */
45         int           fildes     /* file descriptor of the other stream */
46         int           offset     /* relative location of the stored value */
47
48
49
50       The <stropts.h> header defines the strioctl structure that includes the
51       following members:
52
53         int  ic_cmd        /* ioctl() command */
54         int  ic_timout     /* timeout for response */
55         int  ic_len        /* length of data */
56         char *ic_dp        /* pointer to buffer */
57
58
59
60       The <stropts.h> header defines the strrecvfd  structure  that  includes
61       the following members:
62
63         int   fda     /* received file descriptor */
64         uid_t uid     /* UID of sender */
65         gid_t gid     /* GID of sender */
66
67
68
69       The  uid_t  and gid_t types are defined through typedef as described in
70       <sys/types.h>. See types.h(3HEAD).
71
72
73       The <stropts.h> header defines the t_scalar_t  and  t_uscalar_t  types,
74       respectively, as signed and unsigned opaque types of equal length of at
75       least 32 bits.
76
77
78       The <stropts.h> header defines the str_list structure that includes the
79       following members:
80
81         int              sl_nmods        /* number of STREAMS module names */
82         struct str_mlist *sl_modlist     /* STREAMS module names */
83
84
85
86       The  <stropts.h>  header  defines the str_mlist structure that includes
87       the following member:
88
89       char l_name[FMNAMESZ+1]    a STREAMS module name
90
91
92
93       The following macros are defined for use as  the  request  argument  to
94       ioctl():
95
96       I_PUSH         Push a STREAMS module.
97
98
99       I_POP          Pop a STREAMS module.
100
101
102       I_LOOK         Get the top module name.
103
104
105       I_FLUSH        Flush a stream.
106
107
108       I_FLUSHBAND    Flush one band of a stream.
109
110
111       I_SETSIG       Ask for notification signals.
112
113
114       I_GETSIG       Retrieve current notification signals.
115
116
117       I_FIND         Look for a STREAMS module.
118
119
120       I_PEEK         Peek at the top message on a stream.
121
122
123       I_SRDOPT       Set the read mode.
124
125
126       I_GRDOPT       Get the read mode.
127
128
129       I_NREAD        Size the top message.
130
131
132       I_FDINSERT     Send  implementation-defined  information  about another
133                      stream.
134
135
136       I_STR          Send a STREAMS ioctl().
137
138
139       I_SWROPT       Set the write mode.
140
141
142       I_GWROPT       Get the write mode.
143
144
145       I_SENDFD       Pass a file descriptor through a STREAMS pipe.
146
147
148       I_RECVFD       Get a file descriptor sent via I_SENDFD.
149
150
151       I_LIST         Get all the module names on a stream.
152
153
154       I_ATMARK       Is the top message ``marked''?
155
156
157       I_CKBAND       See if any messages exist in a band.
158
159
160       I_GETBAND      Get the band of the top message on a stream.
161
162
163       I_CANPUT       Is a band writable?
164
165
166       I_SETCLTIME    Set close time delay.
167
168
169       I_GETCLTIME    Get close time delay.
170
171
172       I_LINK         Connect two streams.
173
174
175       I_UNLINK       Disconnect two streams.
176
177
178       I_PLINK        Persistently connect two streams.
179
180
181       I_PUNLINK      Dismantle a persistent STREAMS link.
182
183
184
185       The following macro is defined for use with I_LOOK:
186
187       FMNAMESZ    minimum size in bytes of the buffer referred to by the  arg
188                   argument
189
190
191
192       The following macros are defined for use with I_FLUSH:
193
194       FLUSHR     flush read queues
195
196
197       FLUSHW     flush write queues
198
199
200       FLUSHRW    flush read and write queues
201
202
203
204       The following macros are defined for use with I_SETSIG:
205
206       S_RDNORM     A  normal (priority band set to 0)  message has arrived at
207                    the head of a stream head read queue.
208
209
210       S_RDBAND     A message with a non-zero priority band has arrived at the
211                    head of a stream head read queue.
212
213
214       S_INPUT      A message, other than a high-priority message, has arrived
215                    at the head of a stream head read queue.
216
217
218       S_HIPRI      A high-priority message is present on a stream  head  read
219                    queue.
220
221
222       S_OUTPUT     The  write  queue  for  normal data (priority band 0) just
223                    below the stream head is no longer full. This notifies the
224                    process  that  there  is room on the queue for sending (or
225                    writing) normal data downstream.
226
227
228       S_WRNORM     Equivalent to S_OUTPUT.
229
230
231       S_WRBAND     The write queue for a non-zero priority  band  just  below
232                    the stream head is no longer full.
233
234
235       S_MSG        A  STREAMS signal message that contains the SIGPOLL signal
236                    reaches the front of the stream head read queue.
237
238
239       S_ERROR      Notification of an  error  condition  reaches  the  stream
240                    head.
241
242
243       S_HANGUP     Notification of a hangup reaches the stream head.
244
245
246       S_BANDURG    When  used  in conjunction with S_RDBAND, SIGURG is gener‐
247                    ated instead of SIGPOLL when a priority   message  reaches
248                    the front of the stream head read queue.
249
250
251
252       The following macro is defined for use with I_PEEK:
253
254       RS_HIPRI    Only look for high-priority messages.
255
256
257
258       The following macros are defined for use with I_SRDOPT:
259
260       RNORM        Byte-stream mode, the default.
261
262
263       RMSGD        Message-discard mode.
264
265
266       RMSGN        Message-non-discard mode.
267
268
269       RPROTNORM    Fail  read() with [EBADMSG] if a message containing a con‐
270                    trol part is at the front of the stream head read queue.
271
272
273       RPROTDAT     Deliver the control part of  a  message  as  data  when  a
274                    process issues a read()
275
276
277       RPROTDIS     Discard the control part of a message, delivering any data
278                    part, when a process issues a read()
279
280
281
282       The following macro is defined for use with I_SWOPT:
283
284       SNDZERO    Send a zero-length message downstream when a  write()  of  0
285                  bytes occurs.
286
287
288
289       The following macros are defined for use with I_ATMARK:
290
291       ANYMARK     Check if the message is marked.
292
293
294       LASTMARK    Check if the message is the last one marked on the queue.
295
296
297
298       The following macro is defined for use with I_UNLINK:
299
300       MUXID_ALL    Unlink  all  stream  linked  to the stream associated with
301                    fildes.
302
303
304
305       The following macros are defined for getmsg(), getpmsg(), putmsg(), and
306       putpmsg():
307
308       MSG_ANY      Receive any message.
309
310
311       MSG_BAND     Receive message from specified band.
312
313
314       MSG_HIPRI    Send/receive high-priority message.
315
316
317       MORECTL      More control information is left in message.
318
319
320       MOREDATA     More data is left in message.
321
322
323
324       The  <stropts.h>  header  can  make  visible  all  of  the symbols from
325       <unistd.h>.
326

ATTRIBUTES

328       See attributes(5) for descriptions of the following attributes:
329
330
331
332
333       ┌─────────────────────────────┬─────────────────────────────┐
334       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
335       ├─────────────────────────────┼─────────────────────────────┤
336       │Interface Stability          │Standard                     │
337       └─────────────────────────────┴─────────────────────────────┘
338

SEE ALSO

340       close(2), fcntl(2), getmsg(2),  ioctl(2),  open(2),  pipe(2),  poll(2),
341       putmsg(2),     read(2),     write(2),    signal(3C),    types.h(3HEAD),
342       unistd.h(3HEAD), attributes(5), standards(5)
343
344
345
346SunOS 5.11                        10 Sep 2004                 stropts.h(3HEAD)
Impressum