9 .Nd tty snoop interface
11 .Fd #include <sys/snoop.h>
13 .Fn ioctl fd SNPSTTY &dev
15 .Fn ioctl fd SNPGTTY &dev
17 .Fn ioctl fd FIONREAD &result
19 /dev/snp? are snoop devices which allow user to attach to any tty
20 and watch activities on it.
24 device with a tty to be observed, open the
26 device and then use the SNPSTTY ioctl.
27 The argument passed to the IOCTL is the address of a variable of type
29 By setting the value of the variable pointed to -1, the user may detach
30 the snp device from a tty.
32 The SNPGTTY ioctl returns information about the current tty attached to
37 The FIONREAD ioctl returns a positive value equal to the number of characters
39 Special values defined are:
40 .Bl -tag -width SNP_TTYCLOSE
42 device overflow occured, device detached.
47 device has been detached by user or tty device has been closed
55 Only the superuser may access the
59 While in line mode, user input can't be seen.
60 No signals may be sent to the observed tty.
62 .An Ugen J.S. Antsilevich Aq ugen@NetVision.net.il
66 device first appeared in