Go to the previous, next section.
This section describes the terminal flags and fields that control
parameters usually associated with asynchronous serial data
transmission. These flags may not make sense for other kinds of
terminal ports (such as a network connection pseudo-terminal). All of
these are contained in the c_cflag member of the struct
termios structure.
The c_cflag member itself is an integer, and you change the flags
and fields using the operators &, |, and ^. Don't
try to specify the entire value for c_cflag---instead, change
only specific flags and leave the rest untouched (see section Setting Terminal Modes Properly).
CLOCAL
If this bit is not set and you call open without the
O_NONBLOCK flag set, open blocks until a modem
connection is established.
If this bit is not set and a modem disconnect is detected, a
SIGHUP signal is sent to the controlling process group for the
terminal (if it has one). Normally, this causes the process to exit;
see section Signal Handling. Reading from the terminal after a disconnect
causes an end-of-file condition, and writing causes an EIO error
to be returned. The terminal device must be closed and reopened to
clear the condition.
HUPCL
CREAD
CSTOPB
PARENB
If this bit is not set, no parity bit is added to output characters, and input characters are not checked for correct parity.
PARODD
PARENB is set. If PARODD is set,
odd parity is used, otherwise even parity is used.
The control mode flags also includes a field for the number of bits per
character. You can use the CSIZE macro as a mask to extract the
value, like this: settings.c_cflag & CSIZE.
CSIZE
CS5
CS6
CS7
CS8
CCTS_OFLOW
CRTS_IFLOW
MDMBUF
Go to the previous, next section.