1 /* $NetBSD: ibcs2_termios.h,v 1.3 1994/10/26 02:53:07 cgd Exp $ */ 2 /* $FreeBSD$ */ 3 4 /*- 5 * SPDX-License-Identifier: BSD-4-Clause 6 * 7 * Copyright (c) 1994 Scott Bartram 8 * All rights reserved. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. All advertising materials mentioning features or use of this software 19 * must display the following acknowledgement: 20 * This product includes software developed by Scott Bartram. 21 * 4. The name of the author may not be used to endorse or promote products 22 * derived from this software without specific prior written permission 23 * 24 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 25 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 26 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 27 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 28 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 29 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 30 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 31 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 32 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 */ 35 36 #ifndef _IBCS2_TERMIOS_H 37 #define _IBCS2_TERMIOS_H 1 38 39 #include <i386/ibcs2/ibcs2_types.h> 40 41 #define IBCS2_NCC 8 42 #define IBCS2_NCCS 13 43 44 typedef u_short ibcs2_tcflag_t; 45 typedef u_char ibcs2_cc_t; 46 typedef u_long ibcs2_speed_t; 47 48 struct ibcs2_termio { 49 u_short c_iflag; 50 u_short c_oflag; 51 u_short c_cflag; 52 u_short c_lflag; 53 char c_line; 54 u_char c_cc[IBCS2_NCC]; 55 }; 56 57 struct ibcs2_termios { 58 ibcs2_tcflag_t c_iflag; 59 ibcs2_tcflag_t c_oflag; 60 ibcs2_tcflag_t c_cflag; 61 ibcs2_tcflag_t c_lflag; 62 char c_line; 63 ibcs2_cc_t c_cc[IBCS2_NCCS]; 64 char c_ispeed; 65 char c_ospeed; 66 }; 67 68 #define IBCS2_VINTR 0 69 #define IBCS2_VQUIT 1 70 #define IBCS2_VERASE 2 71 #define IBCS2_VKILL 3 72 #define IBCS2_VEOF 4 73 #define IBCS2_VEOL 5 74 #define IBCS2_VEOL2 6 75 #define IBCS2_VMIN 4 76 #define IBCS2_VTIME 5 77 #define IBCS2_VSWTCH 7 78 #define IBCS2_VSUSP 10 79 #define IBCS2_VSTART 11 80 #define IBCS2_VSTOP 12 81 82 #define IBCS2_CNUL 0 83 #define IBCS2_CDEL 0377 84 #define IBCS2_CESC '\\' 85 #define IBCS2_CINTR 0177 86 #define IBCS2_CQUIT 034 87 #define IBCS2_CERASE '#' 88 #define IBCS2_CKILL '@' 89 #define IBCS2_CSTART 021 90 #define IBCS2_CSTOP 023 91 #define IBCS2_CSWTCH 032 92 #define IBCS2_CNSWTCH 0 93 #define IBCS2_CSUSP 032 94 95 #define IBCS2_IGNBRK 0000001 96 #define IBCS2_BRKINT 0000002 97 #define IBCS2_IGNPAR 0000004 98 #define IBCS2_PARMRK 0000010 99 #define IBCS2_INPCK 0000020 100 #define IBCS2_ISTRIP 0000040 101 #define IBCS2_INLCR 0000100 102 #define IBCS2_IGNCR 0000200 103 #define IBCS2_ICRNL 0000400 104 #define IBCS2_IUCLC 0001000 105 #define IBCS2_IXON 0002000 106 #define IBCS2_IXANY 0004000 107 #define IBCS2_IXOFF 0010000 108 #define IBCS2_IMAXBEL 0020000 109 #define IBCS2_DOSMODE 0100000 110 111 #define IBCS2_OPOST 0000001 112 #define IBCS2_OLCUC 0000002 113 #define IBCS2_ONLCR 0000004 114 #define IBCS2_OCRNL 0000010 115 #define IBCS2_ONOCR 0000020 116 #define IBCS2_ONLRET 0000040 117 #define IBCS2_OFILL 0000100 118 #define IBCS2_OFDEL 0000200 119 #define IBCS2_NLDLY 0000400 120 #define IBCS2_NL0 0000000 121 #define IBCS2_NL1 0000400 122 #define IBCS2_CRDLY 0003000 123 #define IBCS2_CR0 0000000 124 #define IBCS2_CR1 0001000 125 #define IBCS2_CR2 0002000 126 #define IBCS2_CR3 0003000 127 #define IBCS2_TABDLY 0014000 128 #define IBCS2_TAB0 0000000 129 #define IBCS2_TAB1 0004000 130 #define IBCS2_TAB2 0010000 131 #define IBCS2_TAB3 0014000 132 #define IBCS2_BSDLY 0020000 133 #define IBCS2_BS0 0000000 134 #define IBCS2_BS1 0020000 135 #define IBCS2_VTDLY 0040000 136 #define IBCS2_VT0 0000000 137 #define IBCS2_VT1 0040000 138 #define IBCS2_FFDLY 0100000 139 #define IBCS2_FF0 0000000 140 #define IBCS2_FF1 0100000 141 142 #define IBCS2_CBAUD 0000017 143 #define IBCS2_CSIZE 0000060 144 #define IBCS2_CS5 0000000 145 #define IBCS2_CS6 0000020 146 #define IBCS2_CS7 0000040 147 #define IBCS2_CS8 0000060 148 #define IBCS2_CSTOPB 0000100 149 #define IBCS2_CREAD 0000200 150 #define IBCS2_PARENB 0000400 151 #define IBCS2_PARODD 0001000 152 #define IBCS2_HUPCL 0002000 153 #define IBCS2_CLOCAL 0004000 154 #define IBCS2_RCV1EN 0010000 155 #define IBCS2_XMT1EN 0020000 156 #define IBCS2_LOBLK 0040000 157 #define IBCS2_XCLUDE 0100000 158 159 #define IBCS2_ISIG 0000001 160 #define IBCS2_ICANON 0000002 161 #define IBCS2_XCASE 0000004 162 #define IBCS2_ECHO 0000010 163 #define IBCS2_ECHOE 0000020 164 #define IBCS2_ECHOK 0000040 165 #define IBCS2_ECHONL 0000100 166 #define IBCS2_NOFLSH 0000200 167 #define IBCS2_IEXTEN 0000400 168 #define IBCS2_TOSTOP 0001000 169 170 #define IBCS2_XIOC (('i'<<24)|('X'<<16)) 171 #define IBCS2_XCGETA (IBCS2_XIOC|1) 172 #define IBCS2_XCSETA (IBCS2_XIOC|2) 173 #define IBCS2_XCSETAW (IBCS2_XIOC|3) 174 #define IBCS2_XCSETAF (IBCS2_XIOC|4) 175 176 #define IBCS2_OXIOC ('x'<<8) 177 #define IBCS2_OXCGETA (IBCS2_OXIOC|1) 178 #define IBCS2_OXCSETA (IBCS2_OXIOC|2) 179 #define IBCS2_OXCSETAW (IBCS2_OXIOC|3) 180 #define IBCS2_OXCSETAF (IBCS2_OXIOC|4) 181 182 #define IBCS2_TIOC ('T'<<8) 183 #define IBCS2_TCGETA (IBCS2_TIOC|1) 184 #define IBCS2_TCSETA (IBCS2_TIOC|2) 185 #define IBCS2_TCSETAW (IBCS2_TIOC|3) 186 #define IBCS2_TCSETAF (IBCS2_TIOC|4) 187 #define IBCS2_TCSBRK (IBCS2_TIOC|5) 188 #define IBCS2_TCXONC (IBCS2_TIOC|6) 189 #define IBCS2_TCFLSH (IBCS2_TIOC|7) 190 191 #define IBCS2_TCGETSC (IBCS2_TIOC|34) 192 #define IBCS2_TCSETSC (IBCS2_TIOC|35) 193 194 #define IBCS2_TIOCSWINSZ (IBCS2_TIOC|103) 195 #define IBCS2_TIOCGWINSZ (IBCS2_TIOC|104) 196 #define IBCS2_TIOCSPGRP (IBCS2_TIOC|118) 197 #define IBCS2_TIOCGPGRP (IBCS2_TIOC|119) 198 199 #define IBCS2_TCSANOW IBCS2_XCSETA 200 #define IBCS2_TCSADRAIN IBCS2_XCSETAW 201 #define IBCS2_TCSAFLUSH IBCS2_XCSETAF 202 #define IBCS2_TCSADFLUSH IBCS2_XCSETAF 203 204 #define IBCS2_TCIFLUSH 0 205 #define IBCS2_TCOFLUSH 1 206 #define IBCS2_TCIOFLUSH 2 207 208 #define IBCS2_TCOOFF 0 209 #define IBCS2_TCOON 1 210 #define IBCS2_TCIOFF 2 211 #define IBCS2_TCION 3 212 213 #define IBCS2_B0 0 214 #define IBCS2_B50 1 215 #define IBCS2_B75 2 216 #define IBCS2_B110 3 217 #define IBCS2_B134 4 218 #define IBCS2_B150 5 219 #define IBCS2_B200 6 220 #define IBCS2_B300 7 221 #define IBCS2_B600 8 222 #define IBCS2_B1200 9 223 #define IBCS2_B1800 10 224 #define IBCS2_B2400 11 225 #define IBCS2_B4800 12 226 #define IBCS2_B9600 13 227 #define IBCS2_B19200 14 228 #define IBCS2_B38400 15 229 230 struct ibcs2_winsize { 231 u_short ws_row; 232 u_short ws_col; 233 u_short ws_xpixel; 234 u_short ws_ypixel; 235 }; 236 237 #endif /* _IBCS2_H_ */ 238 239