node type is both a netgraph node type and a line discipline.
A new node is created when the corresponding line discipline,
is registered on a tty device (see
The node has a single hook called
Incoming bytes received on the tty device are sent out on this hook,
and frames received on
are transmitted out on the tty device.
No modification to the data is performed in either direction.
While the line discipline is installed on a tty, the normal
read and write operations are unavailable, returning
Er EIO .
The node supports an optional
If set to non-zero, incoming
data from the tty device is queued until this character is seen.
This avoids sending lots of mbufs containing a small number of bytes,
but introduces potentially infinite latency.
The default hot character is 0x7e, consistent with
being connected to a
The hot character has no effect on the transmission of data.
The node will attempt to give itself the same netgraph name as the name
of the tty device.
In any case, information about the node is available via the netgraph
This command returns a
similar to the
netgraph control message.
This node type supports the following hooks:
serial data contained in
structures, with arbitrary inter-frame boundaries.
This node type supports the generic control messages, plus the following:
This command takes an integer argument and sets the hot character
from the lower 8 bits.
A hot character of zero disables queueing,
so that all received data is forwarded immediately.
Returns an integer containing the current hot character in the lower
This node shuts down when the corresponding device is closed
(or the line discipline is uninstalled on the device).
control message is not valid, and always returns the error
Er EOPNOTSUPP .
The serial driver code also has a notion of a
Unfortunately, this value is statically defined in terms of the
line discipline and cannot be changed.
Therefore, if a hot character other than 0x7e (the default) is set for the
node, the node has no way to convey this information to the
serial driver, and sub-optimal performance may result.