xref: /titanic_50/usr/src/uts/common/sys/ioctl.h (revision dbed73cbda2229fd1aa6dc5743993cae7f0a7ee9)
1 /*
2  * CDDL HEADER START
3  *
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.
8  *
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.
13  *
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]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 1991 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
28 /*	  All Rights Reserved  	*/
29 
30 #ifndef _SYS_IOCTL_H
31 #define	_SYS_IOCTL_H
32 
33 #pragma ident	"%Z%%M%	%I%	%E% SMI"
34 
35 #ifdef	__cplusplus
36 extern "C" {
37 #endif
38 
39 /*
40  *	There are some inherent problems in having a single file
41  *	ioctl.h, with both System V and BSD flags. Introducing
42  *	BSD flags into this file creates compilation problems
43  *	with flags such as ECHO, NL1 etc., if termio.h and ioctl.h
44  *	are included by the same file. Since these two files can
45  *	be only included by System V applications, /usr/inclule/sys/ioctl.h
46  *	will be System V mode and all the BSD flags will be turned off
47  *	using #ifdef BSD_COMP. This file will also exist in
48  *	/usr/ucbinclude/sys/ioctl.h for BSD applications but without the
49  *	BSD flags turned off. System V appliactions can use ioctl.h without
50  *	any changes, System V applications requiring BSD flags should
51  *	-D BSD_COMP when compiling (and be warned about the common
52  *	flags between System V and BSD) and BSD applications should
53  *	use /usr/ucbinclude/sys/ioctl.h.
54  *
55  */
56 
57 #define	IOCTYPE	0xff00
58 
59 #define	LIOC	('l'<<8)
60 #define	LIOCGETP	(LIOC|1)
61 #define	LIOCSETP	(LIOC|2)
62 #define	LIOCGETS	(LIOC|5)
63 #define	LIOCSETS	(LIOC|6)
64 
65 #define	DIOC	('d'<<8)
66 #define	DIOCGETC	(DIOC|1)
67 #define	DIOCGETB	(DIOC|2)
68 #define	DIOCSETE	(DIOC|3)
69 
70 #ifdef	__cplusplus
71 }
72 #endif
73 
74 /* BSD related defines */
75 
76 #ifdef BSD_COMP
77 
78 #include <sys/ttychars.h>
79 #include <sys/ttydev.h>
80 #include <sys/ttold.h>
81 
82 #ifdef	__cplusplus
83 extern "C" {
84 #endif
85 
86 #define	TANDEM		O_TANDEM
87 #define	CBREAK		O_CBREAK
88 #ifndef _SGTTY_H
89 #define	LCASE		O_LCASE
90 #define	ECHO		O_ECHO
91 #define	CRMOD		O_CRMOD
92 #define	RAW		O_RAW
93 #define	ODDP		O_ODDP
94 #define	EVENP		O_EVENP
95 #define	ANYP		O_ANYP
96 #define	NLDELAY		O_NLDELAY
97 #define		NL0		O_NL0
98 #define		NL1		O_NL1
99 #define		NL2		O_NL2
100 #define		NL3		O_NL3
101 #define	TBDELAY		O_TBDELAY
102 #define		TAB0		O_TAB0
103 #define		TAB1		O_TAB1
104 #define		TAB2		O_TAB2
105 #define	XTABS		O_XTABS
106 #define	CRDELAY		O_CRDELAY
107 #define		CR0		O_CR0
108 #define		CR1		O_CR1
109 #define		CR2		O_CR2
110 #define		CR3		O_CR3
111 #define	VTDELAY		O_VTDELAY
112 #define		FF0		O_FF0
113 #define		FF1		O_FF1
114 #define	BSDELAY		O_BSDELAY
115 #define		BS0		O_BS0
116 #define		BS1		O_BS1
117 #define		ALLDELAY	O_ALLDELAY
118 #endif /* _SGTTY_H */
119 #define	CRTBS		O_CRTBS
120 #define	PRTERA		O_PRTERA
121 #define	CRTERA		O_CRTERA
122 #define	TILDE		O_TILDE
123 #define	MDMBUF		O_MDMBUF
124 #define	LITOUT		O_LITOUT
125 #define	TOSTOP		O_TOSTOP
126 #define	FLUSHO		O_FLUSHO
127 #define	NOHANG		O_NOHANG
128 #define	L001000		O_L001000
129 #define	CRTKIL		O_CRTKIL
130 #define	PASS8		O_PASS8
131 #define	CTLECH		O_CTLECH
132 #define	PENDIN		O_PENDIN
133 #define	DECCTQ		O_DECCTQ
134 #define	NOFLSH		O_NOFLSH
135 
136 #ifdef	__cplusplus
137 }
138 #endif
139 
140 #include <sys/filio.h>
141 #include <sys/sockio.h>
142 
143 #endif /* BSD_COMP */
144 
145 #endif	/* _SYS_IOCTL_H */
146