1 /* termios type and macro definitions. FreeBSD version.
2 Copyright (C) 1993-1994,1996-1997,1999,2001-2002 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 # error "Never include <bits/termios.h> directly; use <termios.h> instead."
24 /* These macros are also defined in some <bits/ioctls.h> files (with
25 numerically identical values), but this serves to shut up cpp's
39 #endif /* __USE_MISC */
52 typedef unsigned char cc_t
;
53 typedef unsigned int speed_t
;
54 typedef unsigned int tcflag_t
;
59 tcflag_t c_iflag
; /* input mode flags */
60 tcflag_t c_oflag
; /* output mode flags */
61 tcflag_t c_cflag
; /* control mode flags */
62 tcflag_t c_lflag
; /* local mode flags */
63 cc_t c_cc
[NCCS
]; /* control characters */
64 speed_t c_ispeed
; /* input speed */
65 speed_t c_ospeed
; /* output speed */
66 #define __ispeed c_ispeed
67 #define __ospeed c_ospeed
68 #define _HAVE_STRUCT_TERMIOS_C_ISPEED 1
69 #define _HAVE_STRUCT_TERMIOS_C_OSPEED 1
100 #define IGNBRK 0000001
101 #define BRKINT 0000002
102 #define IGNPAR 0000004
103 #define PARMRK 0000010
104 #define INPCK 0000020
105 #define ISTRIP 0000040
106 #define INLCR 0000100
107 #define IGNCR 0000200
108 #define ICRNL 0000400
110 #define IXOFF 0002000
111 #define IXANY 0004000
112 #define IMAXBEL 0020000
115 #define OPOST (1 << 0) /* Perform output processing. */
116 #define ONLCR (1 << 1) /* Map NL to CR-NL on output. */
117 #if defined __USE_MISC || defined __USE_XOPEN
118 # define TAB0 (0 << 2) /* no tab delay and expansion */
119 # define TAB3 (1 << 2) /* expand tabs to spaces */
120 # define TABDLY TAB3 /* tab delay mask */
125 # define ONOEOT (1 << 3) /* Discard EOT (^D) on output. */
127 #define OCRNL (1 << 4) /* map CR to NL on output */
128 #define ONOCR (1 << 5) /* no CR output at column 0 */
129 #define ONLRET (1 << 6) /* NL performs CR function */
131 /* c_cflag bit meaning */
133 # define CIGNORE (1 << 0) /* Ignore these control flags. */
135 #define CSIZE (CS5|CS6|CS7|CS8) /* Number of bits per byte (mask). */
136 #define CS5 (0 << 8) /* 5 bits per byte. */
137 #define CS6 (1 << 8) /* 6 bits per byte. */
138 #define CS7 (2 << 8) /* 7 bits per byte. */
139 #define CS8 (3 << 8) /* 8 bits per byte. */
140 #define CSTOPB (1 << 10) /* Two stop bits instead of one. */
141 #define CREAD (1 << 11) /* Enable receiver. */
142 #define PARENB (1 << 12) /* Parity enable. */
143 #define PARODD (1 << 13) /* Odd parity instead of even. */
144 #define HUPCL (1 << 14) /* Hang up on last close. */
145 #define CLOCAL (1 << 15) /* Ignore modem status lines. */
147 # define CCTS_OFLOW (1 << 16) /* CTS flow control of output. */
148 # define CRTS_IFLOW (1 << 17) /* RTS flow control of input. */
149 # define CRTSCTS (CCTS_OFLOW|CRTS_IFLOW) /* CTS/RTS flow control. */
150 # define CDTR_IFLOW (1 << 18) /* DTR flow control of input. */
151 # define CDSR_OFLOW (1 << 19) /* DSR flow control of output. */
152 # define CCAR_OFLOW (1 << 20) /* DCD flow control of output. */
153 # define MDMBUF (1 << 20) /* Carrier flow control of output. */
158 # define ECHOKE (1 << 0) /* Visual erase for KILL. */
160 #define ECHOE (1 << 1) /* Visual erase for ERASE. */
161 #define ECHOK (1 << 2) /* Echo NL after KILL. */
162 #define ECHO (1 << 3) /* Enable echo. */
163 #define ECHONL (1 << 4) /* Echo NL even if ECHO is off. */
165 # define ECHOPRT (1 << 5) /* Hardcopy visual erase. */
166 # define ECHOCTL (1 << 6) /* Echo control characters as ^X. */
168 #define ISIG (1 << 7) /* Enable signals. */
169 #define ICANON (1 << 8) /* Do erase and kill processing. */
171 # define ALTWERASE (1 << 9) /* Alternate WERASE algorithm. */
173 #define IEXTEN (1 << 10) /* Enable DISCARD and LNEXT. */
175 # define EXTPROC (1 << 11) /* External processing. */
177 #define TOSTOP (1 << 22) /* Send SIGTTOU for background output. */
179 # define FLUSHO (1 << 23) /* Output being flushed (state). */
180 # define NOKERNINFO (1 << 25) /* Disable VSTATUS. */
181 # define PENDIN (1 << 29) /* Retype pending input (state). */
183 #define NOFLSH (1 << 31) /* Disable flush after interrupt. */
185 /* Input and output baud rates. */
186 #define B0 0 /* Hang up. */
187 #define B50 50 /* 50 baud. */
188 #define B75 75 /* 75 baud. */
189 #define B110 110 /* 110 baud. */
190 #define B134 134 /* 134.5 baud. */
191 #define B150 150 /* 150 baud. */
192 #define B200 200 /* 200 baud. */
193 #define B300 300 /* 300 baud. */
194 #define B600 600 /* 600 baud. */
195 #define B1200 1200 /* 1200 baud. */
196 #define B1800 1800 /* 1800 baud. */
197 #define B2400 2400 /* 2400 baud. */
198 #define B4800 4800 /* 4800 baud. */
199 #define B9600 9600 /* 9600 baud. */
200 #define B19200 19200 /* 19200 baud. */
201 #define B38400 38400 /* 38400 baud. */
211 #define B115200 115200
212 #define B230400 230400
213 #define B460800 460800
214 #define B500000 500000
215 #define B576000 576000
216 #define B921600 921600
217 #define B1000000 1000000
218 #define B1152000 1152000
219 #define B1500000 1500000
220 #define B2000000 2000000
221 #define B2500000 2500000
222 #define B3000000 3000000
223 #define B3500000 3500000
224 #define B4000000 4000000
225 #define __MAX_BAUD B4000000
227 /* tcflow() and TCXONC use these */
233 /* tcflush() and TCFLSH use these */
238 /* tcsetattr uses these */
243 # define TCSASOFT 0x10 /* Flag: Don't alter hardware state. */