xref: /titanic_53/usr/src/cmd/ttymon/sttytable.c (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
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 /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate /*
28*7c478bd9Sstevel@tonic-gate  * Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T
29*7c478bd9Sstevel@tonic-gate  * All Rights Reserved
30*7c478bd9Sstevel@tonic-gate  *
31*7c478bd9Sstevel@tonic-gate  */
32*7c478bd9Sstevel@tonic-gate 
33*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
34*7c478bd9Sstevel@tonic-gate 
35*7c478bd9Sstevel@tonic-gate #include <stdio.h>
36*7c478bd9Sstevel@tonic-gate #include <sys/types.h>
37*7c478bd9Sstevel@tonic-gate #include <termio.h>
38*7c478bd9Sstevel@tonic-gate #include <sys/stermio.h>
39*7c478bd9Sstevel@tonic-gate #include <sys/termiox.h>
40*7c478bd9Sstevel@tonic-gate #include "stty.h"
41*7c478bd9Sstevel@tonic-gate 
42*7c478bd9Sstevel@tonic-gate const struct	speeds speeds[] = {
43*7c478bd9Sstevel@tonic-gate 	"0",		B0,		0,
44*7c478bd9Sstevel@tonic-gate 	"50",		B50,		50,
45*7c478bd9Sstevel@tonic-gate 	"75",		B75,		75,
46*7c478bd9Sstevel@tonic-gate 	"110",		B110,		110,
47*7c478bd9Sstevel@tonic-gate 	"134",		B134,		134,
48*7c478bd9Sstevel@tonic-gate 	"134.5", 	B134,		134,
49*7c478bd9Sstevel@tonic-gate 	"150",		B150,		150,
50*7c478bd9Sstevel@tonic-gate 	"200",		B200,		200,
51*7c478bd9Sstevel@tonic-gate 	"300",		B300,		300,
52*7c478bd9Sstevel@tonic-gate 	"600",		B600,		600,
53*7c478bd9Sstevel@tonic-gate 	"1200",		B1200,		1200,
54*7c478bd9Sstevel@tonic-gate 	"1800",		B1800,		1800,
55*7c478bd9Sstevel@tonic-gate 	"2400",		B2400,		2400,
56*7c478bd9Sstevel@tonic-gate 	"4800",		B4800,		4800,
57*7c478bd9Sstevel@tonic-gate 	"9600",		B9600,		9600,
58*7c478bd9Sstevel@tonic-gate 	"19200",	B19200,		19200,
59*7c478bd9Sstevel@tonic-gate 	"19.2",		B19200,		19200,
60*7c478bd9Sstevel@tonic-gate 	"38400",	B38400,		38400,
61*7c478bd9Sstevel@tonic-gate 	"38.4",		B38400,		38400,
62*7c478bd9Sstevel@tonic-gate 	"57600",	B57600,		57600,
63*7c478bd9Sstevel@tonic-gate 	"57.6",		B57600,		57600,
64*7c478bd9Sstevel@tonic-gate 	"76800",	B76800,		76800,
65*7c478bd9Sstevel@tonic-gate 	"76.8",		B76800,		76800,
66*7c478bd9Sstevel@tonic-gate 	"115200",	B115200,	115200,
67*7c478bd9Sstevel@tonic-gate 	"115.2",	B115200,	115200,
68*7c478bd9Sstevel@tonic-gate 	"153600",	B153600,	153600,
69*7c478bd9Sstevel@tonic-gate 	"153.6",	B153600,	153600,
70*7c478bd9Sstevel@tonic-gate 	"230400",	B230400,	230400,
71*7c478bd9Sstevel@tonic-gate 	"230.4",	B230400,	230400,
72*7c478bd9Sstevel@tonic-gate 	"307200",	B307200,	307200,
73*7c478bd9Sstevel@tonic-gate 	"307.2",	B307200,	307200,
74*7c478bd9Sstevel@tonic-gate 	"460800",	B460800,	460800,
75*7c478bd9Sstevel@tonic-gate 	"460.8",	B460800,	460800,
76*7c478bd9Sstevel@tonic-gate 	0,
77*7c478bd9Sstevel@tonic-gate };
78*7c478bd9Sstevel@tonic-gate 
79*7c478bd9Sstevel@tonic-gate const struct mds cmodes[] = {
80*7c478bd9Sstevel@tonic-gate 	"-parity", CS8, PARENB|CSIZE,
81*7c478bd9Sstevel@tonic-gate 	"-evenp", CS8, PARENB|CSIZE,
82*7c478bd9Sstevel@tonic-gate 	"-oddp", CS8, PARENB|PARODD|CSIZE,
83*7c478bd9Sstevel@tonic-gate 	"parity", PARENB|CS7, PARODD|CSIZE,
84*7c478bd9Sstevel@tonic-gate 	"evenp", PARENB|CS7, PARODD|CSIZE,
85*7c478bd9Sstevel@tonic-gate 	"oddp", PARENB|PARODD|CS7, CSIZE,
86*7c478bd9Sstevel@tonic-gate 	"parenb", PARENB, 0,
87*7c478bd9Sstevel@tonic-gate 	"-parenb", 0, PARENB,
88*7c478bd9Sstevel@tonic-gate 	"parodd", PARODD, 0,
89*7c478bd9Sstevel@tonic-gate 	"-parodd", 0, PARODD,
90*7c478bd9Sstevel@tonic-gate 	"cs8", CS8, CSIZE,
91*7c478bd9Sstevel@tonic-gate 	"cs7", CS7, CSIZE,
92*7c478bd9Sstevel@tonic-gate 	"cs6", CS6, CSIZE,
93*7c478bd9Sstevel@tonic-gate 	"cs5", CS5, CSIZE,
94*7c478bd9Sstevel@tonic-gate 	"cstopb", CSTOPB, 0,
95*7c478bd9Sstevel@tonic-gate 	"-cstopb", 0, CSTOPB,
96*7c478bd9Sstevel@tonic-gate 	"hupcl", HUPCL, 0,
97*7c478bd9Sstevel@tonic-gate 	"hup", HUPCL, 0,
98*7c478bd9Sstevel@tonic-gate 	"-hupcl", 0, HUPCL,
99*7c478bd9Sstevel@tonic-gate 	"-hup", 0, HUPCL,
100*7c478bd9Sstevel@tonic-gate 	"clocal", CLOCAL, 0,
101*7c478bd9Sstevel@tonic-gate 	"-clocal", 0, CLOCAL,
102*7c478bd9Sstevel@tonic-gate 	"loblk", LOBLK, 0,
103*7c478bd9Sstevel@tonic-gate 	"-loblk", 0, LOBLK,
104*7c478bd9Sstevel@tonic-gate 	"cread", CREAD, 0,
105*7c478bd9Sstevel@tonic-gate 	"-cread", 0, CREAD,
106*7c478bd9Sstevel@tonic-gate 	"crtscts", (long)CRTSCTS, 0,
107*7c478bd9Sstevel@tonic-gate 	"-crtscts", 0, (long)CRTSCTS,
108*7c478bd9Sstevel@tonic-gate 	"crtsxoff", CRTSXOFF, 0,
109*7c478bd9Sstevel@tonic-gate 	"-crtsxoff", 0, CRTSXOFF,
110*7c478bd9Sstevel@tonic-gate 	"raw", CS8, (CSIZE|PARENB),
111*7c478bd9Sstevel@tonic-gate 	"-raw", (CS7|PARENB), CSIZE,
112*7c478bd9Sstevel@tonic-gate 	"cooked", (CS7|PARENB), CSIZE,
113*7c478bd9Sstevel@tonic-gate 	"sane", (CS7|PARENB|CREAD), (CSIZE|PARODD|CLOCAL),
114*7c478bd9Sstevel@tonic-gate 	0
115*7c478bd9Sstevel@tonic-gate };
116*7c478bd9Sstevel@tonic-gate 
117*7c478bd9Sstevel@tonic-gate const struct mds ncmodes[] = {
118*7c478bd9Sstevel@tonic-gate 	"parext", PAREXT, 0,
119*7c478bd9Sstevel@tonic-gate 	"-parext", 0, PAREXT,
120*7c478bd9Sstevel@tonic-gate 	"markp", (PARENB|PARODD|CS7|PAREXT), CSIZE,
121*7c478bd9Sstevel@tonic-gate 	"-markp", CS8, (PARENB|PARODD|CSIZE|PAREXT),
122*7c478bd9Sstevel@tonic-gate 	"spacep", (PARENB|CS7|PAREXT), PARODD|CSIZE,
123*7c478bd9Sstevel@tonic-gate 	"-spacep", CS8, (PARENB|CSIZE|PAREXT),
124*7c478bd9Sstevel@tonic-gate 	0
125*7c478bd9Sstevel@tonic-gate };
126*7c478bd9Sstevel@tonic-gate 
127*7c478bd9Sstevel@tonic-gate const struct mds imodes[] = {
128*7c478bd9Sstevel@tonic-gate 	"ignbrk", IGNBRK, 0,
129*7c478bd9Sstevel@tonic-gate 	"-ignbrk", 0, IGNBRK,
130*7c478bd9Sstevel@tonic-gate 	"brkint", BRKINT, 0,
131*7c478bd9Sstevel@tonic-gate 	"-brkint", 0, BRKINT,
132*7c478bd9Sstevel@tonic-gate 	"ignpar", IGNPAR, 0,
133*7c478bd9Sstevel@tonic-gate 	"-ignpar", 0, IGNPAR,
134*7c478bd9Sstevel@tonic-gate 	"parmrk", PARMRK, 0,
135*7c478bd9Sstevel@tonic-gate 	"-parmrk", 0, PARMRK,
136*7c478bd9Sstevel@tonic-gate 	"inpck", INPCK, 0,
137*7c478bd9Sstevel@tonic-gate 	"-inpck", 0, INPCK,
138*7c478bd9Sstevel@tonic-gate 	"istrip", ISTRIP, 0,
139*7c478bd9Sstevel@tonic-gate 	"-istrip", 0, ISTRIP,
140*7c478bd9Sstevel@tonic-gate 	"inlcr", INLCR, 0,
141*7c478bd9Sstevel@tonic-gate 	"-inlcr", 0, INLCR,
142*7c478bd9Sstevel@tonic-gate 	"igncr", IGNCR, 0,
143*7c478bd9Sstevel@tonic-gate 	"-igncr", 0, IGNCR,
144*7c478bd9Sstevel@tonic-gate 	"icrnl", ICRNL, 0,
145*7c478bd9Sstevel@tonic-gate 	"-icrnl", 0, ICRNL,
146*7c478bd9Sstevel@tonic-gate #ifdef XPG4
147*7c478bd9Sstevel@tonic-gate 	"-nl", 0, (ICRNL|INLCR|IGNCR),
148*7c478bd9Sstevel@tonic-gate 	"nl", ICRNL, 0,
149*7c478bd9Sstevel@tonic-gate #else
150*7c478bd9Sstevel@tonic-gate 	"-nl", ICRNL, (INLCR|IGNCR),
151*7c478bd9Sstevel@tonic-gate 	"nl", 0, ICRNL,
152*7c478bd9Sstevel@tonic-gate #endif
153*7c478bd9Sstevel@tonic-gate 	"iuclc", IUCLC, 0,
154*7c478bd9Sstevel@tonic-gate 	"-iuclc", 0, IUCLC,
155*7c478bd9Sstevel@tonic-gate 	"lcase", IUCLC, 0,
156*7c478bd9Sstevel@tonic-gate 	"-lcase", 0, IUCLC,
157*7c478bd9Sstevel@tonic-gate 	"LCASE", IUCLC, 0,
158*7c478bd9Sstevel@tonic-gate 	"-LCASE", 0, IUCLC,
159*7c478bd9Sstevel@tonic-gate 	"ixon", IXON, 0,
160*7c478bd9Sstevel@tonic-gate 	"-ixon", 0, IXON,
161*7c478bd9Sstevel@tonic-gate 	"ixany", IXANY, 0,
162*7c478bd9Sstevel@tonic-gate 	"-ixany", 0, IXANY,
163*7c478bd9Sstevel@tonic-gate 	"ixoff", IXOFF, 0,
164*7c478bd9Sstevel@tonic-gate 	"-ixoff", 0, IXOFF,
165*7c478bd9Sstevel@tonic-gate 	"raw", 0, -1,
166*7c478bd9Sstevel@tonic-gate 	"-raw", (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON), 0,
167*7c478bd9Sstevel@tonic-gate 	"cooked", (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON), 0,
168*7c478bd9Sstevel@tonic-gate 	"sane", (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON|IMAXBEL),
169*7c478bd9Sstevel@tonic-gate 		(IGNBRK|PARMRK|INPCK|INLCR|IGNCR|IUCLC|IXOFF|IXANY),
170*7c478bd9Sstevel@tonic-gate 	0
171*7c478bd9Sstevel@tonic-gate };
172*7c478bd9Sstevel@tonic-gate 
173*7c478bd9Sstevel@tonic-gate 
174*7c478bd9Sstevel@tonic-gate const struct mds nimodes[] = {
175*7c478bd9Sstevel@tonic-gate 	"imaxbel", IMAXBEL, 0,
176*7c478bd9Sstevel@tonic-gate 	"-imaxbel", 0, IMAXBEL,
177*7c478bd9Sstevel@tonic-gate 	0
178*7c478bd9Sstevel@tonic-gate };
179*7c478bd9Sstevel@tonic-gate 
180*7c478bd9Sstevel@tonic-gate const struct mds lmodes[] = {
181*7c478bd9Sstevel@tonic-gate 	"isig", ISIG, 0,
182*7c478bd9Sstevel@tonic-gate 	"-isig", 0, ISIG,
183*7c478bd9Sstevel@tonic-gate 	"icanon", ICANON, 0,
184*7c478bd9Sstevel@tonic-gate 	"-icanon", 0, ICANON,
185*7c478bd9Sstevel@tonic-gate 	"xcase", XCASE, 0,
186*7c478bd9Sstevel@tonic-gate 	"-xcase", 0, XCASE,
187*7c478bd9Sstevel@tonic-gate 	"lcase", XCASE, 0,
188*7c478bd9Sstevel@tonic-gate 	"-lcase", 0, XCASE,
189*7c478bd9Sstevel@tonic-gate 	"LCASE", XCASE, 0,
190*7c478bd9Sstevel@tonic-gate 	"-LCASE", 0, XCASE,
191*7c478bd9Sstevel@tonic-gate 	"echo", ECHO, 0,
192*7c478bd9Sstevel@tonic-gate 	"-echo", 0, ECHO,
193*7c478bd9Sstevel@tonic-gate 	"echoe", ECHOE, 0,
194*7c478bd9Sstevel@tonic-gate 	"-echoe", 0, ECHOE,
195*7c478bd9Sstevel@tonic-gate 	"echok", ECHOK, 0,
196*7c478bd9Sstevel@tonic-gate 	"-echok", 0, ECHOK,
197*7c478bd9Sstevel@tonic-gate 	"lfkc", ECHOK, 0,
198*7c478bd9Sstevel@tonic-gate 	"-lfkc", 0, ECHOK,
199*7c478bd9Sstevel@tonic-gate 	"echonl", ECHONL, 0,
200*7c478bd9Sstevel@tonic-gate 	"-echonl", 0, ECHONL,
201*7c478bd9Sstevel@tonic-gate 	"noflsh", NOFLSH, 0,
202*7c478bd9Sstevel@tonic-gate 	"-noflsh", 0, NOFLSH,
203*7c478bd9Sstevel@tonic-gate 	"raw", 0, (ISIG|ICANON|XCASE),
204*7c478bd9Sstevel@tonic-gate 	"-raw", (ISIG|ICANON), 0,
205*7c478bd9Sstevel@tonic-gate 	"cooked", (ISIG|ICANON), 0,
206*7c478bd9Sstevel@tonic-gate 	"sane", (ISIG|ICANON|IEXTEN|ECHO|ECHOK|ECHOE|ECHOKE|ECHOCTL),
207*7c478bd9Sstevel@tonic-gate 		(XCASE|ECHONL|NOFLSH|STFLUSH|STWRAP|STAPPL),
208*7c478bd9Sstevel@tonic-gate 	"stflush", STFLUSH, 0,
209*7c478bd9Sstevel@tonic-gate 	"-stflush", 0, STFLUSH,
210*7c478bd9Sstevel@tonic-gate 	"stwrap", STWRAP, 0,
211*7c478bd9Sstevel@tonic-gate 	"-stwrap", 0, STWRAP,
212*7c478bd9Sstevel@tonic-gate 	"stappl", STAPPL, 0,
213*7c478bd9Sstevel@tonic-gate 	"-stappl", 0, STAPPL,
214*7c478bd9Sstevel@tonic-gate 	0,
215*7c478bd9Sstevel@tonic-gate };
216*7c478bd9Sstevel@tonic-gate 
217*7c478bd9Sstevel@tonic-gate const struct mds nlmodes[] = {
218*7c478bd9Sstevel@tonic-gate 	"tostop", TOSTOP, 0,
219*7c478bd9Sstevel@tonic-gate 	"-tostop", 0, TOSTOP,
220*7c478bd9Sstevel@tonic-gate 	"echoctl", ECHOCTL, 0,
221*7c478bd9Sstevel@tonic-gate 	"-echoctl", 0, ECHOCTL,
222*7c478bd9Sstevel@tonic-gate 	"echoprt", ECHOPRT, 0,
223*7c478bd9Sstevel@tonic-gate 	"-echoprt", 0, ECHOPRT,
224*7c478bd9Sstevel@tonic-gate 	"echoke", ECHOKE, 0,
225*7c478bd9Sstevel@tonic-gate 	"-echoke", 0, ECHOKE,
226*7c478bd9Sstevel@tonic-gate 	"defecho", DEFECHO, 0,
227*7c478bd9Sstevel@tonic-gate 	"-defecho", 0, DEFECHO,
228*7c478bd9Sstevel@tonic-gate 	"flusho", FLUSHO, 0,
229*7c478bd9Sstevel@tonic-gate 	"-flusho", 0, FLUSHO,
230*7c478bd9Sstevel@tonic-gate 	"pendin", PENDIN, 0,
231*7c478bd9Sstevel@tonic-gate 	"-pendin", 0, PENDIN,
232*7c478bd9Sstevel@tonic-gate 	"iexten", IEXTEN, 0,
233*7c478bd9Sstevel@tonic-gate 	"-iexten", 0, IEXTEN,
234*7c478bd9Sstevel@tonic-gate 	0
235*7c478bd9Sstevel@tonic-gate };
236*7c478bd9Sstevel@tonic-gate 
237*7c478bd9Sstevel@tonic-gate const struct mds omodes[] = {
238*7c478bd9Sstevel@tonic-gate 	"opost", OPOST, 0,
239*7c478bd9Sstevel@tonic-gate 	"-opost", 0, OPOST,
240*7c478bd9Sstevel@tonic-gate 	"olcuc", OLCUC, 0,
241*7c478bd9Sstevel@tonic-gate 	"-olcuc", 0, OLCUC,
242*7c478bd9Sstevel@tonic-gate 	"lcase", OLCUC, 0,
243*7c478bd9Sstevel@tonic-gate 	"-lcase", 0, OLCUC,
244*7c478bd9Sstevel@tonic-gate 	"LCASE", OLCUC, 0,
245*7c478bd9Sstevel@tonic-gate 	"-LCASE", 0, OLCUC,
246*7c478bd9Sstevel@tonic-gate 	"onlcr", ONLCR, 0,
247*7c478bd9Sstevel@tonic-gate 	"-onlcr", 0, ONLCR,
248*7c478bd9Sstevel@tonic-gate 	"-nl", ONLCR, (OCRNL|ONLRET),
249*7c478bd9Sstevel@tonic-gate 	"nl", 0, ONLCR,
250*7c478bd9Sstevel@tonic-gate 	"ocrnl", OCRNL, 0,
251*7c478bd9Sstevel@tonic-gate 	"-ocrnl", 0, OCRNL,
252*7c478bd9Sstevel@tonic-gate 	"onocr", ONOCR, 0,
253*7c478bd9Sstevel@tonic-gate 	"-onocr", 0, ONOCR,
254*7c478bd9Sstevel@tonic-gate 	"onlret", ONLRET, 0,
255*7c478bd9Sstevel@tonic-gate 	"-onlret", 0, ONLRET,
256*7c478bd9Sstevel@tonic-gate 	"fill", OFILL, OFDEL,
257*7c478bd9Sstevel@tonic-gate 	"-fill", 0, OFILL|OFDEL,
258*7c478bd9Sstevel@tonic-gate 	"nul-fill", OFILL, OFDEL,
259*7c478bd9Sstevel@tonic-gate 	"del-fill", OFILL|OFDEL, 0,
260*7c478bd9Sstevel@tonic-gate 	"ofill", OFILL, 0,
261*7c478bd9Sstevel@tonic-gate 	"-ofill", 0, OFILL,
262*7c478bd9Sstevel@tonic-gate 	"ofdel", OFDEL, 0,
263*7c478bd9Sstevel@tonic-gate 	"-ofdel", 0, OFDEL,
264*7c478bd9Sstevel@tonic-gate 	"cr0", CR0, CRDLY,
265*7c478bd9Sstevel@tonic-gate 	"cr1", CR1, CRDLY,
266*7c478bd9Sstevel@tonic-gate 	"cr2", CR2, CRDLY,
267*7c478bd9Sstevel@tonic-gate 	"cr3", CR3, CRDLY,
268*7c478bd9Sstevel@tonic-gate 	"tab0", TAB0, TABDLY,
269*7c478bd9Sstevel@tonic-gate 	"tabs", TAB0, TABDLY,
270*7c478bd9Sstevel@tonic-gate 	"tab1", TAB1, TABDLY,
271*7c478bd9Sstevel@tonic-gate 	"tab2", TAB2, TABDLY,
272*7c478bd9Sstevel@tonic-gate 	"tab3", TAB3, TABDLY,
273*7c478bd9Sstevel@tonic-gate 	"-tabs", TAB3, TABDLY,
274*7c478bd9Sstevel@tonic-gate 	"tab8", TAB3, TABDLY,
275*7c478bd9Sstevel@tonic-gate 	"nl0", NL0, NLDLY,
276*7c478bd9Sstevel@tonic-gate 	"nl1", NL1, NLDLY,
277*7c478bd9Sstevel@tonic-gate 	"ff0", FF0, FFDLY,
278*7c478bd9Sstevel@tonic-gate 	"ff1", FF1, FFDLY,
279*7c478bd9Sstevel@tonic-gate 	"vt0", VT0, VTDLY,
280*7c478bd9Sstevel@tonic-gate 	"vt1", VT1, VTDLY,
281*7c478bd9Sstevel@tonic-gate 	"bs0", BS0, BSDLY,
282*7c478bd9Sstevel@tonic-gate 	"bs1", BS1, BSDLY,
283*7c478bd9Sstevel@tonic-gate 	"raw", 0, OPOST,
284*7c478bd9Sstevel@tonic-gate 	"-raw", OPOST, 0,
285*7c478bd9Sstevel@tonic-gate 	"cooked", OPOST, 0,
286*7c478bd9Sstevel@tonic-gate 	"tty33", CR1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY),
287*7c478bd9Sstevel@tonic-gate 	"tn300", CR1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY),
288*7c478bd9Sstevel@tonic-gate 	"ti700", CR2, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY),
289*7c478bd9Sstevel@tonic-gate 	"vt05", NL1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY),
290*7c478bd9Sstevel@tonic-gate 	"tek", FF1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY),
291*7c478bd9Sstevel@tonic-gate 	"tty37", (FF1|VT1|CR2|TAB1|NL1), (NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY),
292*7c478bd9Sstevel@tonic-gate 	"sane", (OPOST|ONLCR), (OLCUC|OCRNL|ONOCR|ONLRET|OFILL|OFDEL|
293*7c478bd9Sstevel@tonic-gate 			NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY),
294*7c478bd9Sstevel@tonic-gate 	0,
295*7c478bd9Sstevel@tonic-gate };
296*7c478bd9Sstevel@tonic-gate 
297*7c478bd9Sstevel@tonic-gate const struct mds hmodes[] = {
298*7c478bd9Sstevel@tonic-gate 	"-rtsxoff", 0, RTSXOFF,
299*7c478bd9Sstevel@tonic-gate 	"rtsxoff", RTSXOFF, 0,
300*7c478bd9Sstevel@tonic-gate 	"-ctsxon", 0, CTSXON,
301*7c478bd9Sstevel@tonic-gate 	"ctsxon", CTSXON, 0,
302*7c478bd9Sstevel@tonic-gate 	"-dtrxoff", 0, DTRXOFF,
303*7c478bd9Sstevel@tonic-gate 	"dtrxoff", DTRXOFF, 0,
304*7c478bd9Sstevel@tonic-gate 	"-cdxon", 0, CDXON,
305*7c478bd9Sstevel@tonic-gate 	"cdxon", CDXON, 0,
306*7c478bd9Sstevel@tonic-gate 	"-isxoff", 0, ISXOFF,
307*7c478bd9Sstevel@tonic-gate 	"isxoff", ISXOFF, 0,
308*7c478bd9Sstevel@tonic-gate 	0,
309*7c478bd9Sstevel@tonic-gate };
310*7c478bd9Sstevel@tonic-gate 
311*7c478bd9Sstevel@tonic-gate const struct mds clkmodes[] = {
312*7c478bd9Sstevel@tonic-gate 	"xcibrg", XCIBRG, XMTCLK,
313*7c478bd9Sstevel@tonic-gate 	"xctset", XCTSET, XMTCLK,
314*7c478bd9Sstevel@tonic-gate 	"xcrset", XCRSET, XMTCLK,
315*7c478bd9Sstevel@tonic-gate 	"rcibrg", RCIBRG, RCVCLK,
316*7c478bd9Sstevel@tonic-gate 	"rctset", RCTSET, RCVCLK,
317*7c478bd9Sstevel@tonic-gate 	"rcrset", RCRSET, RCVCLK,
318*7c478bd9Sstevel@tonic-gate 	"tsetcoff", TSETCOFF, TSETCLK,
319*7c478bd9Sstevel@tonic-gate 	"tsetcrbrg", TSETCRBRG, TSETCLK,
320*7c478bd9Sstevel@tonic-gate 	"tsetctbrg", TSETCTBRG, TSETCLK,
321*7c478bd9Sstevel@tonic-gate 	"tsetctset", TSETCTSET, TSETCLK,
322*7c478bd9Sstevel@tonic-gate 	"tsetcrset", TSETCRSET, TSETCLK,
323*7c478bd9Sstevel@tonic-gate 	"rsetcoff", RSETCOFF, RSETCLK,
324*7c478bd9Sstevel@tonic-gate 	"rsetcrbrg", RSETCRBRG, RSETCLK,
325*7c478bd9Sstevel@tonic-gate 	"rsetctbrg", RSETCTBRG, RSETCLK,
326*7c478bd9Sstevel@tonic-gate 	"rsetctset", RSETCTSET, RSETCLK,
327*7c478bd9Sstevel@tonic-gate 	"rsetcrset", RSETCRSET, RSETCLK,
328*7c478bd9Sstevel@tonic-gate 	"async", XCIBRG|RCIBRG|TSETCOFF|RSETCOFF, XMTCLK|RCVCLK|TSETCLK|RSETCLK,
329*7c478bd9Sstevel@tonic-gate 	0,
330*7c478bd9Sstevel@tonic-gate };
331*7c478bd9Sstevel@tonic-gate 
332*7c478bd9Sstevel@tonic-gate const char *not_supported[] =  {
333*7c478bd9Sstevel@tonic-gate 	"rtsxoff",
334*7c478bd9Sstevel@tonic-gate 	"ctsxon",
335*7c478bd9Sstevel@tonic-gate 	"dtrxoff",
336*7c478bd9Sstevel@tonic-gate 	"cdxon",
337*7c478bd9Sstevel@tonic-gate 	"isxoff",
338*7c478bd9Sstevel@tonic-gate 	"xcibrg",
339*7c478bd9Sstevel@tonic-gate 	"xctset",
340*7c478bd9Sstevel@tonic-gate 	"scrset",
341*7c478bd9Sstevel@tonic-gate 	"rcibrg",
342*7c478bd9Sstevel@tonic-gate 	"rctset",
343*7c478bd9Sstevel@tonic-gate 	"rcrset",
344*7c478bd9Sstevel@tonic-gate 	"tsetcoff",
345*7c478bd9Sstevel@tonic-gate 	"tsetcrbrg",
346*7c478bd9Sstevel@tonic-gate 	"rsetcbrg",
347*7c478bd9Sstevel@tonic-gate 	"rsetctbrg",
348*7c478bd9Sstevel@tonic-gate 	"rsetctset",
349*7c478bd9Sstevel@tonic-gate 	"rsetcrset",
350*7c478bd9Sstevel@tonic-gate 	0,
351*7c478bd9Sstevel@tonic-gate };
352