HP-UX Reference (11i v2 07/12) - 7 Device (Special) Files, 9 General Information, Index (vol 10)

l
ldterm(7) ldterm(7)
It generates echo characters and places them in the output buffer to be sent downstream to
the write queue. While processing incoming data, it scans for
START and STOP characters
and sends
M_START, M_STOP messages downstream to the write queue, if needed.
If the total number of buffered input characters is more than the high-water mark and
IXOFF is set, the read put routine sends an
M_STOPI message downstream. When the
queue reduces its backlog below the low water mark, it sends an
M_STARTI message
downstream.
If the number of buffered input characters reaches
MAX_INPUT, and the IMAXBEL flag is
set, the read put routine discards new input characters and sends a
BEL character
(
Ctrl-G) downstream. If IMAXBEL is not set, it flushes the input queue.
If the
ISIG flag is set, the read put routine sends
M_PCSIG messages upstream when the
appropriate signal characters are encountered. Then it discards the characters.
If a character matching
c_cc[VDISCARD]
is encountered, and the IEXTEN flag is set,
the read put routine sends an
M_FLUSH (
FLUSHW) message upstream to flush all write
queues. The
M_FLUSH message is reflected by the stream head and sent downstream
through all the write queues.
If the character signifies the logical termination of input, the read put routine sends the
currently buffered characters upstream to the stream head.
Logical termination of input depends on the state of the ICANON flag. If ICANON is set,
the
ldterm module is in canonical input mode. In that case, the read put routine logically
terminates input at the end of a line of input. Canonical line termination characters are
NEWLINE, EOF, EOL, and EOL2.IfICANON is clear, the ldterm discipline module is in
noncanonical or raw input mode. In that case, the read put routine terminates input when
at least
VMIN bytes are present in the input message buffer or the timer specified by
VTIME expires (see termio(7) for more details).
M_IOCACK If the message acknowledges the POSIX termios TCGETS command, the read put rou-
tine copies the c_cflag and speeds information, which is sent by the console driver down-
stream, from the message into the internal POSIX termios structure. Then it copies the
internal POSIX termios structure into the message.
If the message acknowledges one of the POSIX termios set commands (i.e. TCSETS,
TCSETSW, and TCSETSF) the read put routine copies all of the data from the message
into the internal POSIX termios structure.
After this processing is done, the read put routine determines if the I/O control command
was originally a BSD 4.3 or System V I/O control command that was converted to a POSIX
termios command by the write service routine. If so, it restores the original data so that
the message acknowledges the original I/O control command. Then it forwards the mes-
sage upstream.
M_CTL This message was sent by the driver to make special requests to ldterm. The structure
of M_CTL messages is the same as that of M_IOCTL messages. The M_CTL message block
points to a message buffer containing an iocblk data structure (defined in
<sys/stream.h>). The ioc_cmd member of this structure contains a command, just
as it does in an M_IOCTL message. The b_cont member of the M_CTL message block
contains a pointer to an M_DATA message block, which contains data associated with the
M_CTL message.
The read put routine processes M_CTL messages containing the following commands:
MC_NO_CANON
Turn off input processing normally performed on upstream M_DATA messages. This
is for the use of modules or drivers that perform their own input processing such as
pseudo-terminal (see ptm(7) and pts(7)) in REMOTE mode connected to a program that
performs the input processing.
MC_DO_CANON
Turn on input processing normally performed on upstream M_DATA messages. This
message is sent when the driver want ldterm to exit the REMOTE mode.
76 Hewlett-Packard Company 2 HP-UX 11i Version 2: December 2007 Update