#include <sys/termios.h>
sys/termios.h
macroVEOF
Special Control Characters
Index into c_cc[] character array.
Name Subscript Enabled by
#define VEOF 0
macroCCEQ
#define CCEQ(val, c) ((c) == (val) ? (val) != _POSIX_VDISABLE : 0)
macroOPOST
Output flags - software output processing
#define OPOST 0x00000001
enable following output processing
macroOCRNL
The following block of features is unimplemented. Use of these flags in
programs will currently result in unexpected behaviour.
- Begin unimplemented features
#define OCRNL 0x00000010
map CR to NL on output
macroNL0
These manifest constants have the same names as those in the header
<sys/ioctl_compat.h>, so you are not permitted to have both definitions
in scope simultaneously in the same compilation unit. Nevertheless,
they are required to be in scope when _POSIX_C_SOURCE is requested;
this means that including the <sys/ioctl_compat.h> header before this
one when _POSIX_C_SOURCE is in scope will result in redefintions. We
attempt to maintain these as the same values so as to avoid this being
an outright error in most compilers.
#define NL0 0x00000000
macroNL1
#define NL1 0x00000100
macroNL2
#define NL2 0x00000200
macroNL3
#define NL3 0x00000300
macroTAB0
#define TAB0 0x00000000
macroTAB1
#define TAB1 0x00000400
macroTAB2
#define TAB2 0x00000800
macroCR0
#define CR0 0x00000000
macroCR1
#define CR1 0x00001000
macroCR2
#define CR2 0x00002000
macroCR3
#define CR3 0x00003000
macroFF0
#define FF0 0x00000000
macroFF1
#define FF1 0x00004000
macroBS0
#define BS0 0x00000000
macroBS1
#define BS1 0x00008000
macroVT0
#define VT0 0x00000000
macroVT1
#define VT1 0x00010000
macroCIGNORE
Control flags - hardware control of terminal
#define CIGNORE 0x00000001
ignore control flags
macroCRTSCTS
#define CRTSCTS (CCTS_OFLOW | CRTS_IFLOW)
typedeftcflag_t
typedef unsigned long tcflag_t
typedefcc_t
typedef unsigned char cc_t
typedefspeed_t
typedef unsigned long speed_t
structtermios
| tcflag_t | c_iflag | input flags |
| tcflag_t | c_oflag | output flags |
| tcflag_t | c_cflag | control flags |
| tcflag_t | c_lflag | local flags |
| cc_t[20] | c_cc | control chars |
| speed_t | c_ispeed | input speed |
| speed_t | c_ospeed | output speed |
macroTCSANOW
Commands passed to tcsetattr() for setting the termios structure.
#define TCSANOW 0
make change immediate
macroB50
#define B50 50
macroB75
#define B75 75
macroB110
#define B110 110
macroB134
#define B134 134
macroB150
#define B150 150
macroB200
#define B200 200
macroB300
#define B300 300
macroB600
#define B600 600
macroB1200
#define B1200 1200
macroB1800
#define B1800 1800
macroB2400
#define B2400 2400
macroB4800
#define B4800 4800
macroB9600
#define B9600 9600
macroB19200
#define B19200 19200
macroB38400
#define B38400 38400
macroB7200
#define B7200 7200
macroB14400
#define B14400 14400
macroB28800
#define B28800 28800
macroB57600
#define B57600 57600
macroB76800
#define B76800 76800
macroB115200
#define B115200 115200
macroB230400
#define B230400 230400
macroEXTA
#define EXTA 19200
macroEXTB
#define EXTB 38400
macroTCIFLUSH
#define TCIFLUSH 1
macroTCOFLUSH
#define TCOFLUSH 2
macroTCIOFLUSH
#define TCIOFLUSH 3
macroTCOOFF
#define TCOOFF 1
macroTCOON
#define TCOON 2
macroTCIOFF
#define TCIOFF 3
macroTCION
#define TCION 4
functioncfgetispeed
speed_t cfgetispeed(const struct termios *)
man page · January 2, 1994
cfgetispeed(3) — manipulating the termios structurefunctioncfgetospeed
speed_t cfgetospeed(const struct termios *)
man page · January 2, 1994
cfgetospeed(3) — manipulating the termios structurefunctioncfsetispeed
int cfsetispeed(struct termios *, speed_t)
man page · January 2, 1994
cfsetispeed(3) — manipulating the termios structurefunctioncfsetospeed
int cfsetospeed(struct termios *, speed_t)
man page · January 2, 1994
cfsetospeed(3) — manipulating the termios structurefunctiontcgetattr
int tcgetattr(int, struct termios *)
man page · January 2, 1994
tcgetattr(3) — manipulating the termios structurefunctiontcsetattr
int tcsetattr(int, int, const struct termios *)
man page · January 2, 1994
tcsetattr(3) — manipulating the termios structurefunctiontcdrain
__DARWIN_ALIAS_C(tcdrain)
int tcdrain(int)man page · June 4, 1993
tcdrain(3) — line control functionsfunctiontcsendbreak
int tcsendbreak(int, int)
man page · June 4, 1993
tcsendbreak(3) — line control functionsfunctioncfmakeraw
void cfmakeraw(struct termios *)
man page · January 2, 1994
cfmakeraw(3) — manipulating the termios structurefunctioncfsetspeed
int cfsetspeed(struct termios *, speed_t)
man page · January 2, 1994
cfsetspeed(3) — manipulating the termios structure