2 .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
4 .\" http://www.opengroup.org/bookstore/.
5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
6 .\" This notice shall appear on any product containing this material.
7 .\" 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.
8 .\" 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.
9 .\" 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]
10 .TH STROPTS.H 3HEAD "Sep 10, 2004"
12 stropts.h, stropts \- STREAMS interface (STREAMS)
16 #include <\fBstropts.h\fR>
22 The <\fBstropts.h\fR> header defines the \fBbandinfo\fR structure, which
23 includes the following members:
27 unsigned char bi_pri /* priority band */
28 int bi_flag /* flushing type */
34 The <\fBstropts.h\fR> header defines the \fBstrpeek\fR structure that includes
35 the following members:
39 struct strbuf ctlbuf /* control portion of the message */
40 struct strbuf databuf /* data portion of the message */
41 t_uscalar_t flags /* RS_HIPRI or 0 */
47 The <\fBstropts.h\fR> header defines the \fBstrbuf\fR structure that includes
48 the following members:
52 int maxlen /* maximum buffer length */
53 int len /* length of data */
54 char *buf /* pointer to buffer */
60 The <\fBstropts.h\fR> header defines the \fBstrfdinsert\fR structure that
61 includes the following members:
65 struct strbuf ctlbuf /* control portion of the message */
66 struct strbuf databuf /* data portion of the message */
67 t_uscalar_t flags /* RS_HIPRI or 0 */
68 int fildes /* file descriptor of the other stream */
69 int offset /* relative location of the stored value */
75 The <\fBstropts.h\fR> header defines the \fBstrioctl\fR structure that includes
76 the following members:
80 int ic_cmd /* ioctl() command */
81 int ic_timout /* timeout for response */
82 int ic_len /* length of data */
83 char *ic_dp /* pointer to buffer */
89 The <\fBstropts.h\fR> header defines the \fBstrrecvfd\fR structure that
90 includes the following members:
94 int fda /* received file descriptor */
95 uid_t uid /* UID of sender */
96 gid_t gid /* GID of sender */
102 The \fBuid_t\fR and \fBgid_t\fR types are defined through \fBtypedef\fR as
103 described in <\fBsys/types.h\fR>. See \fBtypes.h\fR(3HEAD).
106 The <\fBstropts.h\fR> header defines the \fBt_scalar_t\fR and \fBt_uscalar_t\fR
107 types, respectively, as signed and unsigned opaque types of equal length of at
111 The <\fBstropts.h\fR> header defines the \fBstr_list\fR structure that includes
112 the following members:
116 int sl_nmods /* number of STREAMS module names */
117 struct str_mlist *sl_modlist /* STREAMS module names */
123 The <\fBstropts.h\fR> header defines the \fBstr_mlist\fR structure that
124 includes the following member:
128 \fB\fBchar l_name[FMNAMESZ+1]\fR\fR
131 a STREAMS module name
136 The following macros are defined for use as the request argument to
144 Push a STREAMS module.
153 Pop a STREAMS module.
162 Get the top module name.
177 \fB\fBI_FLUSHBAND\fR\fR
180 Flush one band of a stream.
189 Ask for notification signals.
198 Retrieve current notification signals.
207 Look for a STREAMS module.
216 Peek at the top message on a stream.
243 Size the top message.
249 \fB\fBI_FDINSERT\fR\fR
252 Send implementation-defined information about another stream.
261 Send a STREAMS \fBioctl()\fR.
288 Pass a file descriptor through a STREAMS pipe.
297 Get a file descriptor sent via I_SENDFD.
306 Get all the module names on a stream.
315 Is the top message ``marked''?
324 See if any messages exist in a band.
330 \fB\fBI_GETBAND\fR\fR
333 Get the band of the top message on a stream.
348 \fB\fBI_SETCLTIME\fR\fR
351 Set close time delay.
357 \fB\fBI_GETCLTIME\fR\fR
360 Get close time delay.
378 Disconnect two streams.
387 Persistently connect two streams.
393 \fB\fBI_PUNLINK\fR\fR
396 Dismantle a persistent STREAMS link.
401 The following macro is defined for use with \fBI_LOOK\fR:
408 minimum size in bytes of the buffer referred to by the \fBarg\fR argument
413 The following macros are defined for use with \fBI_FLUSH\fR:
438 flush read and write queues
443 The following macros are defined for use with \fBI_SETSIG\fR:
450 A normal (priority band set to 0) message has arrived at the head of a stream
460 A message with a non-zero priority band has arrived at the head of a stream
470 A message, other than a high-priority message, has arrived at the head of a
471 stream head read queue.
480 A high-priority message is present on a stream head read queue.
489 The write queue for normal data (priority band 0) just below the stream head is
490 no longer full. This notifies the process that there is room on the queue for
491 sending (or writing) normal data downstream.
500 Equivalent to \fBS_OUTPUT\fR.
509 The write queue for a non-zero priority band just below the stream head is no
519 A STREAMS signal message that contains the \fBSIGPOLL\fR signal reaches the
520 front of the stream head read queue.
529 Notification of an error condition reaches the stream head.
538 Notification of a hangup reaches the stream head.
544 \fB\fBS_BANDURG\fR\fR
547 When used in conjunction with \fBS_RDBAND\fR, \fBSIGURG\fR is generated instead
548 of \fBSIGPOLL\fR when a priority message reaches the front of the stream head
554 The following macro is defined for use with \fBI_PEEK\fR:
561 Only look for high-priority messages.
566 The following macros are defined for use with \fBI_SRDOPT\fR:
573 Byte-stream mode, the default.
582 Message-discard mode.
591 Message-non-discard mode.
597 \fB\fBRPROTNORM\fR\fR
600 Fail \fBread()\fR with \fB[EBADMSG]\fR if a message containing a control part
601 is at the front of the stream head read queue.
610 Deliver the control part of a message as data when a process issues a
620 Discard the control part of a message, delivering any data part, when a process
621 issues a \fBread()\fR
626 The following macro is defined for use with \fBI_SWOPT\fR:
633 Send a zero-length message downstream when a \fBwrite()\fR of 0 bytes occurs.
638 The following macros are defined for use with \fBI_ATMARK\fR:
645 Check if the message is marked.
654 Check if the message is the last one marked on the queue.
659 The following macro is defined for use with \fBI_UNLINK\fR:
663 \fB\fBMUXID_ALL\fR\fR
666 Unlink all stream linked to the stream associated with \fBfildes\fR.
671 The following macros are defined for \fBgetmsg()\fR, \fBgetpmsg()\fR,
672 \fBputmsg()\fR, and \fBputpmsg()\fR:
688 Receive message from specified band.
694 \fB\fBMSG_HIPRI\fR\fR
697 Send/receive high-priority message.
706 More control information is left in message.
715 More data is left in message.
720 The <\fBstropts.h\fR> header can make visible all of the symbols from
725 See \fBattributes\fR(5) for descriptions of the following attributes:
733 ATTRIBUTE TYPE ATTRIBUTE VALUE
735 Interface Stability Standard
741 \fBclose\fR(2), \fBfcntl\fR(2), \fBgetmsg\fR(2), \fBioctl\fR(2), \fBopen\fR(2),
742 \fBpipe\fR(2), \fBpoll\fR(2), \fBputmsg\fR(2), \fBread\fR(2), \fBwrite\fR(2),
743 \fBsignal\fR(3C), \fBtypes.h\fR(3HEAD), \fBunistd.h\fR(3HEAD),
744 \fBattributes\fR(5), \fBstandards\fR(5)