freebsd-skq/share/man/man4/snp.4

73 lines
1.5 KiB
Groff
Raw Normal View History

1995-02-23 01:25:48 +00:00
.\"
1999-08-28 00:22:10 +00:00
.\" $FreeBSD$
1995-02-23 01:25:48 +00:00
.\"
.Dd February 24, 1995
1995-02-23 01:25:48 +00:00
.Dt SNP 4
.Os
.Sh NAME
1995-02-23 01:25:48 +00:00
.Nm snp
.Nd tty snoop interface
.Sh SYNOPSIS
.In sys/snoop.h
1995-02-23 01:25:48 +00:00
.Ft int
.Fn ioctl fd SNPSTTY &dev
1995-02-23 01:25:48 +00:00
.Ft int
.Fn ioctl fd SNPGTTY &dev
1995-02-23 01:25:48 +00:00
.Ft int
.Fn ioctl fd FIONREAD &result
.Sh DESCRIPTION
/dev/snp? are snoop devices which allow users to attach to any tty
1995-02-23 01:25:48 +00:00
and watch activities on it.
The kernel must be compiled with
.Cd "device snp" ,
or the
.Nm
device must be loaded,
for these devices to be available.
2000-12-29 09:18:45 +00:00
.Pp
1995-02-23 01:25:48 +00:00
To associate a given
.Nm
device with a tty to be observed, open the
.Nm
1995-02-23 01:25:48 +00:00
device and then use the SNPSTTY ioctl.
The argument passed to the ioctl is the address of a variable of type
dev_t.
To detach the snp device from a tty use a pointer to a value of (dev_t)-1.
1995-02-23 01:25:48 +00:00
.Pp
The SNPGTTY ioctl returns information about the current tty attached to
the open
.Nm
1995-02-23 01:25:48 +00:00
device.
.Pp
The FIONREAD ioctl returns a positive value equal to the number of characters
in a read buffer.
Special values defined are:
.Bl -tag -width SNP_TTYCLOSE
.It Dv SNP_OFLOW
2002-01-21 12:09:13 +00:00
device overflow occurred, device detached.
1995-02-23 01:25:48 +00:00
.It Dv SNP_TTYCLOSE
tty not attached.
.It Dv SNP_DETACH
.Nm
device has been detached by user or tty device has been closed
and detached.
2000-12-29 09:18:45 +00:00
.El
.Sh SEE ALSO
1995-02-23 01:25:48 +00:00
.Xr pty 4 ,
1996-12-26 16:16:37 +00:00
.Xr sio 4 ,
.Xr kldload 8 ,
1996-12-26 16:16:37 +00:00
.Xr watch 8
.Sh BUGS
Caveat emptor!
This manual page is horribly stale and wildly inaccurate in some places.
.Pp
1995-02-23 01:25:48 +00:00
While in line mode, user input can't be seen.
1995-02-28 00:24:47 +00:00
No signals may be sent to the observed tty.
.Sh AUTHORS
.An Ugen J.S. Antsilevich Aq ugen@NetVision.net.il
.Sh HISTORY
1995-02-23 01:25:48 +00:00
The
.Nm
device first appeared in
.Fx 2.1 .