summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordd <dd@FreeBSD.org>2001-07-25 14:47:56 +0000
committerdd <dd@FreeBSD.org>2001-07-25 14:47:56 +0000
commit1caa1807e02906314fb43762c038a2d666d62a47 (patch)
tree038af4ea500650872eec9ad147bdbedae0b8ea4c
parent78944dcef14bedd81e1464adcb22d73aa1c9fb79 (diff)
downloadFreeBSD-src-1caa1807e02906314fb43762c038a2d666d62a47.zip
FreeBSD-src-1caa1807e02906314fb43762c038a2d666d62a47.tar.gz
Move the kernel stuff out of snoop.h. It was only there because some
of the snp* functions needed to be called from tty.c, which is no longer the case.
-rw-r--r--sys/dev/snp/snp.c39
-rw-r--r--sys/sys/snoop.h39
2 files changed, 39 insertions, 39 deletions
diff --git a/sys/dev/snp/snp.c b/sys/dev/snp/snp.c
index d0563c8..c8b9cf0 100644
--- a/sys/dev/snp/snp.c
+++ b/sys/dev/snp/snp.c
@@ -58,6 +58,45 @@ static struct linesw snpdisc = {
l_nullioctl, ttyinput, ttstart, ttymodem
};
+/*
+ * This is the main snoop per-device structure.
+ */
+struct snoop {
+ LIST_ENTRY(snoop) snp_list; /* List glue. */
+ dev_t snp_target; /* Target tty device. */
+ struct tty *snp_tty; /* Target tty pointer. */
+ u_long snp_len; /* Possible length. */
+ u_long snp_base; /* Data base. */
+ u_long snp_blen; /* Used length. */
+ caddr_t snp_buf; /* Allocation pointer. */
+ int snp_flags; /* Flags. */
+ struct selinfo snp_sel; /* Select info. */
+ int snp_olddisc; /* Old line discipline. */
+};
+
+/*
+ * Possible flags.
+ */
+#define SNOOP_ASYNC 0x0002
+#define SNOOP_OPEN 0x0004
+#define SNOOP_RWAIT 0x0008
+#define SNOOP_OFLOW 0x0010
+#define SNOOP_DOWN 0x0020
+
+/*
+ * Other constants.
+ */
+#define SNOOP_MINLEN (4*1024) /* This should be power of 2.
+ * 4K tested to be the minimum
+ * for which on normal tty
+ * usage there is no need to
+ * allocate more.
+ */
+#define SNOOP_MAXLEN (64*1024) /* This one also,64K enough
+ * If we grow more,something
+ * really bad in this world..
+ */
+
static MALLOC_DEFINE(M_SNP, "snp", "Snoop device data");
/*
* The number of the "snoop" line discipline. This gets determined at
diff --git a/sys/sys/snoop.h b/sys/sys/snoop.h
index 1f72c60..ca28a2c 100644
--- a/sys/sys/snoop.h
+++ b/sys/sys/snoop.h
@@ -18,47 +18,8 @@
#ifndef _SYS_SNOOP_H_
#define _SYS_SNOOP_H_
-#ifndef _KERNEL
-#include <sys/types.h>
-#endif
#include <sys/ioccom.h>
-#ifdef _KERNEL
-#define SNOOP_MINLEN (4*1024) /* This should be power of 2.
- * 4K tested to be the minimum
- * for which on normal tty
- * usage there is no need to
- * allocate more.
- */
-#define SNOOP_MAXLEN (64*1024) /* This one also,64K enough
- * If we grow more,something
- * really bad in this world..
- */
-
-/*
- * This is the main snoop per-device
- * structure...
- */
-
-struct snoop {
- LIST_ENTRY(snoop) snp_list;
- dev_t snp_target; /* major/minor number of device*/
- struct tty *snp_tty; /* tty device pointer */
- u_long snp_len; /* buffer data length */
- u_long snp_base; /* buffer data base */
- u_long snp_blen; /* Overall buffer len */
- caddr_t snp_buf; /* Data buffer */
- int snp_flags; /* Flags place */
-#define SNOOP_ASYNC 0x0002
-#define SNOOP_OPEN 0x0004
-#define SNOOP_RWAIT 0x0008
-#define SNOOP_OFLOW 0x0010
-#define SNOOP_DOWN 0x0020
- struct selinfo snp_sel; /* Selection info */
- int snp_olddisc; /* Old line discipline */
-};
-#endif /* _KERNEL */
-
/*
* Theese are snoop io controls
* SNPSTTY accepts 'struct snptty' as input.
OpenPOWER on IntegriCloud