This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
NBPFILTER
- From: Motoya Kurotsu <kurotsu at allied-telesis dot co dot jp>
- To: ecos-patches at sources dot redhat dot com
- Date: Mon, 31 Mar 2003 16:11:35 +0900
- Subject: NBPFILTER
Hi all;
The attachment works with freebsd stack in which NBPFILTER was deleted
recently.
03/31/03
Motoya Kurotsu
Allied Telesis K.K.
diff -Nur eth.orig/current/include/eth_drv.h eth/current/include/eth_drv.h
--- eth.orig/current/include/eth_drv.h Wed Aug 14 00:55:53 2002
+++ eth/current/include/eth_drv.h Mon Mar 31 15:47:31 2003
@@ -73,7 +73,7 @@
#include <netinet/if_ether.h>
#endif
-#if NBPFILTER > 0
+#if defined(NBPFILTER) && NBPFILTER > 0
#include <net/bpf.h>
#include <net/bpfdesc.h>
#endif
diff -Nur eth.orig/current/src/net/eth_drv.c eth/current/src/net/eth_drv.c
--- eth.orig/current/src/net/eth_drv.c Thu Sep 19 18:14:23 2002
+++ eth/current/src/net/eth_drv.c Mon Mar 31 15:48:39 2003
@@ -73,7 +73,7 @@
#include <netinet/if_ether.h>
#endif
-#if NBPFILTER > 0
+#if defined(NBPFILTER) && NBPFILTER > 0
#include <net/bpf.h>
#include <net/bpfdesc.h>
#endif
@@ -676,7 +676,7 @@
if ((m0->m_flags & M_PKTHDR) == 0)
panic("eth_drv_send: no header mbuf");
-#if NBPFILTER > 0
+#if defined(NBPFILTER) && NBPFILTER > 0
/* Tap off here if there is a BPF listener. */
if (ifp->if_bpf)
bpf_mtap(ifp->if_bpf, m0);
@@ -941,7 +941,7 @@
else {
ifp->if_ipackets++;
-#if NBPFILTER > 0
+#if defined(NBPFILTER) && NBPFILTER > 0
#error FIXME - Need mbuf with ethernet header attached
/*
* Check if there's a BPF listener on this interface.