1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-18 10:35:55 +00:00
freebsd/share/man/man4/snp.4

68 lines
1.6 KiB
Groff
Raw Normal View History

1995-02-23 01:25:48 +00:00
.\"
.\" $Id: snp.4,v 1.4 1995/02/25 20:15:20 pst Exp $
.\" $Source: /a/ncvs/src/share/man/man4/snp.4,v $
1995-02-23 01:25:48 +00:00
.\"
.Dd February 24, 1995
1995-02-23 01:25:48 +00:00
.Dt SNP 4
.Os FreeBSD
.Sh NAME
1995-02-23 01:25:48 +00:00
.Nm snp
.Nd tty snoop interface
.Sh SYNOPSIS
1995-02-23 01:25:48 +00:00
.Fd #include <sys/ioctl.h>
.Fd #include <sys/snoop.h>
.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
1995-02-23 01:25:48 +00:00
/dev/snp? are snoop devices which allow user to attach to any tty
and watch activities on it.
1995-02-23 01:25:48 +00:00
To associate a given
.Nm snp
device with a tty to be observed, open the
.Nm snp
device and then use the SNPSTTY ioctl.
The argument passed to the IOCTL is the address of a variable of type
dev_t.
By setting the value of the variable pointed to to -1, the user may detach
the snp device from a tty.
1995-02-23 01:25:48 +00:00
.Pp
The SNPGTTY ioctl returns information about the current tty attached to
the open
.Nm snp
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
device overflow occured, device detatched.
.It Dv SNP_TTYCLOSE
tty not attached.
.It Dv SNP_DETACH
.Nm snp
device has been detatched by user or tty device has been closed
and detatched.
.Sh SEE ALSO
1995-02-23 01:25:48 +00:00
.Xr watch 8 ,
.Xr pty 4 ,
.Xr sio 4
.Sh RESTRICTIONS
Only the superuser may access the
.Nm snp
devices.
.Sh BUGS
1995-02-23 01:25:48 +00:00
While in line mode, user input can't be seen.
No signals to the application on tty possible (i.e. Ctrl+C).
1995-02-23 01:25:48 +00:00
.Sh AUTHOR
Ugen J.S. Antsilevich <ugen@NetVision.net.il>
.Sh HISTORY
1995-02-23 01:25:48 +00:00
The
.Nm snp
1995-02-23 01:25:48 +00:00
device first appeared in FreeBSD 2.1.