xref: /illumos-gate/usr/src/head/sgtty.h (revision b4203d757c7c247e39c94c09a94021a3a8121062)
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 /*	Copyright (c) 1988 AT&T	*/
23*7c478bd9Sstevel@tonic-gate /*	  All Rights Reserved	*/
24*7c478bd9Sstevel@tonic-gate 
25*7c478bd9Sstevel@tonic-gate 
26*7c478bd9Sstevel@tonic-gate #ifndef _SGTTY_H
27*7c478bd9Sstevel@tonic-gate #define	_SGTTY_H
28*7c478bd9Sstevel@tonic-gate 
29*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
30*7c478bd9Sstevel@tonic-gate extern "C" {
31*7c478bd9Sstevel@tonic-gate #endif
32*7c478bd9Sstevel@tonic-gate 
33*7c478bd9Sstevel@tonic-gate /*
34*7c478bd9Sstevel@tonic-gate  * Modes
35*7c478bd9Sstevel@tonic-gate  */
36*7c478bd9Sstevel@tonic-gate #define	HUPCL	01
37*7c478bd9Sstevel@tonic-gate #ifndef _SYS_IOCTL_H
38*7c478bd9Sstevel@tonic-gate #define	XTABS	02
39*7c478bd9Sstevel@tonic-gate #define	LCASE	04
40*7c478bd9Sstevel@tonic-gate #define	ECHO	010
41*7c478bd9Sstevel@tonic-gate #define	CRMOD	020
42*7c478bd9Sstevel@tonic-gate #define	RAW	040
43*7c478bd9Sstevel@tonic-gate #define	ODDP	0100
44*7c478bd9Sstevel@tonic-gate #define	EVENP	0200
45*7c478bd9Sstevel@tonic-gate #define	ANYP	0300
46*7c478bd9Sstevel@tonic-gate #define	NLDELAY	001400
47*7c478bd9Sstevel@tonic-gate #define	TBDELAY	002000
48*7c478bd9Sstevel@tonic-gate #define	CRDELAY	030000
49*7c478bd9Sstevel@tonic-gate #define	VTDELAY	040000
50*7c478bd9Sstevel@tonic-gate #define	BSDELAY 0100000
51*7c478bd9Sstevel@tonic-gate #define	ALLDELAY 0177400
52*7c478bd9Sstevel@tonic-gate 
53*7c478bd9Sstevel@tonic-gate /*
54*7c478bd9Sstevel@tonic-gate  * Delay algorithms
55*7c478bd9Sstevel@tonic-gate  */
56*7c478bd9Sstevel@tonic-gate #define	CR0	0
57*7c478bd9Sstevel@tonic-gate #define	CR1	010000
58*7c478bd9Sstevel@tonic-gate #define	CR2	020000
59*7c478bd9Sstevel@tonic-gate #define	CR3	030000
60*7c478bd9Sstevel@tonic-gate #define	NL0	0
61*7c478bd9Sstevel@tonic-gate #define	NL1	000400
62*7c478bd9Sstevel@tonic-gate #define	NL2	001000
63*7c478bd9Sstevel@tonic-gate #define	NL3	001400
64*7c478bd9Sstevel@tonic-gate #define	TAB0	0
65*7c478bd9Sstevel@tonic-gate #define	TAB1	002000
66*7c478bd9Sstevel@tonic-gate #endif /* _SYS_IOCTL_H */
67*7c478bd9Sstevel@tonic-gate #define	NOAL	004000
68*7c478bd9Sstevel@tonic-gate #ifndef _SYS_IOCTL_H
69*7c478bd9Sstevel@tonic-gate #define	FF0	0
70*7c478bd9Sstevel@tonic-gate #define	FF1	040000
71*7c478bd9Sstevel@tonic-gate #define	BS0	0
72*7c478bd9Sstevel@tonic-gate #define	BS1	0100000
73*7c478bd9Sstevel@tonic-gate #endif /* _SYS_IOCTL_H */
74*7c478bd9Sstevel@tonic-gate 
75*7c478bd9Sstevel@tonic-gate #ifndef _SYS_TTOLD_H
76*7c478bd9Sstevel@tonic-gate 
77*7c478bd9Sstevel@tonic-gate /*
78*7c478bd9Sstevel@tonic-gate  * Structure for stty and gtty system calls.
79*7c478bd9Sstevel@tonic-gate  */
80*7c478bd9Sstevel@tonic-gate struct sgttyb {
81*7c478bd9Sstevel@tonic-gate 	char	sg_ispeed;		/* input speed */
82*7c478bd9Sstevel@tonic-gate 	char	sg_ospeed;		/* output speed */
83*7c478bd9Sstevel@tonic-gate 	char	sg_erase;		/* erase character */
84*7c478bd9Sstevel@tonic-gate 	char	sg_kill;		/* kill character */
85*7c478bd9Sstevel@tonic-gate 	int	sg_flags;		/* mode flags */
86*7c478bd9Sstevel@tonic-gate };
87*7c478bd9Sstevel@tonic-gate 
88*7c478bd9Sstevel@tonic-gate /* BSD local special chars. Structure for TIOCSLTC/TIOCGLTC */
89*7c478bd9Sstevel@tonic-gate struct ltchars {
90*7c478bd9Sstevel@tonic-gate 	char	t_suspc;	/* stop process signal */
91*7c478bd9Sstevel@tonic-gate 	char	t_dsuspc;	/* delayed stop process signal */
92*7c478bd9Sstevel@tonic-gate 	char	t_rprntc;	/* reprint line */
93*7c478bd9Sstevel@tonic-gate 	char	t_flushc;	/* flush output (toggles) */
94*7c478bd9Sstevel@tonic-gate 	char	t_werasc;	/* word erase */
95*7c478bd9Sstevel@tonic-gate 	char	t_lnextc;	/* literal next character */
96*7c478bd9Sstevel@tonic-gate };
97*7c478bd9Sstevel@tonic-gate 
98*7c478bd9Sstevel@tonic-gate /*
99*7c478bd9Sstevel@tonic-gate  * Speeds
100*7c478bd9Sstevel@tonic-gate  */
101*7c478bd9Sstevel@tonic-gate #define	B0	0
102*7c478bd9Sstevel@tonic-gate #define	B50	1
103*7c478bd9Sstevel@tonic-gate #define	B75	2
104*7c478bd9Sstevel@tonic-gate #define	B110	3
105*7c478bd9Sstevel@tonic-gate #define	B134	4
106*7c478bd9Sstevel@tonic-gate #define	B150	5
107*7c478bd9Sstevel@tonic-gate #define	B200	6
108*7c478bd9Sstevel@tonic-gate #define	B300	7
109*7c478bd9Sstevel@tonic-gate #define	B600	8
110*7c478bd9Sstevel@tonic-gate #define	B1200	9
111*7c478bd9Sstevel@tonic-gate #define	B1800	10
112*7c478bd9Sstevel@tonic-gate #define	B2400	11
113*7c478bd9Sstevel@tonic-gate #define	B4800	12
114*7c478bd9Sstevel@tonic-gate #define	B9600	13
115*7c478bd9Sstevel@tonic-gate #define	EXTA	14
116*7c478bd9Sstevel@tonic-gate #define	EXTB	15
117*7c478bd9Sstevel@tonic-gate 
118*7c478bd9Sstevel@tonic-gate /*
119*7c478bd9Sstevel@tonic-gate  *	ioctl arguments
120*7c478bd9Sstevel@tonic-gate  */
121*7c478bd9Sstevel@tonic-gate #define	FIOCLEX		(('f'<<8)|1)
122*7c478bd9Sstevel@tonic-gate #define	FIONCLEX	(('f'<<8)|2)
123*7c478bd9Sstevel@tonic-gate #define	TIOCHPCL	(('t'<<8)|2)
124*7c478bd9Sstevel@tonic-gate #define	TIOCGETP	(('t'<<8)|8)
125*7c478bd9Sstevel@tonic-gate #define	TIOCSETP	(('t'<<8)|9)
126*7c478bd9Sstevel@tonic-gate #define	TIOCEXCL	(('t'<<8)|13)
127*7c478bd9Sstevel@tonic-gate #define	TIOCNXCL	(('t'<<8)|14)
128*7c478bd9Sstevel@tonic-gate 
129*7c478bd9Sstevel@tonic-gate #endif	/* _SYS_TTOLD_H */
130*7c478bd9Sstevel@tonic-gate 
131*7c478bd9Sstevel@tonic-gate #ifdef	__cplusplus
132*7c478bd9Sstevel@tonic-gate }
133*7c478bd9Sstevel@tonic-gate #endif
134*7c478bd9Sstevel@tonic-gate 
135*7c478bd9Sstevel@tonic-gate #endif	/* _SGTTY_H */
136