8322 nl: misleading-indentation
[unleashed/tickless.git] / usr / src / lib / libbc / inc / include / sys / stropts.h
blob20418dc4391eb933049480369b728f5d86ca045d
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984 AT&T */
28 /* All Rights Reserved */
30 #ifndef _sys_stropts_h
31 #define _sys_stropts_h
33 #pragma ident "%Z%%M% %I% %E% SMI"
36 * Read options
38 #define RNORM 0 /* read msg norm */
39 #define RMSGD 1 /* read msg discard */
40 #define RMSGN 2 /* read msg no discard */
43 * Flush options
46 #define FLUSHR 1 /* flush read queue */
47 #define FLUSHW 2 /* flush write queue */
48 #define FLUSHRW 3 /* flush both queues */
51 * Events for which to be sent SIGPOLL signal
53 #define S_INPUT 001 /* regular priority msg on read Q */
54 #define S_HIPRI 002 /* high priority msg on read Q */
55 #define S_OUTPUT 004 /* write Q no longer full */
56 #define S_MSG 010 /* signal msg at front of read Q */
59 * Flags for recv() and send() syscall arguments
61 #define RS_HIPRI 1 /* send/recv high priority message */
64 * Flags returned as value of recv() syscall
66 #define MORECTL 1 /* more ctl info is left in message */
67 #define MOREDATA 2 /* more data is left in message */
69 #ifndef FMNAMESZ
70 #define FMNAMESZ 8
71 #endif
73 #include <sys/ioccom.h>
76 * Stream Ioctl defines
78 #define I_NREAD _IOR('S',01,int)
79 #define I_PUSH _IOWN('S',02,FMNAMESZ+1)
80 #define I_POP _IO('S',03)
81 #define I_LOOK _IORN('S',04,FMNAMESZ+1)
82 #define I_FLUSH _IO('S',05)
83 #define I_SRDOPT _IO('S',06)
84 #define I_GRDOPT _IOR('S',07,int)
85 #define I_STR _IOWR('S',010,struct strioctl)
86 #define I_SETSIG _IO('S',011)
87 #define I_GETSIG _IOR('S',012,int)
88 #define I_FIND _IOWN('S',013,FMNAMESZ+1)
89 #define I_LINK _IO('S',014)
90 #define I_UNLINK _IO('S',015)
91 #define I_PEEK _IOWR('S',017,struct strpeek)
92 #define I_FDINSERT _IOW('S',020,struct strfdinsert)
93 #define I_SENDFD _IO('S',021)
94 #define I_RECVFD _IOR('S',022,struct strrecvfd)
95 #define I_PLINK _IO('S',023)
96 #define I_PUNLINK _IO('S',024)
100 * User level ioctl format for ioctl that go downstream I_STR
102 struct strioctl {
103 int ic_cmd; /* command */
104 int ic_timout; /* timeout value */
105 int ic_len; /* length of data */
106 char *ic_dp; /* pointer to data */
111 * Value for timeouts (ioctl, select) that denotes infinity
113 #define INFTIM -1
117 * Stream buffer structure for send and recv system calls
119 struct strbuf {
120 int maxlen; /* no. of bytes in buffer */
121 int len; /* no. of bytes returned */
122 char *buf; /* pointer to data */
127 * stream I_PEEK ioctl format
130 struct strpeek {
131 struct strbuf ctlbuf;
132 struct strbuf databuf;
133 long flags;
137 * stream I_FDINSERT ioctl format
139 struct strfdinsert {
140 struct strbuf ctlbuf;
141 struct strbuf databuf;
142 long flags;
143 int fildes;
144 int offset;
149 * receive file descriptor structure
151 struct strrecvfd {
152 int fd;
153 unsigned short uid;
154 unsigned short gid;
155 char fill[8];
158 #endif /* !_sys_stropts_h */