xref: /titanic_50/usr/src/uts/common/sys/termio.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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 /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23 /*	  All Rights Reserved  	*/
24 
25 
26 #ifndef _SYS_TERMIO_H
27 #define	_SYS_TERMIO_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"	/* SVr4.0 11.11 */
30 
31 #include <sys/termios.h>
32 
33 #ifdef	__cplusplus
34 extern "C" {
35 #endif
36 
37 /* all the ioctl codes and flags are now in termios.h */
38 
39 /*
40  * Ioctl control packet
41  */
42 struct termio {
43 	unsigned short	c_iflag;	/* input modes */
44 	unsigned short	c_oflag;	/* output modes */
45 	unsigned short	c_cflag;	/* control modes */
46 	unsigned short	c_lflag;	/* line discipline modes */
47 	char	c_line;		/* line discipline */
48 	unsigned char	c_cc[_NCC];	/* control chars */
49 };
50 
51 #define	IOCTYPE	0xff00
52 
53 
54 /*
55  * structure of ioctl arg for LDGETT and LDSETT
56  */
57 struct	termcb	{
58 	char	st_flgs;	/* term flags */
59 	char	st_termt;	/* term type */
60 	char	st_crow;	/* gtty only - current row */
61 	char	st_ccol;	/* gtty only - current col */
62 	char	st_vrow;	/* variable row */
63 	char	st_lrow;	/* last row */
64 };
65 
66 #ifndef u3b15
67 #define	SSPEED	7	/* default speed: 300 baud */
68 #else
69 #define	SSPEED	9	/* default speed: 1200 baud */
70 #endif
71 
72 #ifdef u3b15
73 #define	TTYTYPE (_TIOC|8)
74 #endif
75 #define	TCDSET	(_TIOC|32)
76 
77 /*
78  * Terminal types
79  */
80 #define	TERM_NONE	0	/* tty */
81 #define	TERM_TEC	1	/* TEC Scope */
82 #define	TERM_V61	2	/* DEC VT61 */
83 #define	TERM_V10	3	/* DEC VT100 */
84 #define	TERM_TEX	4	/* Tektronix 4023 */
85 #define	TERM_D40	5	/* TTY Mod 40/1 */
86 #define	TERM_H45	6	/* Hewlitt-Packard 45 */
87 #define	TERM_D42	7	/* TTY Mod 40/2B */
88 
89 /*
90  * Terminal flags
91  */
92 #define	TM_NONE		0000	/* use default flags */
93 #define	TM_SNL		0001	/* special newline flag */
94 #define	TM_ANL		0002	/* auto newline on column 80 */
95 #define	TM_LCF		0004	/* last col of last row special */
96 #define	TM_CECHO	0010	/* echo terminal cursor control */
97 #define	TM_CINVIS	0020	/* do not send esc seq to user */
98 #define	TM_SET		0200	/* must be on to set/res flags */
99 
100 #ifdef	__cplusplus
101 }
102 #endif
103 
104 #endif	/* _SYS_TERMIO_H */
105