summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/ipl_ldev.c
diff options
context:
space:
mode:
authorcy <cy@FreeBSD.org>2013-07-19 05:41:57 +0000
committercy <cy@FreeBSD.org>2013-07-19 05:41:57 +0000
commit672af8808c0e7c15f330b401482f9271c2eb3fa6 (patch)
tree225b5acf68c01bc6a260b386c2b2dbf4fa2839e3 /contrib/ipfilter/ipl_ldev.c
parent71e82d94e82560b20789833f60056506de34de8b (diff)
downloadFreeBSD-src-672af8808c0e7c15f330b401482f9271c2eb3fa6.zip
FreeBSD-src-672af8808c0e7c15f330b401482f9271c2eb3fa6.tar.gz
As per the developers handbook (5.3.1 step 1), prepare the vendor trees for
import of new ipfilter vendor sources by flattening them. To keep the tags consistent with dist, the tags are also flattened. Approved by: glebius (Mentor)
Diffstat (limited to 'contrib/ipfilter/ipl_ldev.c')
-rw-r--r--contrib/ipfilter/ipl_ldev.c83
1 files changed, 0 insertions, 83 deletions
diff --git a/contrib/ipfilter/ipl_ldev.c b/contrib/ipfilter/ipl_ldev.c
deleted file mode 100644
index a289325..0000000
--- a/contrib/ipfilter/ipl_ldev.c
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * (C)opyright 1993,1994,1995 by Darren Reed.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and due credit is given
- * to the original author and the contributors.
- */
-
-/*
- * routines below for saving IP headers to buffer
- */
-int iplopen(struct inode * inode, struct file * filp)
-{
- u_int min = MINOR(inode->i_rdev);
-
- if (flags & FWRITE)
- return ENXIO;
- if (min)
- return ENXIO;
- iplbusy++;
- return 0;
-}
-
-
-int iplclose(struct inode * inode, struct file * filp)
-{
- u_int min = MINOR(inode->i_rdev);
-
- if (min)
- return ENXIO;
- iplbusy--;
- return 0;
-}
-
-
-/*
- * iplread/ipllog
- * all three of these must operate with at least splnet() lest they be
- * called during packet processing and cause an inconsistancy to appear in
- * the filter lists.
- */
-int iplread(struct inode *inode, struct file *file, char *buf, int count)
-{
- register int ret, s;
- register size_t sz, sx;
- int error;
-
- if (!uio->uio_resid)
- return 0;
- while (!iplused) {
- error = SLEEP(iplbuf, "ipl sleep");
- if (error)
- return error;
- }
-
- SPLNET(s);
-
- ret = sx = sz = MIN(count, iplused);
- if (iplh < iplt)
- sz = MIN(sz, LOGSIZE - (iplt - iplbuf));
- sx -= sz;
-
- memcpy_tofs(buf, iplt, sz);
- buf += sz;
- iplt += sz;
- iplused -= sz;
- if ((iplh < iplt) && (iplt == iplbuf + LOGSIZE))
- iplt = iplbuf;
-
- if (sx) {
- memcpy_tofs(buf, iplt, sx);
- ret += sx;
- iplt += sx;
- iplused -= sx;
- if ((iplh < iplt) && (iplt == iplbuf + LOGSIZE))
- iplt = iplbuf;
- }
- if (!iplused) /* minimise wrapping around the end */
- iplh = iplt = iplbuf;
-
- SPLX(s);
- return ret;
-}
OpenPOWER on IntegriCloud