1.Dd Februar 17, 1995 2.Dt SNP(4) 3.Os 4.Sh NAME 5 6 snp - tty snoop interface. 7 8.Sh SYNOPSIS 9#include <sys/snoop.h> 10 11.Sh DESCRIPTION 12 /dev/snp? are snoop devices which allow user to attach to any tty 13and watch activities on it. Device can be used by root only. 14 To connect device to tty use special iocontrol SNPSTTY.Argument to 15it is a structure 'snptty'. 16 struct snptty { 17 int st_type; 18 int st_unit; 19 } 20 21st_type - type of tty to attach. Currently supported are : 22 ST_PTY - pseudo-tty devices. 23 ST_VTY - virtual ttys (syscons). 24 ST_SIO - serial ttys. 25 26st_unit - number of tty unit. 27By specifying ever st_type or st_unit -1 user can detach snp 28device from tty. 29 30 SNPGTTY - iocontrol returns current tty attached. 31 FIONREAD - iocontrol returns ever positive value equal to number of 32 characters in read buffer. Also special values defined: 33 SNP_OFLOW - device overflow occured,device automatically 34 detached. 35 SNP_TTYCLOSE - tty still has not been attached. 36 SNP_DETACH - snp device has been detached by user or 37 tty device has been closed and detached 38 automatically. 39 40.Sh SEE ALSO 41 42watch(8), pty(4), sio(4) 43.Sh BUGS 44 45While in line mode,user input can't be seen. 46Has no ability to write to attached tty device. 47 48.Sh HISTORY 49FreeBSD 2.1 by Ugen J.S.Antsilevich <ugen@NetVision.net.il> 50