Defines the structure of the termiox file, which provides the extended terminal interface.
The termiox.h file contains an extended terminal interface to support asynchronous hardware flow control. It defines the termiox structure and ioctl operations using this structure. The termiox structure in the termiox.h file contains the following fields:
The termiox.h file also supports ioctl hardware flow control operations.
Field | Descriptions |
---|---|
x_hflag | Describes the hardware flow control mode. The possible modes
are:
It is not possible to use simultaneously the following flow control modes:
Different hardware flow control modes may be selected by setting the appropriate flags. For example:
|
x_cflag | Reserved for future use. |
x_rflag | Reserved for future use. |
x_sflag | Describes the open discipline. This field must be set before
the first open; it is usually done at configuration time. The possible
disciplines are:
|
Hardware Flow Control Operations
The following ioctl operations are used for hardware flow control. To use these operations in a program, the program must contain an #include statement for the ioctl.h file. The argument to these operations is a pointer to a termiox structure.
Item | Description |
---|---|
TCGETX | Gets the terminal parameters. The current terminal parameters are stored in the structure. |
TCSETX | Sets the terminal parameters immediately. The current terminal parameters are set according to the structure. The change is immediate. |
TCSETXW | Sets the terminal parameters after end of output. The current terminal parameters are set according to the structure. The change occurs after all characters queued for output have been transmitted. This operation should be used when changing parameters will affect output. |
TCSETXF | Sets the terminal parameters after end of output and flushes input. The current terminal parameters are set according to the structure. All characters queued for output are first transmitted, then all characters queued for input are discarded, and then the change occurs. |