summaryrefslogtreecommitdiff
path: root/sys/i4b
diff options
context:
space:
mode:
authorBrooks Davis <brooks@FreeBSD.org>2002-10-21 05:05:43 +0000
committerBrooks Davis <brooks@FreeBSD.org>2002-10-21 05:05:43 +0000
commita5066cff3a59e73f138435a7ff4eeeb8cb0a337a (patch)
tree336c875a79c617ed37c3168d1e1f1c2fbbaac623 /sys/i4b
parent8aab0cca454408c57148793f4e71ecd30a164d6f (diff)
downloadsrc-test2-a5066cff3a59e73f138435a7ff4eeeb8cb0a337a.tar.gz
src-test2-a5066cff3a59e73f138435a7ff4eeeb8cb0a337a.zip
Notes
Diffstat (limited to 'sys/i4b')
-rw-r--r--sys/i4b/driver/i4b_ipr.c12
-rw-r--r--sys/i4b/driver/i4b_isppp.c10
2 files changed, 1 insertions, 21 deletions
diff --git a/sys/i4b/driver/i4b_ipr.c b/sys/i4b/driver/i4b_ipr.c
index f8283c2cfef5..92c0e98c1d4f 100644
--- a/sys/i4b/driver/i4b_ipr.c
+++ b/sys/i4b/driver/i4b_ipr.c
@@ -96,12 +96,8 @@
/* undef to uncompress in the mbuf itself */
#endif /* IPR_VJ */
-#include "bpf.h"
-
-#if NBPFILTER > 0 || NBPF > 0
#include <sys/time.h>
#include <net/bpf.h>
-#endif
#include <machine/i4b_ioctl.h>
#include <machine/i4b_debug.h>
@@ -271,9 +267,7 @@ i4biprattach(void *dummy)
if_attach(&sc->sc_if);
-#if NBPFILTER > 0 || NBPF > 0
bpfattach(&sc->sc_if, DLT_NULL, sizeof(u_int));
-#endif
}
}
@@ -299,7 +293,7 @@ i4biproutput(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
if(dst->sa_family != AF_INET)
{
- printf("ipr%d: af%d not supported\n", (sc)->sc_if.if_unit, dst->sa_family);
+ if_printf(ifp, "af%d not supported\n", dst->sa_family);
m_freem(m);
splx(s);
sc->sc_if.if_noproto++;
@@ -874,7 +868,6 @@ error:
}
#endif
-#if NBPFILTER > 0 || NBPF > 0
if(sc->sc_if.if_bpf)
{
/* prepend the address family as a four byte field */
@@ -885,7 +878,6 @@ error:
mm.m_data = (char *)&af;
bpf_mtap(&sc->sc_if, &mm);
}
-#endif /* NBPFILTER > 0 || NBPF > 0 */
if(! IF_HANDOFF(&ipintrq, m, NULL))
{
@@ -933,7 +925,6 @@ ipr_tx_queue_empty(int unit)
microtime(&sc->sc_if.if_lastchange);
-#if NBPFILTER > 0 || NBPF > 0
if(sc->sc_if.if_bpf)
{
/* prepend the address family as a four byte field */
@@ -945,7 +936,6 @@ ipr_tx_queue_empty(int unit)
mm.m_data = (char *)&af;
bpf_mtap(&sc->sc_if, &mm);
}
-#endif /* NBPFILTER */
#if I4BIPRACCT
sc->sc_outb += m->m_pkthdr.len; /* size before compression */
diff --git a/sys/i4b/driver/i4b_isppp.c b/sys/i4b/driver/i4b_isppp.c
index 8485f23216d9..54d100d446ca 100644
--- a/sys/i4b/driver/i4b_isppp.c
+++ b/sys/i4b/driver/i4b_isppp.c
@@ -55,12 +55,8 @@
#include <net/if_types.h>
#include <net/if_sppp.h>
-#include "bpf.h"
-
-#if NBPFILTER > 0 || NBPF > 0
#include <sys/time.h>
#include <net/bpf.h>
-#endif
#include <machine/i4b_ioctl.h>
#include <machine/i4b_debug.h>
@@ -230,9 +226,7 @@ i4bispppattach(void *dummy)
CALLOUT_INIT(&sc->sc_ch);
-#if NBPFILTER > 0 || NBPF > 0
bpfattach(&sc->sc_if, DLT_PPP, PPP_HDRLEN);
-#endif
}
}
@@ -295,10 +289,8 @@ i4bisppp_start(struct ifnet *ifp)
while ((m = sppp_dequeue(&sc->sc_if)) != NULL)
{
-#if NBPFILTER > 0 || NBPF > 0
if (ifp->if_bpf)
bpf_mtap(ifp, m);
-#endif
microtime(&ifp->if_lastchange);
@@ -589,10 +581,8 @@ i4bisppp_rx_data_rdy(int unit)
printf("i4bisppp_rx_data_ready: received packet!\n");
#endif
-#if NBPFILTER > 0 || NBPF > 0
if(sc->sc_if.if_bpf)
bpf_mtap(&sc->sc_if, m);
-#endif
s = splimp();