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