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 */
38 * header file for STREAMS TTY subsystem
42 * The t_buf data structure holds information about a message
43 * block and its associated data buffer. One is used for received
44 * blocks, and another is used for blocks to be transmitted to
45 * a user terminal or a printer.
50 mblk_t
*bu_bp
; /* message block pointer */
51 unsigned char *bu_ptr
; /* data buffer pointer */
52 ushort_t bu_cnt
; /* data buffer character count */
56 * A tty structure is needed for each character device used for normal
57 * tty I/O. Each PORTS board supports 4 user terminals and 1 CENTRONICS-
63 struct t_buf t_in
; /* input buffer info */
64 struct t_buf t_out
; /* output buffer info */
65 queue_t
*t_rdqp
; /* pointer to tty read queue */
66 mblk_t
*t_ioctlp
; /* ioctl block pointer */
67 mblk_t
*t_lbuf
; /* pointer to a large data buffer */
68 int t_dev
; /* tty minor device number */
69 int t_iflag
; /* input setting flags */
70 int t_oflag
; /* output setting flags */
71 int t_cflag
; /* physical setting flags */
72 int t_lflag
; /* "line discipline" flags */
73 short t_state
; /* internal state */
74 char t_line
; /* active line discipline */
75 char t_dstat
; /* more internal state flags */
76 unsigned char t_cc
[NCCS
]; /* settable control chars */
80 * Size of internal ports data buffer, one per port
82 #define LARGEBUFSZ 512
88 #define TIMEOUT 01 /* Delay timeout in progress */
89 #define WOPEN 02 /* Waiting for open to complete */
90 #define ISOPEN 04 /* Device is open */
92 #define CARR_ON 020 /* Software copy of carrier-present */
93 #define BUSY 040 /* Output in progress */
94 #define WIOC 0100 /* Wait for ioctl to complete */
95 #define WGETTY 0200 /* opened by supergetty, waiting for getty */
96 #define TTSTOP 0400 /* Output stopped by ctl-s */
97 #define EXTPROC 01000 /* External processing */
99 #define CLESC 04000 /* Last char escape */
100 #define RTO 010000 /* Raw Timeout */
103 #define TTXOFF 0100000
105 /* l_output status */
106 #define CPRES 0100000
108 /* device commands */
119 #define T_DISCONNECT 10
123 * M_CTL message types.
125 #define MC_NO_CANON 0 /* module below saying it will canonicalize */
126 #define MC_DO_CANON 1 /* module below saying it won't canonicalize */
127 #define MC_CANONQUERY 2 /* module above asking whether module below */
129 #define MC_PART_CANON 3 /* tell line discipline to do some */
130 /* canonicalization */
131 /* XXX - These seem pretty device dependent... */
132 #define MC_SERVICEIMM 3 /* tell the ZS driver to return input */
134 #define MC_SERVICEDEF 4 /* tell the ZS driver it can wait */
135 #define MC_POSIXQUERY 5 /* check if driver has POSIX close semantics */
136 #define MC_HAS_POSIX 6 /* driver does support POSIX */
142 #endif /* _SYS_STRTTY_H */