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