is a snoop device which allows users to attach to any tty
and watch activities on it.
The kernel must be compiled with
.Cd device snp ,
module must be loaded,
for these devices to be available.
To associate a given
device with a tty to be observed, open the
device and a tty device, and then issue the
The argument passed to the
is the address of a variable of type
.Vt int ,
holding the file descriptor of a tty device.
To detach the
device from a tty use a pointer to a value of
ioctl returns information about the current tty attached to
ioctl returns a positive value equal to the number of characters
in a read buffer.
Special values defined are:
device overflow occurred, device detached.
tty not attached.
device has been detached by user or tty device has been closed