9103 opengroup acknowledgement should be properly formatted in man pages
[unleashed.git] / usr / src / man / man3head / stropts.h.3head
blob3449c340aa64aff44faf574152a0acbaca71113e
1 .\"
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/.
6 .\"
7 .\" The Institute of Electrical and Electronics Engineers and The Open
8 .\" Group, have given us permission to reprint portions of their
9 .\" documentation.
10 .\"
11 .\" In the following statement, the phrase ``this text'' refers to portions
12 .\" of the system documentation.
13 .\"
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.
24 .\"
25 .\" This notice shall appear on any product containing this material.
26 .\"
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.
30 .\"
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.
35 .\"
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]
41 .\"
42 .\"
43 .\" Copyright (c) 2001, The IEEE and The Open Group.  All Rights Reserved.
44 .\" Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
45 .\"
46 .TH STROPTS.H 3HEAD "Sep 10, 2004"
47 .SH NAME
48 stropts.h, stropts \- STREAMS interface (STREAMS)
49 .SH SYNOPSIS
50 .LP
51 .nf
52 #include <\fBstropts.h\fR>
53 .fi
55 .SH DESCRIPTION
56 .sp
57 .LP
58 The <\fBstropts.h\fR> header defines the \fBbandinfo\fR structure, which
59 includes the following members:
60 .sp
61 .in +2
62 .nf
63 unsigned char bi_pri     /* priority band */
64 int           bi_flag    /* flushing type */
65 .fi
66 .in -2
68 .sp
69 .LP
70 The <\fBstropts.h\fR> header defines the \fBstrpeek\fR structure that includes
71 the following members:
72 .sp
73 .in +2
74 .nf
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 */
78 .fi
79 .in -2
81 .sp
82 .LP
83 The <\fBstropts.h\fR> header defines the \fBstrbuf\fR structure that includes
84 the following members:
85 .sp
86 .in +2
87 .nf
88 int  maxlen     /* maximum buffer length */
89 int  len        /* length of data */
90 char *buf       /* pointer to buffer */
91 .fi
92 .in -2
94 .sp
95 .LP
96 The <\fBstropts.h\fR> header defines the \fBstrfdinsert\fR structure that
97 includes the following members:
98 .sp
99 .in +2
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 */
107 .in -2
111 The <\fBstropts.h\fR> header defines the \fBstrioctl\fR structure that includes
112 the following members:
114 .in +2
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 */
121 .in -2
125 The <\fBstropts.h\fR> header defines the \fBstrrecvfd\fR structure that
126 includes the following members:
128 .in +2
130 int   fda     /* received file descriptor */
131 uid_t uid     /* UID of sender */
132 gid_t gid     /* GID of sender */
134 .in -2
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
144 least 32 bits.
147 The <\fBstropts.h\fR> header defines the \fBstr_list\fR structure that includes
148 the following members:
150 .in +2
152 int              sl_nmods        /* number of STREAMS module names */
153 struct str_mlist *sl_modlist     /* STREAMS module names */
155 .in -2
159 The <\fBstropts.h\fR> header defines the \fBstr_mlist\fR structure that
160 includes the following member:
162 .ne 2
164 \fB\fBchar l_name[FMNAMESZ+1]\fR\fR
166 .RS 27n
167 a STREAMS module name
172 The following macros are defined for use as the request argument to
173 \fBioctl()\fR:
175 .ne 2
177 \fB\fBI_PUSH\fR\fR
179 .RS 15n
180 Push a STREAMS module.
184 .ne 2
186 \fB\fBI_POP\fR\fR
188 .RS 15n
189 Pop a STREAMS module.
193 .ne 2
195 \fB\fBI_LOOK\fR\fR
197 .RS 15n
198 Get the top module name.
202 .ne 2
204 \fB\fBI_FLUSH\fR\fR
206 .RS 15n
207 Flush a stream.
211 .ne 2
213 \fB\fBI_FLUSHBAND\fR\fR
215 .RS 15n
216 Flush one band of a stream.
220 .ne 2
222 \fB\fBI_SETSIG\fR\fR
224 .RS 15n
225 Ask for notification signals.
229 .ne 2
231 \fB\fBI_GETSIG\fR\fR
233 .RS 15n
234 Retrieve current notification signals.
238 .ne 2
240 \fB\fBI_FIND\fR\fR
242 .RS 15n
243 Look for a STREAMS module.
247 .ne 2
249 \fB\fBI_PEEK\fR\fR
251 .RS 15n
252 Peek at the top message on a stream.
256 .ne 2
258 \fB\fBI_SRDOPT\fR\fR
260 .RS 15n
261 Set the read mode.
265 .ne 2
267 \fB\fBI_GRDOPT\fR\fR
269 .RS 15n
270 Get the read mode.
274 .ne 2
276 \fB\fBI_NREAD\fR\fR
278 .RS 15n
279 Size the top message.
283 .ne 2
285 \fB\fBI_FDINSERT\fR\fR
287 .RS 15n
288 Send implementation-defined information about another stream.
292 .ne 2
294 \fB\fBI_STR\fR\fR
296 .RS 15n
297 Send a STREAMS \fBioctl()\fR.
301 .ne 2
303 \fB\fBI_SWROPT\fR\fR
305 .RS 15n
306 Set the write mode.
310 .ne 2
312 \fB\fBI_GWROPT\fR\fR
314 .RS 15n
315 Get the write mode.
319 .ne 2
321 \fB\fBI_SENDFD\fR\fR
323 .RS 15n
324 Pass a file descriptor through a STREAMS pipe.
328 .ne 2
330 \fB\fBI_RECVFD\fR\fR
332 .RS 15n
333 Get a file descriptor sent via I_SENDFD.
337 .ne 2
339 \fB\fBI_LIST\fR\fR
341 .RS 15n
342 Get all the module names on a stream.
346 .ne 2
348 \fB\fBI_ATMARK\fR\fR
350 .RS 15n
351 Is the top message ``marked''?
355 .ne 2
357 \fB\fBI_CKBAND\fR\fR
359 .RS 15n
360 See if any messages exist in a band.
364 .ne 2
366 \fB\fBI_GETBAND\fR\fR
368 .RS 15n
369 Get the band of the top message on a stream.
373 .ne 2
375 \fB\fBI_CANPUT\fR\fR
377 .RS 15n
378 Is a band writable?
382 .ne 2
384 \fB\fBI_SETCLTIME\fR\fR
386 .RS 15n
387 Set close time delay.
391 .ne 2
393 \fB\fBI_GETCLTIME\fR\fR
395 .RS 15n
396 Get close time delay.
400 .ne 2
402 \fB\fBI_LINK\fR\fR
404 .RS 15n
405 Connect two streams.
409 .ne 2
411 \fB\fBI_UNLINK\fR\fR
413 .RS 15n
414 Disconnect two streams.
418 .ne 2
420 \fB\fBI_PLINK\fR\fR
422 .RS 15n
423 Persistently connect two streams.
427 .ne 2
429 \fB\fBI_PUNLINK\fR\fR
431 .RS 15n
432 Dismantle a persistent STREAMS link.
437 The following macro is defined for use with \fBI_LOOK\fR:
439 .ne 2
441 \fB\fBFMNAMESZ\fR\fR
443 .RS 12n
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:
451 .ne 2
453 \fB\fBFLUSHR\fR\fR
455 .RS 11n
456 flush read queues
460 .ne 2
462 \fB\fBFLUSHW\fR\fR
464 .RS 11n
465 flush write queues
469 .ne 2
471 \fB\fBFLUSHRW\fR\fR
473 .RS 11n
474 flush read and write queues
479 The following macros are defined for use with \fBI_SETSIG\fR:
481 .ne 2
483 \fB\fBS_RDNORM\fR\fR
485 .RS 13n
486 A normal (priority band set to 0)  message has arrived at the head of a stream
487 head read queue.
491 .ne 2
493 \fB\fBS_RDBAND\fR\fR
495 .RS 13n
496 A message with a non-zero priority band has arrived at the head of a stream
497 head read queue.
501 .ne 2
503 \fB\fBS_INPUT\fR\fR
505 .RS 13n
506 A message, other than a high-priority message, has arrived at the head of a
507 stream head read queue.
511 .ne 2
513 \fB\fBS_HIPRI\fR\fR
515 .RS 13n
516 A high-priority message is present on a stream head read queue.
520 .ne 2
522 \fB\fBS_OUTPUT\fR\fR
524 .RS 13n
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.
531 .ne 2
533 \fB\fBS_WRNORM\fR\fR
535 .RS 13n
536 Equivalent to \fBS_OUTPUT\fR.
540 .ne 2
542 \fB\fBS_WRBAND\fR\fR
544 .RS 13n
545 The write queue for a non-zero priority band just below the stream head is no
546 longer full.
550 .ne 2
552 \fB\fBS_MSG\fR\fR
554 .RS 13n
555 A STREAMS signal message that contains the \fBSIGPOLL\fR signal reaches the
556 front of the stream head read queue.
560 .ne 2
562 \fB\fBS_ERROR\fR\fR
564 .RS 13n
565 Notification of an error condition reaches the stream head.
569 .ne 2
571 \fB\fBS_HANGUP\fR\fR
573 .RS 13n
574 Notification of a hangup reaches the stream head.
578 .ne 2
580 \fB\fBS_BANDURG\fR\fR
582 .RS 13n
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
585 read queue.
590 The following macro is defined for use with \fBI_PEEK\fR:
592 .ne 2
594 \fB\fBRS_HIPRI\fR\fR
596 .RS 12n
597 Only look for high-priority messages.
602 The following macros are defined for use with \fBI_SRDOPT\fR:
604 .ne 2
606 \fB\fBRNORM\fR\fR
608 .RS 13n
609 Byte-stream mode, the default.
613 .ne 2
615 \fB\fBRMSGD\fR\fR
617 .RS 13n
618 Message-discard mode.
622 .ne 2
624 \fB\fBRMSGN\fR\fR
626 .RS 13n
627 Message-non-discard mode.
631 .ne 2
633 \fB\fBRPROTNORM\fR\fR
635 .RS 13n
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.
641 .ne 2
643 \fB\fBRPROTDAT\fR\fR
645 .RS 13n
646 Deliver the control part of a message as data when a process issues a
647 \fBread()\fR
651 .ne 2
653 \fB\fBRPROTDIS\fR\fR
655 .RS 13n
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:
664 .ne 2
666 \fB\fBSNDZERO\fR\fR
668 .RS 11n
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:
676 .ne 2
678 \fB\fBANYMARK\fR\fR
680 .RS 12n
681 Check if the message is marked.
685 .ne 2
687 \fB\fBLASTMARK\fR\fR
689 .RS 12n
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:
697 .ne 2
699 \fB\fBMUXID_ALL\fR\fR
701 .RS 13n
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:
710 .ne 2
712 \fB\fBMSG_ANY\fR\fR
714 .RS 13n
715 Receive any message.
719 .ne 2
721 \fB\fBMSG_BAND\fR\fR
723 .RS 13n
724 Receive message from specified band.
728 .ne 2
730 \fB\fBMSG_HIPRI\fR\fR
732 .RS 13n
733 Send/receive high-priority message.
737 .ne 2
739 \fB\fBMORECTL\fR\fR
741 .RS 13n
742 More control information is left in message.
746 .ne 2
748 \fB\fBMOREDATA\fR\fR
750 .RS 13n
751 More data is left in message.
756 The <\fBstropts.h\fR> header can make visible all of the symbols from
757 <\fBunistd.h\fR>.
758 .SH ATTRIBUTES
761 See \fBattributes\fR(5) for descriptions of the following attributes:
766 box;
767 c | c
768 l | l .
769 ATTRIBUTE TYPE  ATTRIBUTE VALUE
771 Interface Stability     Standard
774 .SH SEE ALSO
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)