xref: /titanic_44/usr/src/ucbcmd/stty/sttytable.c (revision de81e71e031139a0a7f13b7bf64152c3faa76698)
17c478bd9Sstevel@tonic-gate /*
27c478bd9Sstevel@tonic-gate  * CDDL HEADER START
37c478bd9Sstevel@tonic-gate  *
47c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*de81e71eSTim Marsland  * Common Development and Distribution License (the "License").
6*de81e71eSTim Marsland  * You may not use this file except in compliance with the License.
77c478bd9Sstevel@tonic-gate  *
87c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
97c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
107c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
117c478bd9Sstevel@tonic-gate  * and limitations under the License.
127c478bd9Sstevel@tonic-gate  *
137c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
147c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
157c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
167c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
177c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
187c478bd9Sstevel@tonic-gate  *
197c478bd9Sstevel@tonic-gate  * CDDL HEADER END
207c478bd9Sstevel@tonic-gate  */
21*de81e71eSTim Marsland 
227c478bd9Sstevel@tonic-gate /*
23*de81e71eSTim Marsland  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
247c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
257c478bd9Sstevel@tonic-gate  */
267c478bd9Sstevel@tonic-gate 
277c478bd9Sstevel@tonic-gate /*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
287c478bd9Sstevel@tonic-gate /*	  All Rights Reserved  	*/
297c478bd9Sstevel@tonic-gate 
307c478bd9Sstevel@tonic-gate 
317c478bd9Sstevel@tonic-gate #include <stdio.h>
327c478bd9Sstevel@tonic-gate #include <sys/types.h>
337c478bd9Sstevel@tonic-gate #include <termio.h>
347c478bd9Sstevel@tonic-gate #include <sys/stermio.h>
357c478bd9Sstevel@tonic-gate #include <sys/termiox.h>
367c478bd9Sstevel@tonic-gate #include "stty.h"
377c478bd9Sstevel@tonic-gate 
387c478bd9Sstevel@tonic-gate const struct	speeds speeds[] = {
397c478bd9Sstevel@tonic-gate 	"0",	B0,
407c478bd9Sstevel@tonic-gate 	"50",	B50,
417c478bd9Sstevel@tonic-gate 	"75",	B75,
427c478bd9Sstevel@tonic-gate 	"110",	B110,
437c478bd9Sstevel@tonic-gate 	"134",	B134,
447c478bd9Sstevel@tonic-gate 	"134.5", B134,
457c478bd9Sstevel@tonic-gate 	"150",	B150,
467c478bd9Sstevel@tonic-gate 	"200",	B200,
477c478bd9Sstevel@tonic-gate 	"300",	B300,
487c478bd9Sstevel@tonic-gate 	"600",	B600,
497c478bd9Sstevel@tonic-gate 	"1200",	B1200,
507c478bd9Sstevel@tonic-gate 	"1800",	B1800,
517c478bd9Sstevel@tonic-gate 	"2400",	B2400,
527c478bd9Sstevel@tonic-gate 	"4800",	B4800,
537c478bd9Sstevel@tonic-gate 	"9600",	B9600,
547c478bd9Sstevel@tonic-gate 	"19200",	B19200,
557c478bd9Sstevel@tonic-gate 	"19.2",		B19200,
567c478bd9Sstevel@tonic-gate 	"exta",		EXTA,
577c478bd9Sstevel@tonic-gate 	"38400",	B38400,
587c478bd9Sstevel@tonic-gate 	"38.4",		B38400,
597c478bd9Sstevel@tonic-gate 	"extb",		EXTB,
607c478bd9Sstevel@tonic-gate 	"57600",	B57600,
617c478bd9Sstevel@tonic-gate 	"76800",	B76800,
627c478bd9Sstevel@tonic-gate 	"115200",	B115200,
637c478bd9Sstevel@tonic-gate 	"153600",	B153600,
647c478bd9Sstevel@tonic-gate 	"230400",	B230400,
657c478bd9Sstevel@tonic-gate 	"307200",	B307200,
667c478bd9Sstevel@tonic-gate 	"460800",	B460800,
67*de81e71eSTim Marsland 	"921600",	B921600,
687c478bd9Sstevel@tonic-gate 	0,
697c478bd9Sstevel@tonic-gate };
707c478bd9Sstevel@tonic-gate 						/* Control Modes */
717c478bd9Sstevel@tonic-gate const struct mds cmodes[] = {
727c478bd9Sstevel@tonic-gate 	"-parity", CS8, PARENB|CSIZE,
737c478bd9Sstevel@tonic-gate 	"-evenp", CS8, PARENB|CSIZE,
747c478bd9Sstevel@tonic-gate 	"-even", CS8, PARENB|CSIZE,
757c478bd9Sstevel@tonic-gate 	"-oddp", CS8, PARENB|PARODD|CSIZE,
767c478bd9Sstevel@tonic-gate 	"-odd", CS8, PARENB|PARODD|CSIZE,
777c478bd9Sstevel@tonic-gate 	"parity", PARENB|CS7, PARODD|CSIZE,
787c478bd9Sstevel@tonic-gate 	"evenp", PARENB|CS7, PARODD|CSIZE,
797c478bd9Sstevel@tonic-gate 	"even", PARENB|CS7, PARODD|CSIZE,
807c478bd9Sstevel@tonic-gate 	"oddp", PARENB|PARODD|CS7, CSIZE,
817c478bd9Sstevel@tonic-gate 	"odd", PARENB|PARODD|CS7, CSIZE,
827c478bd9Sstevel@tonic-gate 	"parenb", PARENB, 0,
837c478bd9Sstevel@tonic-gate 	"-parenb", 0, PARENB,
847c478bd9Sstevel@tonic-gate 	"parodd", PARODD, 0,
857c478bd9Sstevel@tonic-gate 	"-parodd", 0, PARODD,
867c478bd9Sstevel@tonic-gate 	"cs8", CS8, CSIZE,
877c478bd9Sstevel@tonic-gate 	"cs7", CS7, CSIZE,
887c478bd9Sstevel@tonic-gate 	"cs6", CS6, CSIZE,
897c478bd9Sstevel@tonic-gate 	"cs5", CS5, CSIZE,
907c478bd9Sstevel@tonic-gate 	"cstopb", CSTOPB, 0,
917c478bd9Sstevel@tonic-gate 	"-cstopb", 0, CSTOPB,
927c478bd9Sstevel@tonic-gate 	"hupcl", HUPCL, 0,
937c478bd9Sstevel@tonic-gate 	"hup", HUPCL, 0,
947c478bd9Sstevel@tonic-gate 	"-hupcl", 0, HUPCL,
957c478bd9Sstevel@tonic-gate 	"-hup", 0, HUPCL,
967c478bd9Sstevel@tonic-gate 	"clocal", CLOCAL, 0,
977c478bd9Sstevel@tonic-gate 	"-clocal", 0, CLOCAL,
987c478bd9Sstevel@tonic-gate 	"loblk", LOBLK, 0,
997c478bd9Sstevel@tonic-gate 	"-loblk", 0, LOBLK,
1007c478bd9Sstevel@tonic-gate 	"cread", CREAD, 0,
1017c478bd9Sstevel@tonic-gate 	"-cread", 0, CREAD,
1027c478bd9Sstevel@tonic-gate 	"litout", CS8, (CSIZE|PARENB),
1037c478bd9Sstevel@tonic-gate 	"-litout", (CS7|PARENB), CSIZE,
1047c478bd9Sstevel@tonic-gate 	"pass8", CS8, (CSIZE|PARENB),
1057c478bd9Sstevel@tonic-gate 	"-pass8", (CS7|PARENB), CSIZE,
1067c478bd9Sstevel@tonic-gate 	"raw", CS8, (CSIZE|PARENB),
1077c478bd9Sstevel@tonic-gate 	"-raw", (CS7|PARENB), CSIZE,
1087c478bd9Sstevel@tonic-gate 	"cooked", (CS7|PARENB), CSIZE,
1097c478bd9Sstevel@tonic-gate 	"sane", (CS7|PARENB|CREAD), (CSIZE|PARODD|CLOCAL),
1107c478bd9Sstevel@tonic-gate 	0
1117c478bd9Sstevel@tonic-gate };
1127c478bd9Sstevel@tonic-gate 
1137c478bd9Sstevel@tonic-gate const struct mds ncmodes[] = {
1147c478bd9Sstevel@tonic-gate 	"parext", PAREXT, 0,
1157c478bd9Sstevel@tonic-gate 	"-parext", 0, PAREXT,
1167c478bd9Sstevel@tonic-gate 	"markp", (PARENB|PARODD|CS7|PAREXT), CSIZE,
1177c478bd9Sstevel@tonic-gate 	"-markp", CS8, (PARENB|PARODD|CSIZE|PAREXT),
1187c478bd9Sstevel@tonic-gate 	"spacep", (PARENB|CS7|PAREXT), PARODD|CSIZE,
1197c478bd9Sstevel@tonic-gate 	"-spacep", CS8, (PARENB|CSIZE|PAREXT),
1207c478bd9Sstevel@tonic-gate 	0
1217c478bd9Sstevel@tonic-gate };
1227c478bd9Sstevel@tonic-gate 						/* Input Modes */
1237c478bd9Sstevel@tonic-gate const struct mds imodes[] = {
1247c478bd9Sstevel@tonic-gate 	"ignbrk", IGNBRK, 0,
1257c478bd9Sstevel@tonic-gate 	"-ignbrk", 0, IGNBRK,
1267c478bd9Sstevel@tonic-gate 	"brkint", BRKINT, 0,
1277c478bd9Sstevel@tonic-gate 	"-brkint", 0, BRKINT,
1287c478bd9Sstevel@tonic-gate 	"ignpar", IGNPAR, 0,
1297c478bd9Sstevel@tonic-gate 	"-ignpar", 0, IGNPAR,
1307c478bd9Sstevel@tonic-gate 	"parmrk", PARMRK, 0,
1317c478bd9Sstevel@tonic-gate 	"-parmrk", 0, PARMRK,
1327c478bd9Sstevel@tonic-gate 	"inpck", INPCK, 0,
1337c478bd9Sstevel@tonic-gate 	"-inpck", 0, INPCK,
1347c478bd9Sstevel@tonic-gate 	"istrip", ISTRIP, 0,
1357c478bd9Sstevel@tonic-gate 	"-istrip", 0, ISTRIP,
1367c478bd9Sstevel@tonic-gate 	"inlcr", INLCR, 0,
1377c478bd9Sstevel@tonic-gate 	"-inlcr", 0, INLCR,
1387c478bd9Sstevel@tonic-gate 	"igncr", IGNCR, 0,
1397c478bd9Sstevel@tonic-gate 	"-igncr", 0, IGNCR,
1407c478bd9Sstevel@tonic-gate 	"icrnl", ICRNL, 0,
1417c478bd9Sstevel@tonic-gate 	"-icrnl", 0, ICRNL,
1427c478bd9Sstevel@tonic-gate 	"-nl", ICRNL, (INLCR|IGNCR),
1437c478bd9Sstevel@tonic-gate 	"nl", 0, ICRNL,
1447c478bd9Sstevel@tonic-gate 	"iuclc", IUCLC, 0,
1457c478bd9Sstevel@tonic-gate 	"-iuclc", 0, IUCLC,
1467c478bd9Sstevel@tonic-gate 	"lcase", IUCLC, 0,
1477c478bd9Sstevel@tonic-gate 	"-lcase", 0, IUCLC,
1487c478bd9Sstevel@tonic-gate 	"LCASE", IUCLC, 0,
1497c478bd9Sstevel@tonic-gate 	"-LCASE", 0, IUCLC,
1507c478bd9Sstevel@tonic-gate 	"ixon", IXON, 0,
1517c478bd9Sstevel@tonic-gate 	"-ixon", 0, IXON,
1527c478bd9Sstevel@tonic-gate 	"ixany", IXANY, 0,
1537c478bd9Sstevel@tonic-gate 	"-ixany", 0, IXANY,
1547c478bd9Sstevel@tonic-gate 	"decctlq", 0, IXANY,
1557c478bd9Sstevel@tonic-gate 	"-decctlq", IXANY, 0,
1567c478bd9Sstevel@tonic-gate 	"ixoff", IXOFF, 0,
1577c478bd9Sstevel@tonic-gate 	"-ixoff", 0, IXOFF,
1587c478bd9Sstevel@tonic-gate 	"tandem", IXOFF, 0,
1597c478bd9Sstevel@tonic-gate 	"-tandem", 0, IXOFF,
1607c478bd9Sstevel@tonic-gate 	"pass8", 0, ISTRIP,
1617c478bd9Sstevel@tonic-gate 	"-pass8", ISTRIP, 0,
1627c478bd9Sstevel@tonic-gate 	"raw", 0, -1,
1637c478bd9Sstevel@tonic-gate 	"-raw", (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON|IMAXBEL), 0,
1647c478bd9Sstevel@tonic-gate 	"cooked", (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON), 0,
1657c478bd9Sstevel@tonic-gate 	"sane", (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON|IMAXBEL),
1667c478bd9Sstevel@tonic-gate 		(IGNBRK|PARMRK|INPCK|INLCR|IGNCR|IUCLC|IXOFF),
1677c478bd9Sstevel@tonic-gate 	0
1687c478bd9Sstevel@tonic-gate };
1697c478bd9Sstevel@tonic-gate 
1707c478bd9Sstevel@tonic-gate const struct mds nimodes[] = {
1717c478bd9Sstevel@tonic-gate 	"imaxbel", IMAXBEL, 0,
1727c478bd9Sstevel@tonic-gate 	"-imaxbel", 0, IMAXBEL,
1737c478bd9Sstevel@tonic-gate 	0
1747c478bd9Sstevel@tonic-gate };
1757c478bd9Sstevel@tonic-gate 						/* Local Modes */
1767c478bd9Sstevel@tonic-gate const struct mds lmodes[] = {
1777c478bd9Sstevel@tonic-gate 	"isig", ISIG, 0,
1787c478bd9Sstevel@tonic-gate 	"-isig", 0, ISIG,
1797c478bd9Sstevel@tonic-gate 	"icanon", ICANON, 0,
1807c478bd9Sstevel@tonic-gate 	"-icanon", 0, ICANON,
1817c478bd9Sstevel@tonic-gate 	"cbreak", 0, ICANON,
1827c478bd9Sstevel@tonic-gate 	"-cbreak", ICANON, 0,
1837c478bd9Sstevel@tonic-gate 	"xcase", XCASE, 0,
1847c478bd9Sstevel@tonic-gate 	"-xcase", 0, XCASE,
1857c478bd9Sstevel@tonic-gate 	"lcase", XCASE, 0,
1867c478bd9Sstevel@tonic-gate 	"-lcase", 0, XCASE,
1877c478bd9Sstevel@tonic-gate 	"LCASE", XCASE, 0,
1887c478bd9Sstevel@tonic-gate 	"-LCASE", 0, XCASE,
1897c478bd9Sstevel@tonic-gate 	"echo", ECHO, 0,
1907c478bd9Sstevel@tonic-gate 	"-echo", 0, ECHO,
1917c478bd9Sstevel@tonic-gate 	"echoe", ECHOE, 0,
1927c478bd9Sstevel@tonic-gate 	"-echoe", 0, ECHOE,
1937c478bd9Sstevel@tonic-gate 	"crterase", ECHOE, 0,
1947c478bd9Sstevel@tonic-gate 	"-crterase", 0, ECHOE,
1957c478bd9Sstevel@tonic-gate 	"echok", ECHOK, 0,
1967c478bd9Sstevel@tonic-gate 	"-echok", 0, ECHOK,
1977c478bd9Sstevel@tonic-gate 	"lfkc", ECHOK, 0,
1987c478bd9Sstevel@tonic-gate 	"-lfkc", 0, ECHOK,
1997c478bd9Sstevel@tonic-gate 	"echonl", ECHONL, 0,
2007c478bd9Sstevel@tonic-gate 	"-echonl", 0, ECHONL,
2017c478bd9Sstevel@tonic-gate 	"noflsh", NOFLSH, 0,
2027c478bd9Sstevel@tonic-gate 	"-noflsh", 0, NOFLSH,
2037c478bd9Sstevel@tonic-gate 	"raw", 0, (ISIG|ICANON|XCASE|IEXTEN),
2047c478bd9Sstevel@tonic-gate 	"-raw", (ISIG|ICANON|IEXTEN), 0,
2057c478bd9Sstevel@tonic-gate 	"cooked", (ISIG|ICANON), 0,
2067c478bd9Sstevel@tonic-gate 	"sane", (ISIG|ICANON|IEXTEN|ECHO|ECHOK|ECHOE|ECHOCTL|ECHOKE),
2077c478bd9Sstevel@tonic-gate 		(XCASE|ECHONL|NOFLSH|STFLUSH|STWRAP|STAPPL),
2087c478bd9Sstevel@tonic-gate 	"stflush", STFLUSH, 0,
2097c478bd9Sstevel@tonic-gate 	"-stflush", 0, STFLUSH,
2107c478bd9Sstevel@tonic-gate 	"stwrap", STWRAP, 0,
2117c478bd9Sstevel@tonic-gate 	"-stwrap", 0, STWRAP,
2127c478bd9Sstevel@tonic-gate 	"stappl", STAPPL, 0,
2137c478bd9Sstevel@tonic-gate 	"-stappl", 0, STAPPL,
2147c478bd9Sstevel@tonic-gate 	0,
2157c478bd9Sstevel@tonic-gate };
2167c478bd9Sstevel@tonic-gate 
2177c478bd9Sstevel@tonic-gate const struct mds nlmodes[] = {
2187c478bd9Sstevel@tonic-gate 	"tostop", TOSTOP, 0,
2197c478bd9Sstevel@tonic-gate 	"-tostop", 0, TOSTOP,
2207c478bd9Sstevel@tonic-gate 	"echoctl", ECHOCTL, 0,
2217c478bd9Sstevel@tonic-gate 	"-echoctl", 0, ECHOCTL,
2227c478bd9Sstevel@tonic-gate 	"ctlecho", ECHOCTL, 0,
2237c478bd9Sstevel@tonic-gate 	"-ctlecho", 0, ECHOCTL,
2247c478bd9Sstevel@tonic-gate 	"echoprt", ECHOPRT, 0,
2257c478bd9Sstevel@tonic-gate 	"-echoprt", 0, ECHOPRT,
2267c478bd9Sstevel@tonic-gate 	"prterase", ECHOPRT, 0,
2277c478bd9Sstevel@tonic-gate 	"-prterase", 0, ECHOPRT,
2287c478bd9Sstevel@tonic-gate 	"echoke", ECHOKE, 0,
2297c478bd9Sstevel@tonic-gate 	"-echoke", 0, ECHOKE,
2307c478bd9Sstevel@tonic-gate 	"crtkill", ECHOKE, 0,
2317c478bd9Sstevel@tonic-gate 	"-crtkill", 0, ECHOKE,
2327c478bd9Sstevel@tonic-gate 	"defecho", DEFECHO, 0,
2337c478bd9Sstevel@tonic-gate 	"-defecho", 0, DEFECHO,
2347c478bd9Sstevel@tonic-gate 	"flusho", FLUSHO, 0,
2357c478bd9Sstevel@tonic-gate 	"-flusho", 0, FLUSHO,
2367c478bd9Sstevel@tonic-gate 	"pendin", PENDIN, 0,
2377c478bd9Sstevel@tonic-gate 	"-pendin", 0, PENDIN,
2387c478bd9Sstevel@tonic-gate 	"iexten", IEXTEN, 0,
2397c478bd9Sstevel@tonic-gate 	"-iexten", 0, IEXTEN,
2407c478bd9Sstevel@tonic-gate 	0
2417c478bd9Sstevel@tonic-gate };
2427c478bd9Sstevel@tonic-gate 						/* Output Modes */
2437c478bd9Sstevel@tonic-gate const struct mds omodes[] = {
2447c478bd9Sstevel@tonic-gate 	"opost", OPOST, 0,
2457c478bd9Sstevel@tonic-gate 	"-opost", 0, OPOST,
2467c478bd9Sstevel@tonic-gate 	"olcuc", OLCUC, 0,
2477c478bd9Sstevel@tonic-gate 	"-olcuc", 0, OLCUC,
2487c478bd9Sstevel@tonic-gate 	"lcase", OLCUC, 0,
2497c478bd9Sstevel@tonic-gate 	"-lcase", 0, OLCUC,
2507c478bd9Sstevel@tonic-gate 	"LCASE", OLCUC, 0,
2517c478bd9Sstevel@tonic-gate 	"-LCASE", 0, OLCUC,
2527c478bd9Sstevel@tonic-gate 	"onlcr", ONLCR, 0,
2537c478bd9Sstevel@tonic-gate 	"-onlcr", 0, ONLCR,
2547c478bd9Sstevel@tonic-gate 	"-nl", ONLCR, (OCRNL|ONLRET),
2557c478bd9Sstevel@tonic-gate 	"nl", 0, ONLCR,
2567c478bd9Sstevel@tonic-gate 	"ocrnl", OCRNL, 0,
2577c478bd9Sstevel@tonic-gate 	"-ocrnl", 0, OCRNL,
2587c478bd9Sstevel@tonic-gate 	"onocr", ONOCR, 0,
2597c478bd9Sstevel@tonic-gate 	"-onocr", 0, ONOCR,
2607c478bd9Sstevel@tonic-gate 	"onlret", ONLRET, 0,
2617c478bd9Sstevel@tonic-gate 	"-onlret", 0, ONLRET,
2627c478bd9Sstevel@tonic-gate 	"fill", OFILL, OFDEL,
2637c478bd9Sstevel@tonic-gate 	"-fill", 0, OFILL|OFDEL,
2647c478bd9Sstevel@tonic-gate 	"nul-fill", OFILL, OFDEL,
2657c478bd9Sstevel@tonic-gate 	"del-fill", OFILL|OFDEL, 0,
2667c478bd9Sstevel@tonic-gate 	"ofill", OFILL, 0,
2677c478bd9Sstevel@tonic-gate 	"-ofill", 0, OFILL,
2687c478bd9Sstevel@tonic-gate 	"ofdel", OFDEL, 0,
2697c478bd9Sstevel@tonic-gate 	"-ofdel", 0, OFDEL,
2707c478bd9Sstevel@tonic-gate 	"cr0", CR0, CRDLY,
2717c478bd9Sstevel@tonic-gate 	"cr1", CR1, CRDLY,
2727c478bd9Sstevel@tonic-gate 	"cr2", CR2, CRDLY,
2737c478bd9Sstevel@tonic-gate 	"cr3", CR3, CRDLY,
2747c478bd9Sstevel@tonic-gate 	"tab0", TAB0, TABDLY,
2757c478bd9Sstevel@tonic-gate 	"tabs", TAB0, TABDLY,
2767c478bd9Sstevel@tonic-gate 	"tab1", TAB1, TABDLY,
2777c478bd9Sstevel@tonic-gate 	"tab2", TAB2, TABDLY,
2787c478bd9Sstevel@tonic-gate 	"tab3", TAB3, TABDLY,
2797c478bd9Sstevel@tonic-gate 	"-tabs", TAB3, TABDLY,
2807c478bd9Sstevel@tonic-gate 	"nl0", NL0, NLDLY,
2817c478bd9Sstevel@tonic-gate 	"nl1", NL1, NLDLY,
2827c478bd9Sstevel@tonic-gate 	"ff0", FF0, FFDLY,
2837c478bd9Sstevel@tonic-gate 	"ff1", FF1, FFDLY,
2847c478bd9Sstevel@tonic-gate 	"vt0", VT0, VTDLY,
2857c478bd9Sstevel@tonic-gate 	"vt1", VT1, VTDLY,
2867c478bd9Sstevel@tonic-gate 	"bs0", BS0, BSDLY,
2877c478bd9Sstevel@tonic-gate 	"bs1", BS1, BSDLY,
2887c478bd9Sstevel@tonic-gate 	"litout", 0, OPOST,
2897c478bd9Sstevel@tonic-gate 	"-litout", OPOST, 0,
2907c478bd9Sstevel@tonic-gate 	"raw", 0, OPOST,
2917c478bd9Sstevel@tonic-gate 	"-raw", OPOST, 0,
2927c478bd9Sstevel@tonic-gate 	"cooked", OPOST, 0,
2937c478bd9Sstevel@tonic-gate 	"tty33", CR1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY),
2947c478bd9Sstevel@tonic-gate 	"tn300", CR1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY),
2957c478bd9Sstevel@tonic-gate 	"ti700", CR2, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY),
2967c478bd9Sstevel@tonic-gate 	"vt05", NL1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY),
2977c478bd9Sstevel@tonic-gate 	"tek", FF1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY),
2987c478bd9Sstevel@tonic-gate 	"tty37", (FF1|VT1|CR2|TAB1|NL1), (NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY),
2997c478bd9Sstevel@tonic-gate 	"sane", (OPOST|ONLCR), (OLCUC|OCRNL|ONOCR|ONLRET|OFILL|OFDEL|
3007c478bd9Sstevel@tonic-gate 			NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY),
3017c478bd9Sstevel@tonic-gate 	0,
3027c478bd9Sstevel@tonic-gate };
3037c478bd9Sstevel@tonic-gate 
3047c478bd9Sstevel@tonic-gate const struct mds hmodes[] = {
3057c478bd9Sstevel@tonic-gate 	"-rtsxoff", 0, RTSXOFF,
3067c478bd9Sstevel@tonic-gate 	"rtsxoff", RTSXOFF, 0,
3077c478bd9Sstevel@tonic-gate 	"-ctsxon", 0, CTSXON,
3087c478bd9Sstevel@tonic-gate 	"ctsxon", CTSXON, 0,
3097c478bd9Sstevel@tonic-gate 	"-dterxoff", 0, DTRXOFF,
3107c478bd9Sstevel@tonic-gate 	"dterxoff", DTRXOFF, 0,
3117c478bd9Sstevel@tonic-gate 	"-rlsdxon", 0, CDXON,
3127c478bd9Sstevel@tonic-gate 	"rlsdxon", CDXON, 0,
3137c478bd9Sstevel@tonic-gate 	"-isxoff", 0, ISXOFF,
3147c478bd9Sstevel@tonic-gate 	"isxoff", ISXOFF, 0,
3157c478bd9Sstevel@tonic-gate 	0,
3167c478bd9Sstevel@tonic-gate };
3177c478bd9Sstevel@tonic-gate 
3187c478bd9Sstevel@tonic-gate const struct mds clkmodes[] = {
3197c478bd9Sstevel@tonic-gate 	"xcibrg", XCIBRG, XMTCLK,
3207c478bd9Sstevel@tonic-gate 	"xctset", XCTSET, XMTCLK,
3217c478bd9Sstevel@tonic-gate 	"xcrset", XCRSET, XMTCLK,
3227c478bd9Sstevel@tonic-gate 	"rcibrg", RCIBRG, RCVCLK,
3237c478bd9Sstevel@tonic-gate 	"rctset", RCTSET, RCVCLK,
3247c478bd9Sstevel@tonic-gate 	"rcrset", RCRSET, RCVCLK,
3257c478bd9Sstevel@tonic-gate 	"tsetcoff", TSETCOFF, TSETCLK,
3267c478bd9Sstevel@tonic-gate 	"tsetcrc", TSETCRBRG, TSETCLK,
3277c478bd9Sstevel@tonic-gate 	"tsetcxc", TSETCTBRG, TSETCLK,
3287c478bd9Sstevel@tonic-gate 	"rsetcoff", RSETCOFF, RSETCLK,
3297c478bd9Sstevel@tonic-gate 	"rsetcrc", RSETCRBRG, RSETCLK,
3307c478bd9Sstevel@tonic-gate 	"rsetcxc", RSETCTBRG, RSETCLK,
331*de81e71eSTim Marsland 	"async",
332*de81e71eSTim Marsland 		XCIBRG|RCIBRG|TSETCOFF|RSETCOFF, XMTCLK|RCVCLK|TSETCLK|RSETCLK,
3337c478bd9Sstevel@tonic-gate 	0,
3347c478bd9Sstevel@tonic-gate };
335