|SNP(4)||Device Drivers Manual||SNP(4)|
snp — tty snoop
/dev/snp is a snoop device which allows
users to attach to any tty and watch activities on it. The kernel must be
device snp, or the
snp module must be loaded, for these devices to be
To associate a given
snp device with a tty
to be observed, open the
snp device and a tty
device, and then issue the
SNPSTTY ioctl on
snp device. The argument passed to the
ioctl(2) is the address of a variable of type
int, holding the file descriptor of a tty device. To
snp device from a tty use a pointer to a
value of -1.
SNPGTTY ioctl returns information
about the current tty attached to the open
FIONREAD ioctl returns a positive
value equal to the number of characters in a read buffer. Special values
- device overflow occurred, device detached.
- tty not attached.
snpdevice has been detached by user or tty device has been closed and detached.
snp device first appeared in
FreeBSD 2.1. In FreeBSD 8.0
snp driver was rewritten to work with the
replaced TTY subsystem.
The author of the current implementation is Ed
Previous versions of
snp were based on code written
by Ugen J.S. Antsilevich
This version of
snp does not return proper
error codes when calling
FIONREAD. It also does not
SNPSTTY to detach itself from the TTY.
|November 5, 2008||Debian|