Remove not needed void casts.
[dragonfly.git] / share / man / man4 / snp.4
1 .\"
2 .\" $FreeBSD: src/share/man/man4/snp.4,v 1.15.2.6 2002/08/03 12:04:15 schweikh Exp $
3 .\" $DragonFly: src/share/man/man4/snp.4,v 1.2 2003/06/17 04:36:59 dillon Exp $
4 .\"
5 .Dd February 24, 1995
6 .Dt SNP 4
7 .Os
8 .Sh NAME
9 .Nm snp
10 .Nd tty snoop interface
11 .Sh SYNOPSIS
12 .In sys/snoop.h
13 .Ft int
14 .Fn ioctl fd SNPSTTY &dev
15 .Ft int
16 .Fn ioctl fd SNPGTTY &dev
17 .Ft int
18 .Fn ioctl fd FIONREAD &result
19 .Sh DESCRIPTION
20 /dev/snp? are snoop devices which allow users to attach to any tty
21 and watch activities on it.
22 The kernel must be compiled with
23 .Cd "device snp" ,
24 or the
25 .Nm
26 device must be loaded,
27 for these devices to be available.
28 .Pp
29 To associate a given
30 .Nm
31 device with a tty to be observed, open the
32 .Nm
33 device and then use the SNPSTTY ioctl.
34 The argument passed to the ioctl is the address of a variable of type
35 dev_t.
36 To detach the snp device from a tty use a pointer to a value of (dev_t)-1.
37 .Pp
38 The SNPGTTY ioctl returns information about the current tty attached to
39 the open
40 .Nm
41 device.
42 .Pp
43 The FIONREAD ioctl returns a positive value equal to the number of characters
44 in a read buffer.
45 Special values defined are:
46 .Bl -tag -width SNP_TTYCLOSE
47 .It Dv SNP_OFLOW
48 device overflow occurred, device detached.
49 .It Dv SNP_TTYCLOSE
50 tty not attached.
51 .It Dv SNP_DETACH
52 .Nm
53 device has been detached by user or tty device has been closed
54 and detached.
55 .El
56 .Sh SEE ALSO
57 .Xr pty 4 ,
58 .Xr sio 4 ,
59 .Xr kldload 8 ,
60 .Xr watch 8
61 .Sh BUGS
62 Caveat emptor!
63 This manual page is horribly stale and wildly inaccurate in some places.
64 .Pp
65 While in line mode, user input can't be seen.
66 No signals may be sent to the observed tty.
67 .Sh AUTHORS
68 .An Ugen J.S. Antsilevich Aq ugen@NetVision.net.il
69 .Sh HISTORY
70 The
71 .Nm
72 device first appeared in
73 .Fx 2.1 .