Technical data
SunOS 5.5 Ioctl Requests termiox(7I)
Terminal Parameters The parameters that control the behavior of devices providing the termiox interface are
specified by the termiox structure, defined in the <sys/termiox.h> header. Several ioctl(2)
system calls that fetch or change these parameters use this structure:
#define NFF 5
struct termiox {
unsigned short x_hflag; /∗ hardware flow control modes ∗/
unsigned short x_cflag; /∗ clock modes ∗/
unsigned short x_rflag[NFF]; /∗ reserved modes ∗/
unsigned short x_sflag; /∗ spare local modes ∗/
};
The x_hflag field describes hardware flow control modes:
RTSXOFF 0000001 Enable RTS hardware flow control on input.
CTSXON 0000002 Enable CTS hardware flow control on output.
DTRXOFF 0000004 Enable DTR hardware flow control on input.
CDXON 0000010 Enable CD hardware flow control on output.
ISXOFF 0000020 Enable isochronous hardware flow control on input.
The EIA-232-D DTR and CD circuits are used to establish a connection between two sys-
tems. The RTS circuit is also used to establish a connection with a modem. Thus, both
DTR and RTS are activated when an asynchronous port is opened. If DTR is used for
hardware flow control, then RTS must be used for connectivity. If CD is used for
hardware flow control, then CTS must be used for connectivity. Thus, RTS and DTR (or
CTS and CD) cannot both be used for hardware flow control at the same time. Other
mutual exclusions may apply, such as the simultaneous setting of the termio(7I) HUPCL
and the termiox DTRXOFF bits, which use the DTE ready line for different functions.
Variations of different hardware flow control methods may be selected by setting the the
appropriate bits. For example, bi-directionalRTS/CTS flow control is selected by setting
both the RTSXOFF and CTSXON bits and bi-directional DTR/CTS flow control is
selected by setting both the DTRXOFF and CTSXON. Modem control or uni-directional
CTS hardware flow control is selected by setting only the CTSXON bit.
As previously mentioned, it is assumed that the local asynchronous port (for example,
computer) is configured as a DTE. If the connected device (for example, printer) is also a
DTE, it is assumed that the device is connected to the computer’s asynchronous port
using a null modem that swaps control circuits (typically RTS andCTS). The connected
DTE drives RTS and the null modem swaps RTS and CTS so that the remoteRTS is received
as CTS by the localDTE. In the case that CTSXON is set for hardware flow control,
printer’s lowering of itsRTS would causeCTS seen by the computer to be lowered. Out-
put to the printer is suspended until the printer’s raising of its RTS, which would cause
CTS seen by the computer to be raised.
If RTSXOFF is set, the Request To Send (RTS) circuit (line) will be raised, and if the asyn-
chronous port needs to have its input stopped, it will lower the Request To Send (RTS)
line. If the RTS line is lowered, it is assumed that the connected device will stop its output
untilRTS is raised.
modified 3 Jul 1990 7I-365










