xref: /titanic_52/usr/src/ucbhead/sys/ioctl.h (revision fa9e4066f08beec538e775443c5be79dd423fcab)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
62 
63 #define	IOCTYPE	0xff00
64 
65 #define	LIOC	('l'<<8)
66 #define	LIOCGETP	(LIOC|1)
67 #define	LIOCSETP	(LIOC|2)
68 #define	LIOCGETS	(LIOC|5)
69 #define	LIOCSETS	(LIOC|6)
70 
71 #define	DIOC	('d'<<8)
72 #define	DIOCGETC	(DIOC|1)
73 #define	DIOCGETB	(DIOC|2)
74 #define	DIOCSETE	(DIOC|3)
75 
76 /* BSD related defines */
77 
78 #include <sys/types.h>
79 #include <sys/ttychars.h>
80 #include <sys/ttydev.h>
81 #include <sys/ttold.h>
82 
83 #define	TANDEM		O_TANDEM
84 #define	CBREAK		O_CBREAK
85 #ifndef _SGTTY_H
86 #define	LCASE		O_LCASE
87 #define	ECHO		O_ECHO
88 #define	CRMOD		O_CRMOD
89 #define	RAW		O_RAW
90 #define	ODDP		O_ODDP
91 #define	EVENP		O_EVENP
92 #define	ANYP		O_ANYP
93 #define	NLDELAY		O_NLDELAY
94 #define		NL0		O_NL0
95 #define		NL1		O_NL1
96 #define		NL2		O_NL2
97 #define		NL3		O_NL3
98 #define	TBDELAY		O_TBDELAY
99 #define		TAB0		O_TAB0
100 #define		TAB1		O_TAB1
101 #define		TAB2		O_TAB2
102 #define	XTABS		O_XTABS
103 #define	CRDELAY		O_CRDELAY
104 #define		CR0		O_CR0
105 #define		CR1		O_CR1
106 #define		CR2		O_CR2
107 #define		CR3		O_CR3
108 #define	VTDELAY		O_VTDELAY
109 #define		FF0		O_FF0
110 #define		FF1		O_FF1
111 #define	BSDELAY		O_BSDELAY
112 #define		BS0		O_BS0
113 #define		BS1		O_BS1
114 #define		ALLDELAY	O_ALLDELAY
115 #endif /* _SGTTY_H */
116 #define	CRTBS		O_CRTBS
117 #define	PRTERA		O_PRTERA
118 #define	CRTERA		O_CRTERA
119 #define	TILDE		O_TILDE
120 #define	MDMBUF		O_MDMBUF
121 #define	LITOUT		O_LITOUT
122 #define	TOSTOP		O_TOSTOP
123 #define	FLUSHO		O_FLUSHO
124 #define	NOHANG		O_NOHANG
125 #define	L001000		O_L001000
126 #define	CRTKIL		O_CRTKIL
127 #define	PASS8		O_PASS8
128 #define	CTLECH		O_CTLECH
129 #define	PENDIN		O_PENDIN
130 #define	DECCTQ		O_DECCTQ
131 #define	NOFLSH		O_NOFLSH
132 
133 #define	TIOCGSIZE	TIOCGWINSZ
134 #define	TIOCSSIZE	TIOCSWINSZ
135 
136 #ifndef tIOC
137 #define	tIOC    ('t'<<8)
138 #endif
139 
140 #ifndef TIOCGPGRP
141 #define	TIOCGPGRP	(tIOC|20)	/* get pgrp of tty */
142 #define	TIOCSPGRP	(tIOC|21)	/* set pgrp of tty */
143 #endif
144 
145 #include <sys/filio.h>
146 #include <sys/sockio.h>
147 
148 #endif	/* _SYS_IOCTL_H */
149