aboutsummaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>1999-07-06 19:23:32 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>1999-07-06 19:23:32 +0000
commit6b5ca0d83e52d5a5cc1001854eb33f1c31deb9db (patch)
treeb98f1bc83e7c922d703d35e16ba75d62d320a917 /sys/net
parent14802b60922f833994d6371b3e5510e9135abaf4 (diff)
Notes
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/bpf.c18
-rw-r--r--sys/net/if_disc.c8
-rw-r--r--sys/net/if_fddisubr.c6
-rw-r--r--sys/net/if_iso88025subr.c4
-rw-r--r--sys/net/if_loop.c10
-rw-r--r--sys/net/if_ppp.c14
-rw-r--r--sys/net/if_sl.c22
-rw-r--r--sys/net/if_tun.c12
-rw-r--r--sys/net/if_vlan.c16
9 files changed, 55 insertions, 55 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index a564935d9ab4..c02150f6cab5 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -37,10 +37,10 @@
*
* @(#)bpf.c 8.2 (Berkeley) 3/28/94
*
- * $Id: bpf.c,v 1.50 1999/05/30 16:53:04 phk Exp $
+ * $Id: bpf.c,v 1.51 1999/05/31 11:28:08 phk Exp $
*/
-#include "bpfilter.h"
+#include "bpf.h"
#ifndef __GNUC__
#define inline
@@ -84,7 +84,7 @@
#include <sys/devfsext.h>
#endif /*DEVFS*/
-#if NBPFILTER > 0
+#if NBPF > 0
/*
* Older BSDs don't have kernel malloc.
@@ -114,7 +114,7 @@ SYSCTL_INT(_debug, OID_AUTO, bpf_bufsize, CTLFLAG_RW,
* bpf_dtab holds the descriptors, indexed by minor device #
*/
static struct bpf_if *bpf_iflist;
-static struct bpf_d bpf_dtab[NBPFILTER];
+static struct bpf_d bpf_dtab[NBPF];
static int bpf_dtab_init;
static int bpf_allocbufs __P((struct bpf_d *));
@@ -366,7 +366,7 @@ bpfopen(dev, flags, fmt, p)
if (p->p_prison)
return (EPERM);
- if (minor(dev) >= NBPFILTER)
+ if (minor(dev) >= NBPF)
return (ENXIO);
/*
* Each minor can be opened by only one process. If the requested
@@ -1286,7 +1286,7 @@ bpfattach(ifp, dlt, hdrlen)
* Mark all the descriptors free if this hasn't been done.
*/
if (!bpf_dtab_init) {
- for (i = 0; i < NBPFILTER; ++i)
+ for (i = 0; i < NBPF; ++i)
D_MARKFREE(&bpf_dtab[i]);
bpf_dtab_init = 1;
}
@@ -1296,7 +1296,7 @@ bpfattach(ifp, dlt, hdrlen)
}
#ifdef DEVFS
-static void *bpf_devfs_token[NBPFILTER];
+static void *bpf_devfs_token[NBPF];
#endif
static int bpf_devsw_installed;
@@ -1315,7 +1315,7 @@ bpf_drvinit(unused)
bpf_devsw_installed = 1;
#ifdef DEVFS
- for ( i = 0 ; i < NBPFILTER ; i++ ) {
+ for ( i = 0 ; i < NBPF ; i++ ) {
bpf_devfs_token[i] =
devfs_add_devswf(&bpf_cdevsw, i, DV_CHR, 0, 0,
0600, "bpf%d", i);
@@ -1326,7 +1326,7 @@ bpf_drvinit(unused)
SYSINIT(bpfdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,bpf_drvinit,NULL)
-#else /* !BPFILTER */
+#else /* !BPF */
/*
* NOP stubs to allow bpf-using drivers to load and function.
*
diff --git a/sys/net/if_disc.c b/sys/net/if_disc.c
index 8e7b99e862a4..c0375a735a63 100644
--- a/sys/net/if_disc.c
+++ b/sys/net/if_disc.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* From: @(#)if_loop.c 8.1 (Berkeley) 6/10/93
- * $Id: if_disc.c,v 1.20 1998/06/07 17:12:03 dfr Exp $
+ * $Id: if_disc.c,v 1.21 1998/12/14 01:59:16 eivind Exp $
*/
/*
@@ -51,7 +51,7 @@
#include <net/route.h>
#include <net/bpf.h>
-#include "bpfilter.h"
+#include "bpf.h"
#include "opt_inet.h"
#ifdef TINY_DSMTU
@@ -85,7 +85,7 @@ discattach(dummy)
ifp->if_hdrlen = 0;
ifp->if_addrlen = 0;
if_attach(ifp);
-#if NBPFILTER > 0
+#if NBPF > 0
bpfattach(ifp, DLT_NULL, sizeof(u_int));
#endif
}
@@ -99,7 +99,7 @@ discoutput(ifp, m, dst, rt)
{
if ((m->m_flags & M_PKTHDR) == 0)
panic("discoutput no HDR");
-#if NBPFILTER > 0
+#if NBPF > 0
/* BPF write needs to be handled specially */
if (dst->sa_family == AF_UNSPEC) {
dst->sa_family = *(mtod(m, int *));
diff --git a/sys/net/if_fddisubr.c b/sys/net/if_fddisubr.c
index 11d3a5aa456d..dbc4be8e9236 100644
--- a/sys/net/if_fddisubr.c
+++ b/sys/net/if_fddisubr.c
@@ -33,7 +33,7 @@
* SUCH DAMAGE.
*
* from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp
- * $Id: if_fddisubr.c,v 1.33 1998/06/21 14:53:23 bde Exp $
+ * $Id: if_fddisubr.c,v 1.34 1999/01/27 22:42:13 dillon Exp $
*/
#include "opt_atalk.h"
@@ -105,7 +105,7 @@ extern u_char aarp_org_code[ 3 ];
extern struct ifqueue pkintrq;
#endif
-#include "bpfilter.h"
+#include "bpf.h"
#define senderr(e) { error = (e); goto bad;}
@@ -309,7 +309,7 @@ fddi_output(ifp, m0, dst, rt0)
break;
}
-#if NBPFILTER > 0
+#if NBPF > 0
case AF_IMPLINK:
{
fh = mtod(m, struct fddi_header *);
diff --git a/sys/net/if_iso88025subr.c b/sys/net/if_iso88025subr.c
index 1999a3f0490f..8df7aa3e0279 100644
--- a/sys/net/if_iso88025subr.c
+++ b/sys/net/if_iso88025subr.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_iso88025subr.c,v 1.5 1999/01/09 22:45:58 lile Exp $
+ * $Id: if_iso88025subr.c,v 1.2 1999/03/10 10:11:43 julian Exp $
*
*/
@@ -68,7 +68,7 @@
#include <netinet/if_ether.h>
#endif
-#if NBPFILTER > 0
+#if NBPF > 0
#include <net/bpf.h>
#include <net/bpfdesc.h>
#endif
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c
index 83edd19e07e3..55abbf500f13 100644
--- a/sys/net/if_loop.c
+++ b/sys/net/if_loop.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_loop.c 8.1 (Berkeley) 6/10/93
- * $Id: if_loop.c,v 1.37 1998/07/12 16:46:52 dfr Exp $
+ * $Id: if_loop.c,v 1.38 1999/02/20 21:03:53 dt Exp $
*/
/*
@@ -82,8 +82,8 @@
#include <netatalk/at_var.h>
#endif NETATALK
-#include "bpfilter.h"
-#if NBPFILTER > 0
+#include "bpf.h"
+#if NBPF > 0
#include <net/bpfdesc.h>
#endif
@@ -122,7 +122,7 @@ loopattach(dummy)
ifp->if_type = IFT_LOOP;
ifp->if_snd.ifq_maxlen = ifqmaxlen;
if_attach(ifp);
-#if NBPFILTER > 0
+#if NBPF > 0
bpfattach(ifp, DLT_NULL, sizeof(u_int));
#endif
}
@@ -186,7 +186,7 @@ if_simloop(ifp, m, dst, hlen)
if ((m->m_flags & M_PKTHDR) == 0)
panic("if_simloop: no HDR");
m->m_pkthdr.rcvif = ifp;
-#if NBPFILTER > 0
+#if NBPF > 0
/* BPF write needs to be handled specially */
if (dst->sa_family == AF_UNSPEC) {
dst->sa_family = *(mtod(m, int *));
diff --git a/sys/net/if_ppp.c b/sys/net/if_ppp.c
index c552a413483f..a1490bbe653d 100644
--- a/sys/net/if_ppp.c
+++ b/sys/net/if_ppp.c
@@ -69,7 +69,7 @@
* Paul Mackerras (paulus@cs.anu.edu.au).
*/
-/* $Id: if_ppp.c,v 1.59 1998/06/20 16:28:01 peter Exp $ */
+/* $Id: if_ppp.c,v 1.60 1999/04/27 11:17:00 phk Exp $ */
/* from if_sl.c,v 1.11 84/10/04 12:54:47 rick Exp */
/* from NetBSD: if_ppp.c,v 1.15.2.2 1994/07/28 05:17:58 cgd Exp */
@@ -112,12 +112,12 @@
#include <netipx/ipx_if.h>
#endif
-#include "bpfilter.h"
-#if NBPFILTER > 0
+#include "bpf.h"
+#if NBPF > 0
#include <net/bpf.h>
#endif
-#if defined(PPP_FILTER) && NBPFILTER == 0
+#if defined(PPP_FILTER) && NBPF == 0
#error "PPP_FILTER requires bpf"
#endif
@@ -221,7 +221,7 @@ pppattach(dummy)
sc->sc_fastq.ifq_maxlen = IFQ_MAXLEN;
sc->sc_rawq.ifq_maxlen = IFQ_MAXLEN;
if_attach(&sc->sc_if);
-#if NBPFILTER > 0
+#if NBPF > 0
bpfattach(&sc->sc_if, DLT_PPP, PPP_HDRLEN);
#endif
}
@@ -828,7 +828,7 @@ pppoutput(ifp, m0, dst, rtp)
#endif /* PPP_FILTER */
}
-#if NBPFILTER > 0
+#if NBPF > 0
/*
* See if bpf wants to look at the packet.
*/
@@ -1463,7 +1463,7 @@ ppp_inproc(sc, m)
#endif /* PPP_FILTER */
}
-#if NBPFILTER > 0
+#if NBPF > 0
/* See if bpf wants to look at the packet. */
if (sc->sc_if.if_bpf)
bpf_mtap(&sc->sc_if, m);
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c
index 22df1e48842b..cce2fa60b1fa 100644
--- a/sys/net/if_sl.c
+++ b/sys/net/if_sl.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)if_sl.c 8.6 (Berkeley) 2/1/94
- * $Id: if_sl.c,v 1.74 1999/04/27 11:17:02 phk Exp $
+ * $Id: if_sl.c,v 1.75 1999/07/01 22:14:51 peter Exp $
*/
/*
@@ -68,7 +68,7 @@
#include "sl.h"
#if NSL > 0
-#include "bpfilter.h"
+#include "bpf.h"
#include "opt_inet.h"
#if !defined(ACTUALLY_LKM_NOT_KERNEL) && !defined(KLD_MODULE)
#include "opt_slip.h"
@@ -105,7 +105,7 @@
#include <net/if_slvar.h>
#include <net/slip.h>
-#if NBPFILTER > 0
+#if NBPF > 0
#include <net/bpf.h>
#endif
@@ -150,7 +150,7 @@ PSEUDO_SET(slattach, if_sl);
* time. So, setting SLIP_HIWAT to ~100 guarantees that we'll lose
* at most 1% while maintaining good interactive response.
*/
-#if NBPFILTER > 0
+#if NBPF > 0
#define BUFOFFSET (128+sizeof(struct ifnet **)+SLIP_HDRLEN)
#else
#define BUFOFFSET (128+sizeof(struct ifnet **))
@@ -232,7 +232,7 @@ slattach(dummy)
sc->sc_if.if_linkmib = sc;
sc->sc_if.if_linkmiblen = sizeof *sc;
if_attach(&sc->sc_if);
-#if NBPFILTER > 0
+#if NBPF > 0
bpfattach(&sc->sc_if, DLT_SLIP, SLIP_HDRLEN);
#endif
}
@@ -539,7 +539,7 @@ slstart(tp)
register struct ip *ip;
int s;
struct mbuf *m2;
-#if NBPFILTER > 0
+#if NBPF > 0
u_char bpfbuf[SLTMAX + SLIP_HDRLEN];
register int len = 0;
#endif
@@ -584,7 +584,7 @@ slstart(tp)
* queueing, and the connection id compression will get
* munged when this happens.
*/
-#if NBPFILTER > 0
+#if NBPF > 0
if (sc->sc_if.if_bpf) {
/*
* We need to save the TCP/IP header before it's
@@ -613,7 +613,7 @@ slstart(tp)
*mtod(m, u_char *) |= sl_compress_tcp(m, ip,
&sc->sc_comp, 1);
}
-#if NBPFILTER > 0
+#if NBPF > 0
if (sc->sc_if.if_bpf) {
/*
* Put the SLIP pseudo-"link header" in place. The
@@ -776,7 +776,7 @@ slinput(c, tp)
register struct mbuf *m;
register int len;
int s;
-#if NBPFILTER > 0
+#if NBPF > 0
u_char chdr[CHDR_LEN];
#endif
@@ -845,7 +845,7 @@ slinput(c, tp)
/* less than min length packet - ignore */
goto newpack;
-#if NBPFILTER > 0
+#if NBPF > 0
if (sc->sc_if.if_bpf) {
/*
* Save the compressed header, so we
@@ -886,7 +886,7 @@ slinput(c, tp)
} else
goto error;
}
-#if NBPFILTER > 0
+#if NBPF > 0
if (sc->sc_if.if_bpf) {
/*
* Put the SLIP pseudo-"link header" in place.
diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c
index 8d16b7ddbf12..4d1d2cc0687c 100644
--- a/sys/net/if_tun.c
+++ b/sys/net/if_tun.c
@@ -54,8 +54,8 @@
#include <netns/ns_if.h>
#endif
-#include "bpfilter.h"
-#if NBPFILTER > 0
+#include "bpf.h"
+#if NBPF > 0
#include <net/bpf.h>
#endif
@@ -144,7 +144,7 @@ tunattach(dummy)
ifp->if_flags = IFF_POINTOPOINT | IFF_MULTICAST;
ifp->if_snd.ifq_maxlen = ifqmaxlen;
if_attach(ifp);
-#if NBPFILTER > 0
+#if NBPF > 0
bpfattach(ifp, DLT_NULL, sizeof(u_int));
#endif
}
@@ -340,7 +340,7 @@ tunoutput(ifp, m0, dst, rt)
return EHOSTDOWN;
}
-#if NBPFILTER > 0
+#if NBPF > 0
/* BPF write needs to be handled specially */
if (dst->sa_family == AF_UNSPEC) {
dst->sa_family = *(mtod(m0, int *));
@@ -366,7 +366,7 @@ tunoutput(ifp, m0, dst, rt)
bpf_mtap(ifp, &m);
}
-#endif /* NBPFILTER > 0 */
+#endif /* NBPF > 0 */
/* prepend sockaddr? this may abort if the mbuf allocation fails */
if (tp->tun_flags & TUN_LMODE) {
@@ -628,7 +628,7 @@ tunwrite(dev, uio, flag)
top->m_pkthdr.len = tlen;
top->m_pkthdr.rcvif = ifp;
-#if NBPFILTER > 0
+#if NBPF > 0
if (ifp->if_bpf) {
/*
* We need to prepend the address family as
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index 4ae6fea77cad..3e23fda037c1 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -26,7 +26,7 @@
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: if_vlan.c,v 1.6 1999/03/15 01:21:59 wpaul Exp $
+ * $Id: if_vlan.c,v 1.7 1999/04/07 23:26:43 wpaul Exp $
*/
/*
@@ -57,7 +57,7 @@
#include "vlan.h"
#if NVLAN > 0
#include "opt_inet.h"
-#include "bpfilter.h"
+#include "bpf.h"
#include <sys/param.h>
#include <sys/kernel.h>
@@ -69,7 +69,7 @@
#include <sys/sysctl.h>
#include <sys/systm.h>
-#if NBPFILTER > 0
+#if NBPF > 0
#include <net/bpf.h>
#endif
#include <net/ethernet.h>
@@ -176,7 +176,7 @@ vlaninit(void *dummy)
ifp->if_snd.ifq_maxlen = ifqmaxlen;
if_attach(ifp);
ether_ifattach(ifp);
-#if NBPFILTER > 0
+#if NBPF > 0
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
#endif
/* Now undo some of the damage... */
@@ -209,10 +209,10 @@ vlan_start(struct ifnet *ifp)
IF_DEQUEUE(&ifp->if_snd, m);
if (m == 0)
break;
-#if NBPFILTER > 0
+#if NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, m);
-#endif /* NBPFILTER > 0 */
+#endif /* NBPF > 0 */
/*
* If the LINK0 flag is set, it means the underlying interface
@@ -304,7 +304,7 @@ vlan_input_tag(struct ether_header *eh, struct mbuf *m, u_int16_t t)
*/
m->m_pkthdr.rcvif = &ifv->ifv_if;
-#if NBPFILTER > 0
+#if NBPF > 0
if (ifv->ifv_if.if_bpf) {
/*
* Do the usual BPF fakery. Note that we don't support
@@ -356,7 +356,7 @@ vlan_input(struct ether_header *eh, struct mbuf *m)
m->m_len -= EVL_ENCAPLEN;
m->m_pkthdr.len -= EVL_ENCAPLEN;
-#if NBPFILTER > 0
+#if NBPF > 0
if (ifv->ifv_if.if_bpf) {
/*
* Do the usual BPF fakery. Note that we don't support