2 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for
3 .\" permission to reproduce portions of its copyrighted documentation.
4 .\" Original documentation from The Open Group can be obtained online at
5 .\" http://www.opengroup.org/bookstore/.
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
14 .\" Portions of this text are reprinted and reproduced in electronic form
15 .\" in the SunOS Reference Manual, from IEEE Std 1003.1, 2004 Edition,
16 .\" Standard for Information Technology -- Portable Operating System
17 .\" Interface (POSIX), The Open Group Base Specifications Issue 6,
18 .\" Copyright (C) 2001-2004 by the Institute of Electrical and Electronics
19 .\" Engineers, Inc and The Open Group. In the event of any discrepancy
20 .\" between these versions and the original IEEE and The Open Group
21 .\" Standard, the original IEEE and The Open Group Standard is the referee
22 .\" document. The original Standard can be obtained online at
23 .\" http://www.opengroup.org/unix/online.html.
25 .\" This notice shall appear on any product containing this material.
27 .\" The contents of this file are subject to the terms of the
28 .\" Common Development and Distribution License (the "License").
29 .\" You may not use this file except in compliance with the License.
31 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
32 .\" or http://www.opensolaris.org/os/licensing.
33 .\" See the License for the specific language governing permissions
34 .\" and limitations under the License.
36 .\" When distributing Covered Code, include this CDDL HEADER in each
37 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
38 .\" If applicable, add the following below this CDDL HEADER, with the
39 .\" fields enclosed by brackets "[]" replaced with your own identifying
40 .\" information: Portions Copyright [yyyy] [name of copyright owner]
43 .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved.
44 .\" Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
46 .TH STROPTS.H 3HEAD "Sep 10, 2004"
48 stropts.h, stropts \- STREAMS interface (STREAMS)
52 #include <\fBstropts.h\fR>
58 The <\fBstropts.h\fR> header defines the \fBbandinfo\fR structure, which
59 includes the following members:
63 unsigned char bi_pri /* priority band */
64 int bi_flag /* flushing type */
70 The <\fBstropts.h\fR> header defines the \fBstrpeek\fR structure that includes
71 the following members:
75 struct strbuf ctlbuf /* control portion of the message */
76 struct strbuf databuf /* data portion of the message */
77 t_uscalar_t flags /* RS_HIPRI or 0 */
83 The <\fBstropts.h\fR> header defines the \fBstrbuf\fR structure that includes
84 the following members:
88 int maxlen /* maximum buffer length */
89 int len /* length of data */
90 char *buf /* pointer to buffer */
96 The <\fBstropts.h\fR> header defines the \fBstrfdinsert\fR structure that
97 includes the following members:
101 struct strbuf ctlbuf /* control portion of the message */
102 struct strbuf databuf /* data portion of the message */
103 t_uscalar_t flags /* RS_HIPRI or 0 */
104 int fildes /* file descriptor of the other stream */
105 int offset /* relative location of the stored value */
111 The <\fBstropts.h\fR> header defines the \fBstrioctl\fR structure that includes
112 the following members:
116 int ic_cmd /* ioctl() command */
117 int ic_timout /* timeout for response */
118 int ic_len /* length of data */
119 char *ic_dp /* pointer to buffer */
125 The <\fBstropts.h\fR> header defines the \fBstrrecvfd\fR structure that
126 includes the following members:
130 int fda /* received file descriptor */
131 uid_t uid /* UID of sender */
132 gid_t gid /* GID of sender */
138 The \fBuid_t\fR and \fBgid_t\fR types are defined through \fBtypedef\fR as
139 described in <\fBsys/types.h\fR>. See \fBtypes.h\fR(3HEAD).
142 The <\fBstropts.h\fR> header defines the \fBt_scalar_t\fR and \fBt_uscalar_t\fR
143 types, respectively, as signed and unsigned opaque types of equal length of at
147 The <\fBstropts.h\fR> header defines the \fBstr_list\fR structure that includes
148 the following members:
152 int sl_nmods /* number of STREAMS module names */
153 struct str_mlist *sl_modlist /* STREAMS module names */
159 The <\fBstropts.h\fR> header defines the \fBstr_mlist\fR structure that
160 includes the following member:
164 \fB\fBchar l_name[FMNAMESZ+1]\fR\fR
167 a STREAMS module name
172 The following macros are defined for use as the request argument to
180 Push a STREAMS module.
189 Pop a STREAMS module.
198 Get the top module name.
213 \fB\fBI_FLUSHBAND\fR\fR
216 Flush one band of a stream.
225 Ask for notification signals.
234 Retrieve current notification signals.
243 Look for a STREAMS module.
252 Peek at the top message on a stream.
279 Size the top message.
285 \fB\fBI_FDINSERT\fR\fR
288 Send implementation-defined information about another stream.
297 Send a STREAMS \fBioctl()\fR.
324 Pass a file descriptor through a STREAMS pipe.
333 Get a file descriptor sent via I_SENDFD.
342 Get all the module names on a stream.
351 Is the top message ``marked''?
360 See if any messages exist in a band.
366 \fB\fBI_GETBAND\fR\fR
369 Get the band of the top message on a stream.
384 \fB\fBI_SETCLTIME\fR\fR
387 Set close time delay.
393 \fB\fBI_GETCLTIME\fR\fR
396 Get close time delay.
414 Disconnect two streams.
423 Persistently connect two streams.
429 \fB\fBI_PUNLINK\fR\fR
432 Dismantle a persistent STREAMS link.
437 The following macro is defined for use with \fBI_LOOK\fR:
444 minimum size in bytes of the buffer referred to by the \fBarg\fR argument
449 The following macros are defined for use with \fBI_FLUSH\fR:
474 flush read and write queues
479 The following macros are defined for use with \fBI_SETSIG\fR:
486 A normal (priority band set to 0) message has arrived at the head of a stream
496 A message with a non-zero priority band has arrived at the head of a stream
506 A message, other than a high-priority message, has arrived at the head of a
507 stream head read queue.
516 A high-priority message is present on a stream head read queue.
525 The write queue for normal data (priority band 0) just below the stream head is
526 no longer full. This notifies the process that there is room on the queue for
527 sending (or writing) normal data downstream.
536 Equivalent to \fBS_OUTPUT\fR.
545 The write queue for a non-zero priority band just below the stream head is no
555 A STREAMS signal message that contains the \fBSIGPOLL\fR signal reaches the
556 front of the stream head read queue.
565 Notification of an error condition reaches the stream head.
574 Notification of a hangup reaches the stream head.
580 \fB\fBS_BANDURG\fR\fR
583 When used in conjunction with \fBS_RDBAND\fR, \fBSIGURG\fR is generated instead
584 of \fBSIGPOLL\fR when a priority message reaches the front of the stream head
590 The following macro is defined for use with \fBI_PEEK\fR:
597 Only look for high-priority messages.
602 The following macros are defined for use with \fBI_SRDOPT\fR:
609 Byte-stream mode, the default.
618 Message-discard mode.
627 Message-non-discard mode.
633 \fB\fBRPROTNORM\fR\fR
636 Fail \fBread()\fR with \fB[EBADMSG]\fR if a message containing a control part
637 is at the front of the stream head read queue.
646 Deliver the control part of a message as data when a process issues a
656 Discard the control part of a message, delivering any data part, when a process
657 issues a \fBread()\fR
662 The following macro is defined for use with \fBI_SWOPT\fR:
669 Send a zero-length message downstream when a \fBwrite()\fR of 0 bytes occurs.
674 The following macros are defined for use with \fBI_ATMARK\fR:
681 Check if the message is marked.
690 Check if the message is the last one marked on the queue.
695 The following macro is defined for use with \fBI_UNLINK\fR:
699 \fB\fBMUXID_ALL\fR\fR
702 Unlink all stream linked to the stream associated with \fBfildes\fR.
707 The following macros are defined for \fBgetmsg()\fR, \fBgetpmsg()\fR,
708 \fBputmsg()\fR, and \fBputpmsg()\fR:
724 Receive message from specified band.
730 \fB\fBMSG_HIPRI\fR\fR
733 Send/receive high-priority message.
742 More control information is left in message.
751 More data is left in message.
756 The <\fBstropts.h\fR> header can make visible all of the symbols from
761 See \fBattributes\fR(5) for descriptions of the following attributes:
769 ATTRIBUTE TYPE ATTRIBUTE VALUE
771 Interface Stability Standard
777 \fBclose\fR(2), \fBfcntl\fR(2), \fBgetmsg\fR(2), \fBioctl\fR(2), \fBopen\fR(2),
778 \fBpipe\fR(2), \fBpoll\fR(2), \fBputmsg\fR(2), \fBread\fR(2), \fBwrite\fR(2),
779 \fBsignal\fR(3C), \fBtypes.h\fR(3HEAD), \fBunistd.h\fR(3HEAD),
780 \fBattributes\fR(5), \fBstandards\fR(5)