]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/man/man4/snp.4
unfinished sblive driver, playback/mixer only for now - not enabled in
[FreeBSD/FreeBSD.git] / share / man / man4 / snp.4
1 .\"
2 .\" $FreeBSD$
3 .\"
4 .Dd February 24, 1995
5 .Dt SNP 4
6 .Os FreeBSD
7 .Sh NAME
8 .Nm snp
9 .Nd tty snoop interface
10 .Sh SYNOPSIS
11 .Fd #include <sys/snoop.h>
12 .Ft int
13 .Fn ioctl fd SNPSTTY &dev
14 .Ft int
15 .Fn ioctl fd SNPGTTY &dev
16 .Ft int
17 .Fn ioctl fd FIONREAD &result
18 .Sh DESCRIPTION
19 /dev/snp? are snoop devices which allow user to attach to any tty
20 and watch activities on it.
21
22 To associate a given
23 .Nm snp
24 device with a tty to be observed,  open the
25 .Nm snp
26 device and then use the SNPSTTY ioctl.
27 The argument passed to the IOCTL is the address of a variable of type
28 dev_t.
29 By setting the value of the variable pointed to -1, the user may detach
30 the snp device from a tty.
31 .Pp
32 The SNPGTTY ioctl returns information about the current tty attached to
33 the open
34 .Nm snp
35 device.
36 .Pp
37 The FIONREAD ioctl returns a positive value equal to the number of characters
38 in a read buffer.
39 Special values defined are:
40 .Bl -tag -width SNP_TTYCLOSE
41 .It Dv SNP_OFLOW
42 device overflow occured, device detached.
43 .It Dv SNP_TTYCLOSE
44 tty not attached.
45 .It Dv SNP_DETACH
46 .Nm snp
47 device has been detached by user or tty device has been closed
48 and detached.
49 .Sh SEE ALSO
50 .Xr pty 4 ,
51 .Xr sio 4 ,
52 .Xr watch 8
53 .Sh RESTRICTIONS
54 Only the superuser may access the
55 .Nm snp
56 devices.
57 .Sh BUGS
58 While in line mode, user input can't be seen.
59 No signals may be sent to the observed tty.
60 .Sh AUTHORS
61 .An Ugen J.S. Antsilevich Aq ugen@NetVision.net.il
62 .Sh HISTORY
63 The
64 .Nm snp
65 device first appeared in
66 .Fx 2.1 .