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
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.
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]
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
27 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
33 #pragma ident "%Z%%M% %I% %E% SMI"
40 * header file for STREAMS TTY subsystem
44 * The t_buf data structure holds information about a message
45 * block and its associated data buffer. One is used for received
46 * blocks, and another is used for blocks to be transmitted to
47 * a user terminal or a printer.
52 mblk_t
*bu_bp
; /* message block pointer */
53 unsigned char *bu_ptr
; /* data buffer pointer */
54 ushort_t bu_cnt
; /* data buffer character count */
58 * A tty structure is needed for each character device used for normal
59 * tty I/O. Each PORTS board supports 4 user terminals and 1 CENTRONICS-
65 struct t_buf t_in
; /* input buffer info */
66 struct t_buf t_out
; /* output buffer info */
67 queue_t
*t_rdqp
; /* pointer to tty read queue */
68 mblk_t
*t_ioctlp
; /* ioctl block pointer */
69 mblk_t
*t_lbuf
; /* pointer to a large data buffer */
70 int t_dev
; /* tty minor device number */
71 int t_iflag
; /* input setting flags */
72 int t_oflag
; /* output setting flags */
73 int t_cflag
; /* physical setting flags */
74 int t_lflag
; /* "line discipline" flags */
75 short t_state
; /* internal state */
76 char t_line
; /* active line discipline */
77 char t_dstat
; /* more internal state flags */
78 unsigned char t_cc
[NCCS
]; /* settable control chars */
82 * Size of internal ports data buffer, one per port
84 #define LARGEBUFSZ 512
90 #define TIMEOUT 01 /* Delay timeout in progress */
91 #define WOPEN 02 /* Waiting for open to complete */
92 #define ISOPEN 04 /* Device is open */
94 #define CARR_ON 020 /* Software copy of carrier-present */
95 #define BUSY 040 /* Output in progress */
96 #define WIOC 0100 /* Wait for ioctl to complete */
97 #define WGETTY 0200 /* opened by supergetty, waiting for getty */
98 #define TTSTOP 0400 /* Output stopped by ctl-s */
99 #define EXTPROC 01000 /* External processing */
101 #define CLESC 04000 /* Last char escape */
102 #define RTO 010000 /* Raw Timeout */
105 #define TTXOFF 0100000
107 /* l_output status */
108 #define CPRES 0100000
110 /* device commands */
121 #define T_DISCONNECT 10
125 * M_CTL message types.
127 #define MC_NO_CANON 0 /* module below saying it will canonicalize */
128 #define MC_DO_CANON 1 /* module below saying it won't canonicalize */
129 #define MC_CANONQUERY 2 /* module above asking whether module below */
131 #define MC_PART_CANON 3 /* tell line discipline to do some */
132 /* canonicalization */
133 /* XXX - These seem pretty device dependent... */
134 #define MC_SERVICEIMM 3 /* tell the ZS driver to return input */
136 #define MC_SERVICEDEF 4 /* tell the ZS driver it can wait */
137 #define MC_POSIXQUERY 5 /* check if driver has POSIX close semantics */
138 #define MC_HAS_POSIX 6 /* driver does support POSIX */
144 #endif /* _SYS_STRTTY_H */