xref: /illumos-gate/usr/src/ucbhead/sys/ioctl.h (revision 8c0b080c)
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 1997 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 /*
31  * University Copyright- Copyright (c) 1982, 1986, 1988
32  * The Regents of the University of California
33  * All Rights Reserved
34  *
35  * University Acknowledgment- Portions of this document are derived from
36  * software developed by the University of California, Berkeley, and its
37  * contributors.
38  */
39 
40 /*
41  *      There are some inherent problems in having a single file
42  *      ioctl.h, with both System V and BSD flags. Introducing
43  * 	BSD flags into this file creates compilation problems
44  *	with flags such as ECHO, NL1 etc., if termio.h and ioctl.h
45  *      are included by the same file. Since these two files can
46  * 	be only included by System V applications, /usr/include/sys/ioctl.h
47  *      will be System V mode and all the BSD flags will be turned off
48  *      using #ifdef BSD_COMP. This file will also exist in
49  *	/usr/ucbinclude/sys/ioctl.h for BSD applications but without the
50  *      BSD flags turned off. System V appliactions can use ioctl.h without
51  *      any changes, System V applications requiring BSD flags should
52  *      -D BSD_COMP when compiling (and be warned about the common
53  *      flags between System V and BSD) and BSD applications should
54  * 	use /usr/ucbinclude/sys/ioctl.h.
55  *
56  */
57 
58 #ifndef _SYS_IOCTL_H
59 #define	_SYS_IOCTL_H
60 
61 #define	IOCTYPE	0xff00
62 
63 #define	LIOC	('l'<<8)
64 #define	LIOCGETP	(LIOC|1)
65 #define	LIOCSETP	(LIOC|2)
66 #define	LIOCGETS	(LIOC|5)
67 #define	LIOCSETS	(LIOC|6)
68 
69 #define	DIOC	('d'<<8)
70 #define	DIOCGETC	(DIOC|1)
71 #define	DIOCGETB	(DIOC|2)
72 #define	DIOCSETE	(DIOC|3)
73 
74 /* BSD related defines */
75 
76 #include <sys/types.h>
77 #include <sys/ttychars.h>
78 #include <sys/ttydev.h>
79 #include <sys/ttold.h>
80 
81 #define	TANDEM		O_TANDEM
82 #define	CBREAK		O_CBREAK
83 #ifndef _SGTTY_H
84 #define	LCASE		O_LCASE
85 #define	ECHO		O_ECHO
86 #define	CRMOD		O_CRMOD
87 #define	RAW		O_RAW
88 #define	ODDP		O_ODDP
89 #define	EVENP		O_EVENP
90 #define	ANYP		O_ANYP
91 #define	NLDELAY		O_NLDELAY
92 #define		NL0		O_NL0
93 #define		NL1		O_NL1
94 #define		NL2		O_NL2
95 #define		NL3		O_NL3
96 #define	TBDELAY		O_TBDELAY
97 #define		TAB0		O_TAB0
98 #define		TAB1		O_TAB1
99 #define		TAB2		O_TAB2
100 #define	XTABS		O_XTABS
101 #define	CRDELAY		O_CRDELAY
102 #define		CR0		O_CR0
103 #define		CR1		O_CR1
104 #define		CR2		O_CR2
105 #define		CR3		O_CR3
106 #define	VTDELAY		O_VTDELAY
107 #define		FF0		O_FF0
108 #define		FF1		O_FF1
109 #define	BSDELAY		O_BSDELAY
110 #define		BS0		O_BS0
111 #define		BS1		O_BS1
112 #define		ALLDELAY	O_ALLDELAY
113 #endif /* _SGTTY_H */
114 #define	CRTBS		O_CRTBS
115 #define	PRTERA		O_PRTERA
116 #define	CRTERA		O_CRTERA
117 #define	TILDE		O_TILDE
118 #define	MDMBUF		O_MDMBUF
119 #define	LITOUT		O_LITOUT
120 #define	TOSTOP		O_TOSTOP
121 #define	FLUSHO		O_FLUSHO
122 #define	NOHANG		O_NOHANG
123 #define	L001000		O_L001000
124 #define	CRTKIL		O_CRTKIL
125 #define	PASS8		O_PASS8
126 #define	CTLECH		O_CTLECH
127 #define	PENDIN		O_PENDIN
128 #define	DECCTQ		O_DECCTQ
129 #define	NOFLSH		O_NOFLSH
130 
131 #define	TIOCGSIZE	TIOCGWINSZ
132 #define	TIOCSSIZE	TIOCSWINSZ
133 
134 #ifndef tIOC
135 #define	tIOC    ('t'<<8)
136 #endif
137 
138 #ifndef TIOCGPGRP
139 #define	TIOCGPGRP	(tIOC|20)	/* get pgrp of tty */
140 #define	TIOCSPGRP	(tIOC|21)	/* set pgrp of tty */
141 #endif
142 
143 #include <sys/filio.h>
144 #include <sys/sockio.h>
145 
146 #endif	/* _SYS_IOCTL_H */
147