2 .\" Copyright (c) 2001, The IEEE and The Open Group. All Rights Reserved. Portions Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
4 .\" http://www.opengroup.org/bookstore/.
5 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
6 .\" This notice shall appear on any product containing this material.
7 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
9 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
10 .TH TERMIOS.H 3HEAD "Sep 10, 2004"
12 termios.h, termios \- define values for termios
16 #include <\fBtermios.h\fR>
22 The <\fBtermios.h\fR> header contains the definitions used by the terminal I/O
23 interfaces. See \fBtermios\fR(3C) and \fBtermio\fR(7I) for an overview of the
25 .SS "The termios Structure"
28 The following data types are defined through \fBtypedef\fR:
35 used for terminal special characters
44 used for terminal baud rates
53 used for terminal modes
58 The above types are all unsigned integer types.
61 The implementation supports one or more programming environments in which the
62 widths of \fBcc_t\fR, \fBspeed_t\fR, and \fBtcflag_t\fR are no greater than the
63 width of type \fBlong\fR. The names of these programming environments can be
64 obtained using the \fBconfstr\fR(3C) function or the \fBgetconf\fR(1) utility.
67 The \fBtermios\fR structure is defined and includes the following members:
71 tcflag_t c_iflag /* input modes */
72 tcflag_t c_oflag /* output modes */
73 tcflag_t c_cflag /* control modes */
74 tcflag_t c_lflag /* local modes */
75 cc_t c_cc[NCCS] /* control characters */
81 A definition is provided for:
88 size of the array \fBc_cc\fR for control characters
93 The following subscript names for the array \fBc_cc\fR are defined:
100 Subscript UsageCanonical Mode Subscript UsageNon-Canonical Mode Description
102 \fBVEOF\fR EOF character
103 \fBVEOL\fR EOL character
104 \fBVERASE\fR ERASE character
105 \fBVINTR\fR \fBVINTR\fR INTR character
106 \fBVKILL\fR KILL character
108 \fBVQUIT\fR \fBVQUIT\fR QUIT character
109 \fBVSTART\fR \fBVSTART\fR START character
110 \fBVSTOP\fR \fBVSTOP\fR STOP character
111 \fBVSUSP\fR \fBVSUSP\fR SUSP character
112 \fBVTIME\fR TIME value
117 The subscript values are unique, except that the \fBVMIN\fR and \fBVTIME\fR
118 subscripts can have the same values as the \fBVEOF\fR and \fBVEOL\fR
119 subscripts, respectively.
122 The header file provides the flags described below.
126 The \fBc_iflag\fR field describes the basic terminal input control:
133 Signal interrupt on break.
142 Map CR to NL on input.
151 Ignore break condition.
169 Ignore characters with parity errors.
178 Map NL to CR on input.
187 Enable input parity check.
205 Enable any character to restart output.
214 Enable start/stop input control.
223 Enable start/stop output control.
238 The \fBc_oflag\fR field specifies the system treatment of output:
254 Map NL to CR-NL on output.
263 Map CR to NL on output.
272 No CR output at column 0.
281 NL performs CR function.
290 Use fill characters for delay.
299 Select newline delays:
326 Select carriage-return delays:
333 carriage-return delay type 0
342 carriage-return delay type 1
351 carriage-return delay type 2
360 carriage-return delay type 3
371 Select horizontal-tab delays:
378 horizontal-tab delay type 0
387 horizontal-tab delay type 1
396 horizontal-tab delay type 2
405 expand tabs to spaces
416 Select backspace delays:
423 backspace-delay type 0
432 backspace-delay type 1
443 Select vertical-tab delays:
450 vertical-tab delay type 0
459 vertical-tab delay type 1
470 Select form-feed delays:
477 form-feed delay type 0
486 form-feed delay type 1
491 .SS "Baud Rate Selection"
494 The input and output baud rates are stored in the \fBtermios\fR structure.
495 These are the valid values for objects of type \fBspeed_ t\fR. The following
496 values are defined, but not all baud rates need be supported by the underlying
645 The \fBc_cflag\fR field describes the hardware control of the terminal; not all
646 values specified are required to be supported by the underlying hardware:
698 Send two stop bits, else one.
725 Odd parity, else even.
734 Hang up on last close.
743 Ignore modem status lines.
748 The implementation supports the functionality associated with the symbols
749 \fBCS7\fR, \fBCS8\fR, \fBCSTOPB\fR, \fBPARODD\fR, and \fBPARENB\fR.
753 The \fBc_lflag\fR field of the argument structure is used to control various
770 Echo erase character as error-correcting backspace.
797 Canonical input (erase and kill processing).
806 Enable extended input character processing.
824 Disable flush after interrupt or quit.
833 Send \fBSIGTTOU\fR for background output.
836 .SS "Attribute Selection"
839 The following symbolic constants for use with \fBtcsetattr()\fR are defined:
846 Change attributes immediately.
852 \fB\fBTCSADRAIN\fR\fR
855 Change attributes when output has drained.
861 \fB\fBTCSAFLUSH\fR\fR
864 Change attributes when output has drained; also flush pending input.
870 The following symbolic constants for use with \fBtcflush()\fR are defined:
883 \fB\fBTCIOFLUSH\fR\fR
886 Flush both pending input and untransmitted output.
895 Flush untransmitted output.
900 The following symbolic constants for use with \fBtcflow()\fR are defined:
907 Transmit a \fBSTOP\fR character, intended to suspend input data.
916 Transmit a \fBSTART\fR character, intended to restart input data.
940 See \fBattributes\fR(5) for descriptions of the following attributes:
948 ATTRIBUTE TYPE ATTRIBUTE VALUE
950 Interface Stability Standard
956 \fBgetconf\fR(1), \fBcfgetispeed\fR(3C), \fBcfsetispeed\fR(3C),
957 \fBconfstr\fR(3C), \fBtcdrain\fR(3C), \fBtcflow\fR(3C), \fBtcflush\fR(3C),
958 \fBtcgetattr\fR(3C), \fBtcgetsid\fR(3C), \fBtcsendbreak\fR(3C),
959 \fBtcsetattr\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)