tail head cat sleep
QR code linking to this page

manページ  — SNP

名称

snp – tty 端末を覗き見るインタフェース

内容

書式


#include <sys/snoop.h>
int
ioctl(fd, SNPSTTY, &dev);

int
ioctl(fd, SNPGTTY, &dev);

int
ioctl(fd, FIONREAD, &result);

解説

/dev/snp? はユーザが任意の tty 端末に接続してその端末での活動を監視することを 可能にする検査用のデバイスです。

所定の snp デバイスと監視すべき tty とを結合するには、 snp デバイスをオープンしてから SNPSTTY ioctl システムコールを発行してください。 IOCTL システムコールに渡される引数は dev_t 型の変数のアドレスです。 引数の値に -1 へのポインタを指定することにより、 snp デバイスを tty から切り離すことが出来ます。

SNPGTTY ioctl システムコールはオープンされている snp デバイスにその時点で結合されている tty に関する情報を返します。

FIONREAD ioctl システムコールは読込みバッファに格納されている文字数 に等しい正の数を返します。 定義されている特別の値は以下の通りです:
SNP_OFLOW デバイスオーバフローが発生して、デバイスは切り離されました。
SNP_TTYCLOSE
  tty は結合されていません。
SNP_DETACH ユーザが snp デバイスを切り離したか又は tty デバイスがクローズされて切り離されました。

関連項目

pty(4), sio(4), watch(8)

制限項目

スーパユーザだけが snp デバイスにアクセスできます。

バグ

行処理モードである間は、ユーザの入力は見えません。 監視している tty へは、シグナルを送れません。

作者

Ugen J.S. Antsilevich <ugen@NetVision.net.il>

歴史

snp デバイスは FreeBSD 2.1 で初めて現れました。

FreeBSD SNP (4) February 24, 1995

tail head cat sleep
QR code linking to this page


このマニュアルページサービスについてのご意見は Ben Bullock にお知らせください。 Privacy policy.

Our grievance is not just against Unix itself, but against the cult of Unix zealots who defend and nurture it. They take the heat, disease, and pestilence as givens, and, as ancient shamans did, display their wounds, some self-inflicted, as proof of their power and wizardry. We aim, through bluntness and humor, to show them that they pray to a tin god, and that science, not religion, is the path to useful and friendly technology.
— The Unix Haters' handbook