summaryrefslogtreecommitdiffstats
path: root/sys/net/bridge.h
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2000-05-14 02:18:43 +0000
committerarchie <archie@FreeBSD.org>2000-05-14 02:18:43 +0000
commitfa21035b4e2f11d2c8f90174690853600b670e2d (patch)
tree9afb8dacfff6d7607064d8aa2bbf2da5069e8be6 /sys/net/bridge.h
parentd066b073153b986a54fd18a31d6bcc5d697933a2 (diff)
downloadFreeBSD-src-fa21035b4e2f11d2c8f90174690853600b670e2d.zip
FreeBSD-src-fa21035b4e2f11d2c8f90174690853600b670e2d.tar.gz
Move code to handle BPF and bridging for incoming Ethernet packets out
of the individual drivers and into the common routine ether_input(). Also, remove the (incomplete) hack for matching ethernet headers in the ip_fw code. The good news: net result of 1016 lines removed, and this should make bridging now work with *all* Ethernet drivers. The bad news: it's nearly impossible to test every driver, especially for bridging, and I was unable to get much testing help on the mailing lists. Reviewed by: freebsd-net
Diffstat (limited to 'sys/net/bridge.h')
-rw-r--r--sys/net/bridge.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/net/bridge.h b/sys/net/bridge.h
index 9be9078..ea2db41 100644
--- a/sys/net/bridge.h
+++ b/sys/net/bridge.h
@@ -49,9 +49,9 @@ extern int bdg_ports ;
#define HASH_FN(addr) ( \
ntohs( ((short *)addr)[1] ^ ((short *)addr)[2] ) & (HASH_SIZE -1))
-struct ifnet *bridge_in(struct mbuf *m);
+struct ifnet *bridge_in(struct ifnet *ifp, struct ether_header *eh);
/* bdg_forward frees the mbuf if necessary, returning null */
-int bdg_forward (struct mbuf **m, struct ifnet *dst);
+int bdg_forward(struct mbuf **m0, struct ether_header *eh, struct ifnet *dst);
#ifdef __i386__
#define BDG_MATCH(a,b) ( \
@@ -109,9 +109,8 @@ struct bdg_stats {
*/
static __inline
struct ifnet *
-bridge_dst_lookup(struct mbuf *m)
+bridge_dst_lookup(struct ether_header *eh)
{
- struct ether_header *eh = mtod(m, struct ether_header *);
struct ifnet *dst ;
int index ;
u_char *eth_addr = bdg_addresses ;
OpenPOWER on IntegriCloud