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 /* 287c478bd9Sstevel@tonic-gate * Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T 297c478bd9Sstevel@tonic-gate * All Rights Reserved 307c478bd9Sstevel@tonic-gate * 317c478bd9Sstevel@tonic-gate */ 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate #include <stdio.h> 347c478bd9Sstevel@tonic-gate #include <sys/types.h> 357c478bd9Sstevel@tonic-gate #include <termio.h> 367c478bd9Sstevel@tonic-gate #include <sys/stermio.h> 377c478bd9Sstevel@tonic-gate #include <sys/termiox.h> 387c478bd9Sstevel@tonic-gate #include "stty.h" 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate const struct speeds speeds[] = { 417c478bd9Sstevel@tonic-gate "0", B0, 0, 427c478bd9Sstevel@tonic-gate "50", B50, 50, 437c478bd9Sstevel@tonic-gate "75", B75, 75, 447c478bd9Sstevel@tonic-gate "110", B110, 110, 457c478bd9Sstevel@tonic-gate "134", B134, 134, 467c478bd9Sstevel@tonic-gate "134.5", B134, 134, 477c478bd9Sstevel@tonic-gate "150", B150, 150, 487c478bd9Sstevel@tonic-gate "200", B200, 200, 497c478bd9Sstevel@tonic-gate "300", B300, 300, 507c478bd9Sstevel@tonic-gate "600", B600, 600, 517c478bd9Sstevel@tonic-gate "1200", B1200, 1200, 527c478bd9Sstevel@tonic-gate "1800", B1800, 1800, 537c478bd9Sstevel@tonic-gate "2400", B2400, 2400, 547c478bd9Sstevel@tonic-gate "4800", B4800, 4800, 557c478bd9Sstevel@tonic-gate "9600", B9600, 9600, 567c478bd9Sstevel@tonic-gate "19200", B19200, 19200, 577c478bd9Sstevel@tonic-gate "19.2", B19200, 19200, 587c478bd9Sstevel@tonic-gate "38400", B38400, 38400, 597c478bd9Sstevel@tonic-gate "38.4", B38400, 38400, 607c478bd9Sstevel@tonic-gate "57600", B57600, 57600, 617c478bd9Sstevel@tonic-gate "57.6", B57600, 57600, 627c478bd9Sstevel@tonic-gate "76800", B76800, 76800, 637c478bd9Sstevel@tonic-gate "76.8", B76800, 76800, 647c478bd9Sstevel@tonic-gate "115200", B115200, 115200, 657c478bd9Sstevel@tonic-gate "115.2", B115200, 115200, 667c478bd9Sstevel@tonic-gate "153600", B153600, 153600, 677c478bd9Sstevel@tonic-gate "153.6", B153600, 153600, 687c478bd9Sstevel@tonic-gate "230400", B230400, 230400, 697c478bd9Sstevel@tonic-gate "230.4", B230400, 230400, 707c478bd9Sstevel@tonic-gate "307200", B307200, 307200, 717c478bd9Sstevel@tonic-gate "307.2", B307200, 307200, 727c478bd9Sstevel@tonic-gate "460800", B460800, 460800, 737c478bd9Sstevel@tonic-gate "460.8", B460800, 460800, 74*de81e71eSTim Marsland "921600", B921600, 921600, 75*de81e71eSTim Marsland "921.6", B921600, 921600, 767c478bd9Sstevel@tonic-gate 0, 777c478bd9Sstevel@tonic-gate }; 787c478bd9Sstevel@tonic-gate 797c478bd9Sstevel@tonic-gate const struct mds cmodes[] = { 807c478bd9Sstevel@tonic-gate "-parity", CS8, PARENB|CSIZE, 817c478bd9Sstevel@tonic-gate "-evenp", CS8, PARENB|CSIZE, 827c478bd9Sstevel@tonic-gate "-oddp", CS8, PARENB|PARODD|CSIZE, 837c478bd9Sstevel@tonic-gate "parity", PARENB|CS7, PARODD|CSIZE, 847c478bd9Sstevel@tonic-gate "evenp", PARENB|CS7, PARODD|CSIZE, 857c478bd9Sstevel@tonic-gate "oddp", PARENB|PARODD|CS7, CSIZE, 867c478bd9Sstevel@tonic-gate "parenb", PARENB, 0, 877c478bd9Sstevel@tonic-gate "-parenb", 0, PARENB, 887c478bd9Sstevel@tonic-gate "parodd", PARODD, 0, 897c478bd9Sstevel@tonic-gate "-parodd", 0, PARODD, 907c478bd9Sstevel@tonic-gate "cs8", CS8, CSIZE, 917c478bd9Sstevel@tonic-gate "cs7", CS7, CSIZE, 927c478bd9Sstevel@tonic-gate "cs6", CS6, CSIZE, 937c478bd9Sstevel@tonic-gate "cs5", CS5, CSIZE, 947c478bd9Sstevel@tonic-gate "cstopb", CSTOPB, 0, 957c478bd9Sstevel@tonic-gate "-cstopb", 0, CSTOPB, 967c478bd9Sstevel@tonic-gate "hupcl", HUPCL, 0, 977c478bd9Sstevel@tonic-gate "hup", HUPCL, 0, 987c478bd9Sstevel@tonic-gate "-hupcl", 0, HUPCL, 997c478bd9Sstevel@tonic-gate "-hup", 0, HUPCL, 1007c478bd9Sstevel@tonic-gate "clocal", CLOCAL, 0, 1017c478bd9Sstevel@tonic-gate "-clocal", 0, CLOCAL, 1027c478bd9Sstevel@tonic-gate "loblk", LOBLK, 0, 1037c478bd9Sstevel@tonic-gate "-loblk", 0, LOBLK, 1047c478bd9Sstevel@tonic-gate "cread", CREAD, 0, 1057c478bd9Sstevel@tonic-gate "-cread", 0, CREAD, 1067c478bd9Sstevel@tonic-gate "crtscts", (long)CRTSCTS, 0, 1077c478bd9Sstevel@tonic-gate "-crtscts", 0, (long)CRTSCTS, 1087c478bd9Sstevel@tonic-gate "crtsxoff", CRTSXOFF, 0, 1097c478bd9Sstevel@tonic-gate "-crtsxoff", 0, CRTSXOFF, 1107c478bd9Sstevel@tonic-gate "raw", CS8, (CSIZE|PARENB), 1117c478bd9Sstevel@tonic-gate "-raw", (CS7|PARENB), CSIZE, 1127c478bd9Sstevel@tonic-gate "cooked", (CS7|PARENB), CSIZE, 1137c478bd9Sstevel@tonic-gate "sane", (CS7|PARENB|CREAD), (CSIZE|PARODD|CLOCAL), 1147c478bd9Sstevel@tonic-gate 0 1157c478bd9Sstevel@tonic-gate }; 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate const struct mds ncmodes[] = { 1187c478bd9Sstevel@tonic-gate "parext", PAREXT, 0, 1197c478bd9Sstevel@tonic-gate "-parext", 0, PAREXT, 1207c478bd9Sstevel@tonic-gate "markp", (PARENB|PARODD|CS7|PAREXT), CSIZE, 1217c478bd9Sstevel@tonic-gate "-markp", CS8, (PARENB|PARODD|CSIZE|PAREXT), 1227c478bd9Sstevel@tonic-gate "spacep", (PARENB|CS7|PAREXT), PARODD|CSIZE, 1237c478bd9Sstevel@tonic-gate "-spacep", CS8, (PARENB|CSIZE|PAREXT), 1247c478bd9Sstevel@tonic-gate 0 1257c478bd9Sstevel@tonic-gate }; 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate const struct mds imodes[] = { 1287c478bd9Sstevel@tonic-gate "ignbrk", IGNBRK, 0, 1297c478bd9Sstevel@tonic-gate "-ignbrk", 0, IGNBRK, 1307c478bd9Sstevel@tonic-gate "brkint", BRKINT, 0, 1317c478bd9Sstevel@tonic-gate "-brkint", 0, BRKINT, 1327c478bd9Sstevel@tonic-gate "ignpar", IGNPAR, 0, 1337c478bd9Sstevel@tonic-gate "-ignpar", 0, IGNPAR, 1347c478bd9Sstevel@tonic-gate "parmrk", PARMRK, 0, 1357c478bd9Sstevel@tonic-gate "-parmrk", 0, PARMRK, 1367c478bd9Sstevel@tonic-gate "inpck", INPCK, 0, 1377c478bd9Sstevel@tonic-gate "-inpck", 0, INPCK, 1387c478bd9Sstevel@tonic-gate "istrip", ISTRIP, 0, 1397c478bd9Sstevel@tonic-gate "-istrip", 0, ISTRIP, 1407c478bd9Sstevel@tonic-gate "inlcr", INLCR, 0, 1417c478bd9Sstevel@tonic-gate "-inlcr", 0, INLCR, 1427c478bd9Sstevel@tonic-gate "igncr", IGNCR, 0, 1437c478bd9Sstevel@tonic-gate "-igncr", 0, IGNCR, 1447c478bd9Sstevel@tonic-gate "icrnl", ICRNL, 0, 1457c478bd9Sstevel@tonic-gate "-icrnl", 0, ICRNL, 1467c478bd9Sstevel@tonic-gate #ifdef XPG4 1477c478bd9Sstevel@tonic-gate "-nl", 0, (ICRNL|INLCR|IGNCR), 1487c478bd9Sstevel@tonic-gate "nl", ICRNL, 0, 1497c478bd9Sstevel@tonic-gate #else 1507c478bd9Sstevel@tonic-gate "-nl", ICRNL, (INLCR|IGNCR), 1517c478bd9Sstevel@tonic-gate "nl", 0, ICRNL, 1527c478bd9Sstevel@tonic-gate #endif 1537c478bd9Sstevel@tonic-gate "iuclc", IUCLC, 0, 1547c478bd9Sstevel@tonic-gate "-iuclc", 0, IUCLC, 1557c478bd9Sstevel@tonic-gate "lcase", IUCLC, 0, 1567c478bd9Sstevel@tonic-gate "-lcase", 0, IUCLC, 1577c478bd9Sstevel@tonic-gate "LCASE", IUCLC, 0, 1587c478bd9Sstevel@tonic-gate "-LCASE", 0, IUCLC, 1597c478bd9Sstevel@tonic-gate "ixon", IXON, 0, 1607c478bd9Sstevel@tonic-gate "-ixon", 0, IXON, 1617c478bd9Sstevel@tonic-gate "ixany", IXANY, 0, 1627c478bd9Sstevel@tonic-gate "-ixany", 0, IXANY, 1637c478bd9Sstevel@tonic-gate "ixoff", IXOFF, 0, 1647c478bd9Sstevel@tonic-gate "-ixoff", 0, IXOFF, 1657c478bd9Sstevel@tonic-gate "raw", 0, -1, 1667c478bd9Sstevel@tonic-gate "-raw", (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON), 0, 1677c478bd9Sstevel@tonic-gate "cooked", (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON), 0, 1687c478bd9Sstevel@tonic-gate "sane", (BRKINT|IGNPAR|ISTRIP|ICRNL|IXON|IMAXBEL), 1697c478bd9Sstevel@tonic-gate (IGNBRK|PARMRK|INPCK|INLCR|IGNCR|IUCLC|IXOFF|IXANY), 1707c478bd9Sstevel@tonic-gate 0 1717c478bd9Sstevel@tonic-gate }; 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gate 1747c478bd9Sstevel@tonic-gate const struct mds nimodes[] = { 1757c478bd9Sstevel@tonic-gate "imaxbel", IMAXBEL, 0, 1767c478bd9Sstevel@tonic-gate "-imaxbel", 0, IMAXBEL, 1777c478bd9Sstevel@tonic-gate 0 1787c478bd9Sstevel@tonic-gate }; 1797c478bd9Sstevel@tonic-gate 1807c478bd9Sstevel@tonic-gate const struct mds lmodes[] = { 1817c478bd9Sstevel@tonic-gate "isig", ISIG, 0, 1827c478bd9Sstevel@tonic-gate "-isig", 0, ISIG, 1837c478bd9Sstevel@tonic-gate "icanon", ICANON, 0, 1847c478bd9Sstevel@tonic-gate "-icanon", 0, ICANON, 1857c478bd9Sstevel@tonic-gate "xcase", XCASE, 0, 1867c478bd9Sstevel@tonic-gate "-xcase", 0, XCASE, 1877c478bd9Sstevel@tonic-gate "lcase", XCASE, 0, 1887c478bd9Sstevel@tonic-gate "-lcase", 0, XCASE, 1897c478bd9Sstevel@tonic-gate "LCASE", XCASE, 0, 1907c478bd9Sstevel@tonic-gate "-LCASE", 0, XCASE, 1917c478bd9Sstevel@tonic-gate "echo", ECHO, 0, 1927c478bd9Sstevel@tonic-gate "-echo", 0, ECHO, 1937c478bd9Sstevel@tonic-gate "echoe", ECHOE, 0, 1947c478bd9Sstevel@tonic-gate "-echoe", 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), 2047c478bd9Sstevel@tonic-gate "-raw", (ISIG|ICANON), 0, 2057c478bd9Sstevel@tonic-gate "cooked", (ISIG|ICANON), 0, 2067c478bd9Sstevel@tonic-gate "sane", (ISIG|ICANON|IEXTEN|ECHO|ECHOK|ECHOE|ECHOKE|ECHOCTL), 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 "echoprt", ECHOPRT, 0, 2237c478bd9Sstevel@tonic-gate "-echoprt", 0, ECHOPRT, 2247c478bd9Sstevel@tonic-gate "echoke", ECHOKE, 0, 2257c478bd9Sstevel@tonic-gate "-echoke", 0, ECHOKE, 2267c478bd9Sstevel@tonic-gate "defecho", DEFECHO, 0, 2277c478bd9Sstevel@tonic-gate "-defecho", 0, DEFECHO, 2287c478bd9Sstevel@tonic-gate "flusho", FLUSHO, 0, 2297c478bd9Sstevel@tonic-gate "-flusho", 0, FLUSHO, 2307c478bd9Sstevel@tonic-gate "pendin", PENDIN, 0, 2317c478bd9Sstevel@tonic-gate "-pendin", 0, PENDIN, 2327c478bd9Sstevel@tonic-gate "iexten", IEXTEN, 0, 2337c478bd9Sstevel@tonic-gate "-iexten", 0, IEXTEN, 2347c478bd9Sstevel@tonic-gate 0 2357c478bd9Sstevel@tonic-gate }; 2367c478bd9Sstevel@tonic-gate 2377c478bd9Sstevel@tonic-gate const struct mds omodes[] = { 2387c478bd9Sstevel@tonic-gate "opost", OPOST, 0, 2397c478bd9Sstevel@tonic-gate "-opost", 0, OPOST, 2407c478bd9Sstevel@tonic-gate "olcuc", OLCUC, 0, 2417c478bd9Sstevel@tonic-gate "-olcuc", 0, OLCUC, 2427c478bd9Sstevel@tonic-gate "lcase", OLCUC, 0, 2437c478bd9Sstevel@tonic-gate "-lcase", 0, OLCUC, 2447c478bd9Sstevel@tonic-gate "LCASE", OLCUC, 0, 2457c478bd9Sstevel@tonic-gate "-LCASE", 0, OLCUC, 2467c478bd9Sstevel@tonic-gate "onlcr", ONLCR, 0, 2477c478bd9Sstevel@tonic-gate "-onlcr", 0, ONLCR, 2487c478bd9Sstevel@tonic-gate "-nl", ONLCR, (OCRNL|ONLRET), 2497c478bd9Sstevel@tonic-gate "nl", 0, ONLCR, 2507c478bd9Sstevel@tonic-gate "ocrnl", OCRNL, 0, 2517c478bd9Sstevel@tonic-gate "-ocrnl", 0, OCRNL, 2527c478bd9Sstevel@tonic-gate "onocr", ONOCR, 0, 2537c478bd9Sstevel@tonic-gate "-onocr", 0, ONOCR, 2547c478bd9Sstevel@tonic-gate "onlret", ONLRET, 0, 2557c478bd9Sstevel@tonic-gate "-onlret", 0, ONLRET, 2567c478bd9Sstevel@tonic-gate "fill", OFILL, OFDEL, 2577c478bd9Sstevel@tonic-gate "-fill", 0, OFILL|OFDEL, 2587c478bd9Sstevel@tonic-gate "nul-fill", OFILL, OFDEL, 2597c478bd9Sstevel@tonic-gate "del-fill", OFILL|OFDEL, 0, 2607c478bd9Sstevel@tonic-gate "ofill", OFILL, 0, 2617c478bd9Sstevel@tonic-gate "-ofill", 0, OFILL, 2627c478bd9Sstevel@tonic-gate "ofdel", OFDEL, 0, 2637c478bd9Sstevel@tonic-gate "-ofdel", 0, OFDEL, 2647c478bd9Sstevel@tonic-gate "cr0", CR0, CRDLY, 2657c478bd9Sstevel@tonic-gate "cr1", CR1, CRDLY, 2667c478bd9Sstevel@tonic-gate "cr2", CR2, CRDLY, 2677c478bd9Sstevel@tonic-gate "cr3", CR3, CRDLY, 2687c478bd9Sstevel@tonic-gate "tab0", TAB0, TABDLY, 2697c478bd9Sstevel@tonic-gate "tabs", TAB0, TABDLY, 2707c478bd9Sstevel@tonic-gate "tab1", TAB1, TABDLY, 2717c478bd9Sstevel@tonic-gate "tab2", TAB2, TABDLY, 2727c478bd9Sstevel@tonic-gate "tab3", TAB3, TABDLY, 2737c478bd9Sstevel@tonic-gate "-tabs", TAB3, TABDLY, 2747c478bd9Sstevel@tonic-gate "tab8", TAB3, TABDLY, 2757c478bd9Sstevel@tonic-gate "nl0", NL0, NLDLY, 2767c478bd9Sstevel@tonic-gate "nl1", NL1, NLDLY, 2777c478bd9Sstevel@tonic-gate "ff0", FF0, FFDLY, 2787c478bd9Sstevel@tonic-gate "ff1", FF1, FFDLY, 2797c478bd9Sstevel@tonic-gate "vt0", VT0, VTDLY, 2807c478bd9Sstevel@tonic-gate "vt1", VT1, VTDLY, 2817c478bd9Sstevel@tonic-gate "bs0", BS0, BSDLY, 2827c478bd9Sstevel@tonic-gate "bs1", BS1, BSDLY, 2837c478bd9Sstevel@tonic-gate "raw", 0, OPOST, 2847c478bd9Sstevel@tonic-gate "-raw", OPOST, 0, 2857c478bd9Sstevel@tonic-gate "cooked", OPOST, 0, 2867c478bd9Sstevel@tonic-gate "tty33", CR1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY), 2877c478bd9Sstevel@tonic-gate "tn300", CR1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY), 2887c478bd9Sstevel@tonic-gate "ti700", CR2, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY), 2897c478bd9Sstevel@tonic-gate "vt05", NL1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY), 2907c478bd9Sstevel@tonic-gate "tek", FF1, (CRDLY|TABDLY|NLDLY|FFDLY|VTDLY|BSDLY), 2917c478bd9Sstevel@tonic-gate "tty37", (FF1|VT1|CR2|TAB1|NL1), (NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY), 2927c478bd9Sstevel@tonic-gate "sane", (OPOST|ONLCR), (OLCUC|OCRNL|ONOCR|ONLRET|OFILL|OFDEL| 2937c478bd9Sstevel@tonic-gate NLDLY|CRDLY|TABDLY|BSDLY|VTDLY|FFDLY), 2947c478bd9Sstevel@tonic-gate 0, 2957c478bd9Sstevel@tonic-gate }; 2967c478bd9Sstevel@tonic-gate 2977c478bd9Sstevel@tonic-gate const struct mds hmodes[] = { 2987c478bd9Sstevel@tonic-gate "-rtsxoff", 0, RTSXOFF, 2997c478bd9Sstevel@tonic-gate "rtsxoff", RTSXOFF, 0, 3007c478bd9Sstevel@tonic-gate "-ctsxon", 0, CTSXON, 3017c478bd9Sstevel@tonic-gate "ctsxon", CTSXON, 0, 3027c478bd9Sstevel@tonic-gate "-dtrxoff", 0, DTRXOFF, 3037c478bd9Sstevel@tonic-gate "dtrxoff", DTRXOFF, 0, 3047c478bd9Sstevel@tonic-gate "-cdxon", 0, CDXON, 3057c478bd9Sstevel@tonic-gate "cdxon", CDXON, 0, 3067c478bd9Sstevel@tonic-gate "-isxoff", 0, ISXOFF, 3077c478bd9Sstevel@tonic-gate "isxoff", ISXOFF, 0, 3087c478bd9Sstevel@tonic-gate 0, 3097c478bd9Sstevel@tonic-gate }; 3107c478bd9Sstevel@tonic-gate 3117c478bd9Sstevel@tonic-gate const struct mds clkmodes[] = { 3127c478bd9Sstevel@tonic-gate "xcibrg", XCIBRG, XMTCLK, 3137c478bd9Sstevel@tonic-gate "xctset", XCTSET, XMTCLK, 3147c478bd9Sstevel@tonic-gate "xcrset", XCRSET, XMTCLK, 3157c478bd9Sstevel@tonic-gate "rcibrg", RCIBRG, RCVCLK, 3167c478bd9Sstevel@tonic-gate "rctset", RCTSET, RCVCLK, 3177c478bd9Sstevel@tonic-gate "rcrset", RCRSET, RCVCLK, 3187c478bd9Sstevel@tonic-gate "tsetcoff", TSETCOFF, TSETCLK, 3197c478bd9Sstevel@tonic-gate "tsetcrbrg", TSETCRBRG, TSETCLK, 3207c478bd9Sstevel@tonic-gate "tsetctbrg", TSETCTBRG, TSETCLK, 3217c478bd9Sstevel@tonic-gate "tsetctset", TSETCTSET, TSETCLK, 3227c478bd9Sstevel@tonic-gate "tsetcrset", TSETCRSET, TSETCLK, 3237c478bd9Sstevel@tonic-gate "rsetcoff", RSETCOFF, RSETCLK, 3247c478bd9Sstevel@tonic-gate "rsetcrbrg", RSETCRBRG, RSETCLK, 3257c478bd9Sstevel@tonic-gate "rsetctbrg", RSETCTBRG, RSETCLK, 3267c478bd9Sstevel@tonic-gate "rsetctset", RSETCTSET, RSETCLK, 3277c478bd9Sstevel@tonic-gate "rsetcrset", RSETCRSET, RSETCLK, 3287c478bd9Sstevel@tonic-gate "async", XCIBRG|RCIBRG|TSETCOFF|RSETCOFF, XMTCLK|RCVCLK|TSETCLK|RSETCLK, 3297c478bd9Sstevel@tonic-gate 0, 3307c478bd9Sstevel@tonic-gate }; 3317c478bd9Sstevel@tonic-gate 3327c478bd9Sstevel@tonic-gate const char *not_supported[] = { 3337c478bd9Sstevel@tonic-gate "rtsxoff", 3347c478bd9Sstevel@tonic-gate "ctsxon", 3357c478bd9Sstevel@tonic-gate "dtrxoff", 3367c478bd9Sstevel@tonic-gate "cdxon", 3377c478bd9Sstevel@tonic-gate "isxoff", 3387c478bd9Sstevel@tonic-gate "xcibrg", 3397c478bd9Sstevel@tonic-gate "xctset", 3407c478bd9Sstevel@tonic-gate "scrset", 3417c478bd9Sstevel@tonic-gate "rcibrg", 3427c478bd9Sstevel@tonic-gate "rctset", 3437c478bd9Sstevel@tonic-gate "rcrset", 3447c478bd9Sstevel@tonic-gate "tsetcoff", 3457c478bd9Sstevel@tonic-gate "tsetcrbrg", 3467c478bd9Sstevel@tonic-gate "rsetcbrg", 3477c478bd9Sstevel@tonic-gate "rsetctbrg", 3487c478bd9Sstevel@tonic-gate "rsetctset", 3497c478bd9Sstevel@tonic-gate "rsetcrset", 3507c478bd9Sstevel@tonic-gate 0, 3517c478bd9Sstevel@tonic-gate }; 352