aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/snoop.h
diff options
context:
space:
mode:
authorUgen J.S. Antsilevich <ugen@FreeBSD.org>1995-02-14 21:23:48 +0000
committerUgen J.S. Antsilevich <ugen@FreeBSD.org>1995-02-14 21:23:48 +0000
commitd667b870a2585a6bcac996fc56b7d95436664878 (patch)
treee1b1a9924824cffb295c45d71b43d618d966a6c1 /sys/sys/snoop.h
parentdde8a05baa845591e418a5e69252e1baf17aaf8e (diff)
downloadsrc-d667b870a2585a6bcac996fc56b7d95436664878.tar.gz
src-d667b870a2585a6bcac996fc56b7d95436664878.zip
TS_SNOOP flag added to identify tty is begin snoopped
snoop.h have all structures related to the snp device and stuff
Notes
Notes: svn path=/head/; revision=6391
Diffstat (limited to 'sys/sys/snoop.h')
-rw-r--r--sys/sys/snoop.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/sys/sys/snoop.h b/sys/sys/snoop.h
new file mode 100644
index 000000000000..c1bb0b5b9e0d
--- /dev/null
+++ b/sys/sys/snoop.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 1995 Ugen J.S.Antsilevich
+ *
+ * Redistribution and use in source forms, with and without modification,
+ * are permitted provided that this entire comment appears intact.
+ *
+ * Redistribution in binary form may occur without any restrictions.
+ * Obviously, it would be nice if you gave credit where credit is due
+ * but requiring it would be too onerous.
+ *
+ * This software is provided ``AS IS'' without any warranties of any kind.
+ *
+ * Snoop stuff.
+ */
+
+#ifndef SNOOP_H
+#define SNOOP_H
+
+#define SNOOP_MINLEN (2*1024) /* This should be 2^X */
+#define SNOOP_MAXLEN (256*1024) /* This one also,256K */
+
+/*
+ * This is the main snoop per-device
+ * structure...
+ */
+
+struct snoop {
+ int snp_unit; /* Pty unit number to snoop on */
+ int snp_type; /* Type same as st_type later */
+ u_long snp_len,snp_base; /* Buffer data len and base */
+ u_long snp_blen; /* Overall buffer len */
+ char *snp_buf; /* Data buffer */
+ int snp_flags; /* Flags place */
+#define SNOOP_NBIO 0x0001
+#define SNOOP_ASYNC 0x0002
+#define SNOOP_OPEN 0x0004
+#define SNOOP_RWAIT 0x0008
+#define SNOOP_OFLOW 0x0010
+ struct selinfo snp_sel; /* Selection info */
+};
+
+
+
+/*
+ * This is structure to be passed
+ * to ioctl() so we can define different
+ * types of tty's..
+ */
+struct snptty {
+ int st_unit;
+ int st_type;
+#define ST_PTY 0 /* Regular Pty */
+#define ST_VTY 1 /* Vty for SysCons.. */
+#define ST_SIO 2 /* Serial lines */
+#define ST_MAXTYPE 2
+};
+
+#define SNPSTTY _IOW('T', 90, struct snptty)
+#define SNPGTTY _IOR('T', 89, struct snptty)
+
+
+
+#endif
+