Technical data

pty(7D) Devices SunOS 5.5
A few special ioctls are provided on the controller devices of pseudo-terminals to pro-
vide the functionalityneeded by applications programs to emulate real hardware inter-
faces:
TIOCSTOP
The argument is ignored. Output to the pseudo-terminal is suspended, as if a
STOP character had been typed.
TIOCSTART
The argument is ignored. Output to the pseudo-terminal is restarted, as if a
START character had been typed.
TIOCPKT
The argument is a pointer to an int. If the value of the int is non-zero, packet
mode is enabled; if the value of the int is zero, packet mode is disabled. When a
pseudo-terminal is in packet mode, each subsequentread(2) from the controller
device will return data written on the slave device preceded by a zero byte (sym-
bolically defined as TIOCPKT_DATA), or a single byte reflecting control status
information. In the latter case, the byte is an inclusive-or of zero or more of the
bits:
TIOCPKT_FLUSHREAD
whenever the read queue for the terminal is flushed.
TIOCPKT_FLUSHWRITE
whenever the write queue for the terminal is flushed.
TIOCPKT_STOP whenever output to the terminal is stopped usingˆS.
TIOCPKT_START whenever output to the terminal is restarted.
TIOCPKT_DOSTOP whenever XON/XOFF flow control is enabled after being
disabled; it is considered ‘‘enabled’’when theIXON flag in
the c_iflag word is set, the VSTOP member of the c_cc
array is ˆS and the VSTART member of the c_cc array is ˆQ.
TIOCPKT_NOSTOP whenever XON/XOFF flow control is disabled after being
enabled.
TIOCREMOTE
The argument is a pointer to an int. If the value of the int is non-zero, remote
mode is enabled; if the value of the int is zero, remote mode is disabled. This
mode can be enabled or disabled independently of packet mode. When a
pseudo-terminal is in remote mode, input to the slave device of the pseudo-
terminal is flow controlled and not input edited (regardless of the mode the slave
side of the pseudo-terminal). Each write to the controller device produces a
record boundary for the process reading the slave device. In normal usage, a
write of data is like the data typed as a line on the terminal; a write of 0 bytes is
like typingan EOF character. Note: this means that a process writing to a
pseudo-terminal controller in remote mode must keep track of line boundaries,
and write only one lineat a time to the controller. If, for example, it were to
buffer up several NEWLINE characters and write them to the controller with one
7D-268 modified 8 Aug 1994