mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-26 13:05:18 +01:00
1130b656e5
This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
68 lines
1.5 KiB
Groff
68 lines
1.5 KiB
Groff
.\"
|
|
.\" $FreeBSD$
|
|
.\" $Source: /home/ncvs/src/share/man/man4/snp.4,v $
|
|
.\"
|
|
.Dd February 24, 1995
|
|
.Dt SNP 4
|
|
.Os FreeBSD
|
|
.Sh NAME
|
|
.Nm snp
|
|
.Nd tty snoop interface
|
|
.Sh SYNOPSIS
|
|
.Fd #include <sys/ioctl.h>
|
|
.Fd #include <sys/snoop.h>
|
|
.Ft int
|
|
.Fn ioctl fd SNPSTTY &dev
|
|
.Ft int
|
|
.Fn ioctl fd SNPGTTY &dev
|
|
.Ft int
|
|
.Fn ioctl fd FIONREAD &result
|
|
.Sh DESCRIPTION
|
|
/dev/snp? are snoop devices which allow user to attach to any tty
|
|
and watch activities on it.
|
|
|
|
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 -1, the user may detach
|
|
the snp device from a tty.
|
|
.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 detached.
|
|
.It Dv SNP_TTYCLOSE
|
|
tty not attached.
|
|
.It Dv SNP_DETACH
|
|
.Nm snp
|
|
device has been detached by user or tty device has been closed
|
|
and detached.
|
|
.Sh SEE ALSO
|
|
.Xr pty 4 ,
|
|
.Xr sio 4 ,
|
|
.Xr watch 8
|
|
.Sh RESTRICTIONS
|
|
Only the superuser may access the
|
|
.Nm snp
|
|
devices.
|
|
.Sh BUGS
|
|
While in line mode, user input can't be seen.
|
|
No signals may be sent to the observed tty.
|
|
.Sh AUTHOR
|
|
Ugen J.S. Antsilevich <ugen@NetVision.net.il>
|
|
.Sh HISTORY
|
|
The
|
|
.Nm snp
|
|
device first appeared in FreeBSD 2.1.
|