attach a line discipline to a serial
ldattach is used to attach a line
discipline to a serial line to allow for in-kernel processing of the
received and/or sent data. Depending on the line discipline being attached,
one or more options may be applied.
ldattach can be run from the command line
or at system startup by having
ttys(5) entries to attach line disciplines.
The following options are available:
- Use 2 stopbits instead of 1.
- Use 7 databits instead of 8.
- Do not daemonize.
- Use even parity.
- Turn on RTS/CTS flow control. By default, no flow control is done.
- Maintain modem control signals after closing the line. Specifically, this disables HUPCL.
- Use odd parity.
- Pass the data received from device to the master device of a pty(4) pair and vice versa. The name of the slave device is written to standard output.
- Specifies the speed of the connection. If not specified, the default of 9600 baud is used (4800 baud for nmea(4)).
- nmea(4), msts(4) and
endrun(4) line disciplines only. Chooses the condition which will
cause the current system time to be immediately copied to the terminal
timestamp storage for subsequent use by
nmea(4), msts(4) or
endrun(4). Only one can be used.
- Copy the timestamp when DCD is asserted.
- Copy the timestamp when DCD is deasserted.
- Copy the timestamp when CTS is asserted.
- Copy the timestamp when CTS is deasserted.
If no condition is specified, the nmea(4) line discipline will timestamp on receiving the leading ‘$’ character of each block of NMEA sentences.
- Specifies the name of the line discipline to be attached.
- Specifies the name of the serial line. device should
be a string of the form “cuaXX” or
cua(4) devices should be used when
ldattachis started from the command line; when started using init(8), tty(4) devices should be used.
ldattach was not started by
init(8), the line discipline can be detached by killing off the
init(8) to attach the
nmea(4) line discipline to /dev/tty01 at 4800
baud using a device without a carrier (DCD) line, add a line of the
following form to /etc/ttys:
tty01 "/sbin/ldattach nmea" unknown on softcar
endrun(4), msts(4), nmea(4), pty(4), tty(4), ttys(5), init(8)
ldattach command first appeared in