diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/conf/files sys/conf/files
--- /sys/conf/files	Sat Sep 26 12:36:12 1998
+++ sys/conf/files	Tue Dec  1 17:47:00 1998
@@ -161,6 +161,7 @@
 msdosfs/msdosfs_vnops.c		optional msdosfs
 net/bpf.c		optional bpfilter
 net/bpf_filter.c	optional bpfilter
+net/drawbridge.c	optional drawbridge
 net/bridge.c		optional bridge
 net/bsd_comp.c		optional ppp_bsdcomp
 net/if.c		standard
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/dev/pdq/pdq.c sys/dev/pdq/pdq.c
--- /sys/dev/pdq/pdq.c	Fri Jan 17 17:54:31 1997
+++ sys/dev/pdq/pdq.c	Tue Dec  1 17:47:00 1998
@@ -42,6 +42,11 @@
 #if defined(__FreeBSD__)
 #include <dev/pdq/pdqvar.h>
 #include <dev/pdq/pdqreg.h>
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 #else
 #include "pdqvar.h"
 #include "pdqreg.h"
@@ -531,6 +536,25 @@
 	case PDQC_ADDR_FILTER_SET: {
 	    pdq_cmd_addr_filter_set_t *addr_filter_set = (pdq_cmd_addr_filter_set_t *) ci->ci_bufstart;
 	    pdq_lanaddr_t *addr = addr_filter_set->addr_filter_set_addresses;
+
+#if NDRAWBRIDGE > 0
+	    /*
+	     * Add a bogus mac address to the filter table to turn on ring
+	     * scrubbing when transmitting a packet with a foreign mac
+	     * address.  Also known as bridge stripping.  This could also
+	     * be done without modifying the driver by adding a multicast
+	     * address through the OS but I decided to make sure the card
+	     * always has an extra address loaded so ring scrubbing is always
+	     * enabled.
+	     */
+	    addr->lanaddr_bytes[0] = 0x02;
+	    addr->lanaddr_bytes[1] = 0x02;
+	    addr->lanaddr_bytes[2] = 0x02;
+	    addr->lanaddr_bytes[3] = 0x02;
+	    addr->lanaddr_bytes[4] = 0x02;
+	    addr->lanaddr_bytes[5] = 0x02;
+	    addr++;
+#endif
 	    addr->lanaddr_bytes[0] = 0xFF;
 	    addr->lanaddr_bytes[1] = 0xFF;
 	    addr->lanaddr_bytes[2] = 0xFF;
@@ -538,7 +562,14 @@
 	    addr->lanaddr_bytes[4] = 0xFF;
 	    addr->lanaddr_bytes[5] = 0xFF;
 	    addr++;
+#if NDRAWBRIDGE > 0
+	    /*
+	     * We now have room for one less address
+	     */
+	    pdq_os_addr_fill(pdq, addr, 60);
+#else
 	    pdq_os_addr_fill(pdq, addr, 61);
+#endif
 	    break;
 	}
 	default: {	/* to make gcc happy */
@@ -715,6 +746,9 @@
 	    PDQ_OS_DATABUF_ALLOC(npdu);
 	    if (npdu == NULL) {
 		PDQ_PRINTF(("discard: no databuf #0\n"));
+#if NDRAWBRIDGE > 0
+		DBstats.droppedNoMbufs++;
+#endif
 		goto discard_frame;
 	    }
 	    buffers[completion] = npdu;
@@ -723,6 +757,9 @@
 		if (npdu == NULL) {
 		    PDQ_OS_DATABUF_NEXT_SET(lpdu, NULL);
 		    PDQ_OS_DATABUF_FREE(fpdu);
+#if NDRAWBRIDGE > 0
+		    DBstats.droppedNoMbufs++;
+#endif
 		    goto discard_frame;
 		}
 		PDQ_OS_DATABUF_NEXT_SET(lpdu, buffers[(completion + idx) & ring_mask]);
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/dev/vx/if_vx.c sys/dev/vx/if_vx.c
--- /sys/dev/vx/if_vx.c	Mon Mar  2 04:46:44 1998
+++ sys/dev/vx/if_vx.c	Tue Dec  1 17:47:00 1998
@@ -88,6 +88,12 @@
 #include <net/bpf.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 
 #include <dev/vx/if_vxreg.h>
@@ -762,18 +768,21 @@
     }
 #endif
 
+    /* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
     /*
      * XXX: Some cards seem to be in promiscous mode all the time.
      * we need to make sure we only get our own stuff always.
      * bleah!
      */
-
     if ((eh->ether_dhost[0] & 1) == 0 && /* !mcast and !bcast */
 	bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr,
 	sizeof(eh->ether_dhost)) != 0) {
 	m_freem(m);
 	    return;
     }
+#endif /* NDRAWBRIDGE < 1 */
+
     /* We assume the header fit entirely in one mbuf. */
     m_adj(m, sizeof(struct ether_header));
     ether_input(ifp, eh, m);
@@ -865,6 +874,9 @@
                 if (m == 0) {
                     splx(sh);
                     m_freem(top);
+#if NDRAWBRIDGE > 0
+                    DBstats.droppedNoMbufs++;
+#endif
                     return 0;
                 }
             } else {
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/boot/biosboot/boot.c sys/i386/boot/biosboot/boot.c
--- /sys/i386/boot/biosboot/boot.c	Fri Feb 27 16:56:14 1998
+++ sys/i386/boot/biosboot/boot.c	Tue Dec  1 17:47:00 1998
@@ -140,13 +140,18 @@
 	} else
 #endif	/*NAMEBLOCK*/
 		name = "kernel";
+loadstart:
+	/*
+	 * Ignore flags from previous attempted boot, if any.
+	 */
+	loadflags &= (RB_DUAL | RB_SERIAL);
+
 	if (boot_config[0] != '\0') {
 		printf("boot.config: %s", boot_config);
 		getbootdev(boot_config, &loadflags);
 		if (openrd() != 0)
 			name = "kernel";
 	}
-loadstart:
 	/* print this all each time.. (saves space to do so) */
 	/* If we have looped, use the previous entries as defaults */
 	printf("\r \n>> FreeBSD BOOT @ 0x%x: %d/%d k of memory, %s%s console\n"
@@ -159,13 +164,6 @@
 	       dosdev & 0x7f, devs[maj], unit, 'a' + part,
 	       name ? name : "*specify_a_kernel_name*",
 	       boot_help);
-
-	/*
-	 * Ignore flags from previous attempted boot, if any.
-	 * XXX this is now too strict.  Settings given in boot.config should
-	 * not be changed.
-	 */
-	loadflags &= (RB_DUAL | RB_SERIAL);
 
 	/*
 	 * Be paranoid and make doubly sure that the input buffer is empty.
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/i386/userconfig.c sys/i386/i386/userconfig.c
--- /sys/i386/i386/userconfig.c	Sat Sep 26 12:36:17 1998
+++ sys/i386/i386/userconfig.c	Tue Dec  1 17:47:00 1998
@@ -125,7 +125,7 @@
 
 static struct isa_device *isa_devlist;	/* list read by dset to extract changes */
 
-#ifdef USERCONFIG_BOOT
+#ifdef USERCONFIG
 char userconfig_from_boot[512] = "";
 static int userconfig_boot_parsing;	/* set if we are reading from the boot instructions */
 
@@ -150,9 +150,9 @@
 	return cngetc();
     }
 }
-#else /* !USERCONFIG_BOOT */
+#else /* !USERCONFIG */
 #define getchar()	cngetc()
-#endif /* USERCONFIG_BOOT */
+#endif /* USERCONFIG */
 
 #define putchar(x)	cnputc(x)
 
@@ -2426,7 +2426,7 @@
 static int set_device_disable(CmdParm *);
 static int quitfunc(CmdParm *);
 static int helpfunc(CmdParm *);
-#if defined(USERCONFIG_BOOT)
+#if defined(USERCONFIG)
 static int introfunc(CmdParm *);
 #endif
 
@@ -2489,7 +2489,7 @@
     { "ex", 	quitfunc, 		NULL },		/* exit (quit)	*/
     { "f",	set_device_flags,	int_parms },	/* flags dev mask */
     { "h", 	helpfunc, 		NULL },		/* help		*/
-#if defined(USERCONFIG_BOOT)
+#if defined(USERCONFIG)
     { "intro", 	introfunc, 		NULL },		/* intro screen	*/
 #endif
     { "iom",	set_device_mem,		addr_parms },	/* iomem dev addr */
@@ -2885,7 +2885,7 @@
     return 0;
 }
 
-#if defined(USERCONFIG_BOOT) 
+#if defined(USERCONFIG) 
 
 #if defined (VISUAL_USERCONFIG)
 static void
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_cs.c sys/i386/isa/if_cs.c
--- /sys/i386/isa/if_cs.c	Sat Oct  3 21:12:02 1998
+++ sys/i386/isa/if_cs.c	Tue Dec  1 19:00:41 1998
@@ -77,6 +77,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 #include <machine/md_var.h>
 
@@ -778,12 +784,22 @@
 
 	MGETHDR(m, M_DONTWAIT, MT_DATA);
 	if (m==NULL)
+#if NDRAWBRIDGE > 0
+	{
+		DBstats.droppedNoMbufs++;
+		return -1;
+	}
+#else
 		return -1;
+#endif
 
 	if (length > MHLEN) {
 		MCLGET(m, M_DONTWAIT);
 		if (!(m->m_flags & M_EXT)) {
 			m_freem(m);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return -1;
 		}
 	}
@@ -809,8 +825,10 @@
 	printf( "\n" );
 #endif
 
+#if NDRAWBRIDGE < 1
 	if (status & (RX_IA | RX_BROADCAST) || 
 	    (ifp->if_flags & IFF_MULTICAST && status & RX_HASHED)) {
+#endif
 		m->m_pkthdr.len -= sizeof(struct ether_header);
 		m->m_len -= sizeof(struct ether_header);
 		m->m_data += sizeof(struct ether_header);
@@ -822,9 +840,11 @@
 
 		if (length==ETHER_MAX_LEN-ETHER_CRC_LEN)
                         DELAY( cs_recv_delay );
+#if NDRAWBRIDGE < 1
 	} else {
 		m_freem(m);
 	}
+#endif
 
 	return 0;
 }
@@ -877,6 +897,9 @@
 
                 case ISQ_RX_MISS_EVENT:
                         ifp->if_ierrors+=(status>>6);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
                         break;
 
                 case ISQ_TX_COL_EVENT:
Binary files /sys/i386/isa/if_cs.c.swp and sys/i386/isa/if_cs.c.swp differ
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_ed.c sys/i386/isa/if_ed.c
--- /sys/i386/isa/if_ed.c	Sun Oct 25 05:25:58 1998
+++ sys/i386/isa/if_ed.c	Tue Dec  1 17:47:00 1998
@@ -81,6 +81,12 @@
 #include <net/bridge.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 #include <machine/md_var.h>
 
@@ -2622,7 +2628,7 @@
 			}
 		}
 
-#if NBPFILTER > 0
+#if ((NBPFILTER > 0) || (NDRAWBRIDGE > 0))
 
 		/*
 		 * Promiscuous flag may have changed, so reprogram the RCR.
@@ -2735,8 +2741,15 @@
 
 	/* Allocate a header mbuf */
 	MGETHDR(m, M_DONTWAIT, MT_DATA);
+#if NDRAWBRIDGE > 0
+	if (m == NULL) {
+		DBstats.droppedNoMbufs++;
+		return;
+	}
+#else
 	if (m == NULL)
 		return;
+#endif
 	m->m_pkthdr.rcvif = &sc->arpcom.ac_if;
 	m->m_pkthdr.len = m->m_len = len;
 
@@ -2753,6 +2766,9 @@
 		/* Insist on getting a cluster */
 		if ((m->m_flags & M_EXT) == 0) {
 			m_freem(m);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return;
 		}
 	}
@@ -2814,6 +2830,8 @@
 		bpf_mtap(&sc->arpcom.ac_if, m);
 #endif
 
+	/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
 	/*
 	 * If we are in promiscuous mode, we have to check if
 	 * this packet is really ours.
@@ -2824,6 +2842,7 @@
 		m_freem(m);
 		return;
 	}
+#endif /* NDRAWBRIDGE < 1 */
 
 getit:
 	/*
@@ -3357,9 +3376,14 @@
 		 */
 		/* Set page 0 registers */
 		outb(sc->nic_addr + ED_P0_CR, sc->cr_proto | ED_CR_STP);
-
+#if NDRAWBRIDGE > 0
+		/* If drawbridge is enabled, do not accept runts and errors */
+		outb(sc->nic_addr + ED_P0_RCR, ED_RCR_PRO | ED_RCR_AM |
+		     ED_RCR_AB );
+#else
 		outb(sc->nic_addr + ED_P0_RCR, ED_RCR_PRO | ED_RCR_AM |
 		     ED_RCR_AB | ED_RCR_AR | ED_RCR_SEP);
+#endif
 	} else {
 		/* set up multicast addresses and filter modes */
 		if (ifp->if_flags & IFF_MULTICAST) {
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_el.c sys/i386/isa/if_el.c
--- /sys/i386/isa/if_el.c	Fri Sep  6 18:07:32 1996
+++ sys/i386/isa/if_el.c	Tue Dec  1 17:47:00 1998
@@ -21,6 +21,11 @@
  */
 #include "el.h"
 #include "bpfilter.h"
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -561,6 +566,9 @@
 		bpf_tap(&sc->arpcom.ac_if, buf, 
 			len + sizeof(struct ether_header));
 
+		/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+
 		/*
 		 * Note that the interface cannot be in promiscuous mode if
 		 * there are no bpf listeners.  And if el are in promiscuous
@@ -574,6 +582,7 @@
 		   && bcmp(eh->ether_dhost,etherbroadcastaddr,
 			   sizeof(eh->ether_dhost)) != 0)
 			return;
+#endif /* NDRAWBRIDGE < 1 */
 	}
 #endif
 
@@ -613,8 +622,15 @@
         }
 
         MGETHDR(m, M_DONTWAIT, MT_DATA);
+#if NDRAWBRIDGE > 0
+        if (m == 0) {
+		DBstats.droppedNoMbufs++;
+                return (0);
+	}
+#else
         if (m == 0)
                 return (0);
+#endif
         m->m_pkthdr.rcvif = ifp;
         m->m_pkthdr.len = totlen;
         m->m_len = MHLEN;
@@ -625,6 +641,9 @@
                         MGET(m, M_DONTWAIT, MT_DATA);
                         if (m == 0) {
                                 m_freem(top);
+#if NDRAWBRIDGE > 0
+                                DBstats.droppedNoMbufs++;
+#endif
                                 return (0);
                         }
                         m->m_len = MLEN;
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_ep.c sys/i386/isa/if_ep.c
--- /sys/i386/isa/if_ep.c	Thu Sep 17 13:02:17 1998
+++ sys/i386/isa/if_ep.c	Tue Dec  1 17:47:00 1998
@@ -107,6 +107,12 @@
 #include <net/bridge.h>
 #endif
 
+#include "drawbridge.h"
+#ifdef NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #if defined(__FreeBSD__)
 #include <machine/clock.h>
 #endif
@@ -1193,6 +1199,11 @@
     }
 #endif
 
+/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+goto getit;
+#endif
+
     /*
      * If we are in promiscuous mode, we have to
      * check if this packet is really ours.
@@ -1233,6 +1244,9 @@
 	sc->top = 0;
 #ifdef EP_LOCAL_STATS
 	sc->rx_no_mbuf++;
+#endif
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
 #endif
     }
     ep_fset(F_RX_FIRST);
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_ex.c sys/i386/isa/if_ex.c
--- /sys/i386/isa/if_ex.c	Fri Sep 26 12:25:04 1997
+++ sys/i386/isa/if_ex.c	Tue Dec  1 17:47:00 1998
@@ -74,6 +74,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 
 #include <i386/isa/isa_device.h>
@@ -683,9 +689,12 @@
     if (rx_status & RCV_OK_bit) {
       MGETHDR(m, M_DONTWAIT, MT_DATA);
       ipkt = m;
-      if (ipkt == NULL)
+      if (ipkt == NULL) {
 	ifp->if_iqdrops++;
-      else {
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
+      } else {
 	ipkt->m_pkthdr.rcvif = ifp;
 	ipkt->m_pkthdr.len = pkt_len;
 	ipkt->m_len = MHLEN;
@@ -697,6 +706,9 @@
 	    else {
 	      m_freem(ipkt);
 	      ifp->if_iqdrops++;
+#if NDRAWBRIDGE > 0
+	      DBstats.droppedNoMbufs++;
+#endif
 	      goto rx_another;
 	    }
 	  }
@@ -715,6 +727,9 @@
 	    if (m->m_next == NULL) {
 	      m_freem(ipkt);
 	      ifp->if_iqdrops++;
+#if NDRAWBRIDGE > 0
+	      DBstats.droppedNoMbufs++;
+#endif
 	      goto rx_another;
 	    }
 	    m = m->m_next;
@@ -734,6 +749,9 @@
 	if (ifp->if_bpf != NULL) {
 		bpf_mtap(ifp, ipkt);
 
+		/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+
 		/*
 		 * Note that the interface cannot be in promiscuous mode if there are
 		 * no BPF listeners. And if we are in promiscuous mode, we have to
@@ -746,6 +764,7 @@
 			m_freem(ipkt);
 			goto rx_another;
 		}
+#endif /* NDRAWBRIDGE < 1 */
 	}
 #endif
 	m_adj(ipkt, sizeof(struct ether_header));
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_fe.c sys/i386/isa/if_fe.c
--- /sys/i386/isa/if_fe.c	Sat Apr 18 18:25:11 1998
+++ sys/i386/isa/if_fe.c	Tue Dec  1 17:47:00 1998
@@ -121,6 +121,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 
 #include <i386/isa/isa.h>
@@ -2676,13 +2682,23 @@
 
 	/* Allocate an mbuf with packet header info.  */
 	MGETHDR(m, M_DONTWAIT, MT_DATA);
+#if NDRAWBRIDGE > 0
+	if ( m == NULL ) {
+		DBstats.droppedNoMbufs++;
+		return -1;
+	}
+#else
 	if ( m == NULL ) return -1;
+#endif
 
 	/* Attach a cluster if this packet doesn't fit in a normal mbuf.  */
 	if ( len > MHLEN - NFS_MAGIC_OFFSET ) {
 		MCLGET( m, M_DONTWAIT );
 		if ( !( m->m_flags & M_EXT ) ) {
 			m_freem( m );
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return -1;
 		}
 	}
@@ -2715,6 +2731,7 @@
 	}
 #endif
 
+#if NDRAWBRIDGE < 1
 	/*
 	 * Make sure this packet is (or may be) directed to us.
 	 * That is, the packet is either unicasted to our address,
@@ -2736,6 +2753,7 @@
 		m_freem( m );
 		return 0;
 	}
+#endif /* NDRAWBRIDGE */
 
 #if FE_DEBUG >= 3
 	if ( !ETHER_ADDR_IS_MULTICAST( eh->ether_dhost )
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_ie.c sys/i386/isa/if_ie.c
--- /sys/i386/isa/if_ie.c	Tue Jul  7 00:23:06 1998
+++ sys/i386/isa/if_ie.c	Tue Dec  1 17:47:00 1998
@@ -126,6 +126,11 @@
 #include <net/route.h>
 
 #include "bpfilter.h"
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 
 #ifdef INET
 #include <netinet/in.h>
@@ -1266,16 +1271,21 @@
    * This is only a consideration when FILTER is defined; i.e., when
    * we are either running BPF or doing multicasting.
    */
+#if NDRAWBRIDGE < 1  /* skip the check if running drawbridge */
   if(!check_eh(ie, ehp, to_bpf)) {
     ie_drop_packet_buffer(unit, ie);
     ie->arpcom.ac_if.if_ierrors--; /* just this case, it's not an error */
     return -1;
   }
+#endif
   totlen -= (offset = sizeof *ehp);
 
   MGETHDR(*mp, M_DONTWAIT, MT_DATA);
   if(!*mp) {
     ie_drop_packet_buffer(unit, ie);
+#if NDRAWBRIDGE > 0
+    DBstats.droppedNoMbufs++;
+#endif
     return -1;
   }
 
@@ -1303,6 +1313,9 @@
       MGET(m, M_DONTWAIT, MT_DATA);
       if(!m) {
 	m_freem(top);
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 	ie_drop_packet_buffer(unit, ie);
 	return -1;
       }
@@ -1477,6 +1490,8 @@
     /* Pass it up */
     bpf_mtap(&ie->arpcom.ac_if, &m0);
   }
+  /* If Drawbridge is enabled, always pass the packet up... */
+#if NDRAWBRIDGE < 1
   /*
    * A signal passed up from the filtering code indicating that the
    * packet is intended for BPF but not for the protocol machinery.
@@ -1486,6 +1501,7 @@
     last_not_for_us = m;
     return;
   }
+#endif /* NDRAWBRIDGE < 1 */
 #endif /* NBPFILTER > 0 */
   /*
    * In here there used to be code to check destination addresses upon
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_le.c sys/i386/isa/if_le.c
--- /sys/i386/isa/if_le.c	Fri Sep  6 18:07:40 1996
+++ sys/i386/isa/if_le.c	Tue Dec  1 17:47:00 1998
@@ -56,6 +56,11 @@
 #include <net/route.h>
 
 #include "bpfilter.h"
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 
 #ifdef INET
 #include <netinet/in.h>
@@ -426,6 +431,10 @@
 #if NBPFILTER > 0
     if (sc->le_if.if_bpf != NULL && seg2 == NULL) {
 	bpf_tap(&sc->le_if, seg1, total_len);
+
+	/* I Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+
 	/*
 	 * If this is single cast but not to us
 	 * drop it!
@@ -444,6 +453,7 @@
 		return;
 	    }
 	}
+#endif /* NDRAWBRIDGE < 1 */
     }
 #endif
     seg1 += sizeof(eh); total_len -= sizeof(eh); len1 -= sizeof(eh);
@@ -451,6 +461,9 @@
     MGETHDR(m, M_DONTWAIT, MT_DATA);
     if (m == NULL) {
 	sc->le_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 	return;
     }
     m->m_pkthdr.len = total_len;
@@ -460,6 +473,9 @@
 	if ((m->m_flags & M_EXT) == 0) {
 	    m_free(m);
 	    sc->le_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+	    DBstats.droppedNoMbufs++;
+#endif
 	    return;
 	}
     } else if (total_len + LE_XTRA > MHLEN && MINCLSIZE == (MHLEN+MLEN)) {
@@ -467,6 +483,9 @@
 	if (m->m_next == NULL) {
 	    m_free(m);
 	    sc->le_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+	    DBstats.droppedNoMbufs++;
+#endif
 	    return;
 	}
 	m->m_next->m_len = total_len - MHLEN - LE_XTRA;
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_lnc.c sys/i386/isa/if_lnc.c
--- /sys/i386/isa/if_lnc.c	Fri Oct 30 05:56:08 1998
+++ sys/i386/isa/if_lnc.c	Tue Dec  1 17:47:00 1998
@@ -101,6 +101,12 @@
 #include <net/bridge.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h> 
+extern Statistics DBstats; 
+#endif
+
 #ifdef PC98
 #include <machine/clock.h>
 #endif
@@ -348,11 +354,21 @@
 		/* XXX m->m_data = m->m_ext.ext_buf;*/
 	} else {
 		MGET(m, M_DONTWAIT, MT_DATA);
+#if NDRAWBRIDGE > 0
+   		if (!m) {
+			DBstats.droppedNoMbufs++;
+			return(1);
+		}
+#else
    	if (!m)
 			return(1);
+#endif
       MCLGET(m, M_DONTWAIT);
    	if (!m->m_ext.ext_buf) {
 			m_free(m);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return(1);
 		}
 	}
@@ -414,6 +430,9 @@
 	MGETHDR(head, M_DONTWAIT, MT_DATA);
 	if (!head) {
 		LNCSTATS(drop_packet)
+#if NDRAWBRIDGE > 0
+		DBstats.droppedNoMbufs++;
+#endif
 		return(0);
 	}
 
@@ -444,6 +463,9 @@
 			MGET(m, M_DONTWAIT, MT_DATA);
 			if (!m) {
 				m_freem(head);
+#if NDRAWBRIDGE > 0
+				DBstats.droppedNoMbufs++;
+#endif
 				return(0);
 			}
 			if (pkt_len >= MINCLSIZE)
@@ -568,12 +590,18 @@
 			if (flags & RBUFF) {
 				LNCSTATS(rbuff)
 				log(LOG_ERR, "lnc%d: Receive buffer error\n", unit);
+#if NDRAWBRIDGE > 0
+				DBstats.droppedNoMbufs++;
+#endif
 			}
 			if (flags & OFLO) {
 				/* OFLO only valid if ENP is not set */
 				if (!(flags & ENP)) {
 					LNCSTATS(oflo)
 					log(LOG_ERR, "lnc%d: Receive overflow error \n", unit);
+#if NDRAWBRIDGE > 0
+					DBstats.droppedNoMbufs++;
+#endif
 				}
 			} else if (flags & ENP) {
 			    if ((sc->arpcom.ac_if.if_flags & IFF_PROMISC)==0) {
@@ -653,6 +681,9 @@
                                     }
                                 } else
 #endif
+
+/* If Drawbridge is enabled always pass the packet up */
+#if NDRAWBRIDGE < 1
 				/* Check this packet is really for us */
 
 				if ((sc->arpcom.ac_if.if_flags & IFF_PROMISC) &&
@@ -661,6 +692,7 @@
 							sizeof(eh->ether_dhost))))
 						m_freem(head);
 				else
+#endif /* NDRAWBRIDGE < 1 */
 				{
 getit:
 					/* Skip over the ether header */
@@ -675,6 +707,9 @@
 				int unit = sc->arpcom.ac_if.if_unit;
 				log(LOG_ERR,"lnc%d: Packet dropped, no mbufs\n",unit);
 				LNCSTATS(drop_packet)
+#if NDRAWBRIDGE > 0
+				DBstats.droppedNoMbufs++;
+#endif
 			}
 		}
 
@@ -1723,6 +1758,9 @@
 			if (no_entries_needed > (NDESC(sc->ntdre) - sc->pending_transmits))
 				if (!(head = chain_to_cluster(head))) {
 					log(LOG_ERR, "lnc%d: Couldn't get mbuf for transmit packet -- Resetting \n ",ifp->if_unit);
+#if NDRAWBRIDGE > 0
+					DBstats.droppedNoMbufs++;
+#endif
 					lnc_reset(sc);
 					return;
 				}
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_wl.c sys/i386/isa/if_wl.c
--- /sys/i386/isa/if_wl.c	Thu Aug 20 00:52:44 1998
+++ sys/i386/isa/if_wl.c	Tue Dec  1 17:47:00 1998
@@ -191,6 +191,11 @@
 #include "wl.h"
 #include "opt_wavelan.h"
 #include "bpfilter.h"
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -982,6 +987,9 @@
 	if (wlhwrst(unit) != TRUE) {
 	    printf("wl%d read(): hwrst trouble.\n", unit);
 	}
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 	return 0;
     }
 
@@ -1001,6 +1009,9 @@
 	    CMD(unit);		/* turn off interrupts */
 	    printf("wl%d read(): hwrst trouble.\n", unit);
 	}
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 	return 0;
     }
     m->m_next = (struct mbuf *) 0;
@@ -1021,6 +1032,9 @@
     	    CMD(unit);		/* turn off interrupts */
     	    printf("wl%d read(): hwrst trouble.\n", unit);
     	}
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
     	return 0;
     }
 
@@ -1099,6 +1113,9 @@
 	
     }
 #endif
+
+/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
     /*
      * If hw is in promiscuous mode (note that I said hardware, not if
      * IFF_PROMISC is set in ifnet flags), then if this is a unicast
@@ -1126,6 +1143,7 @@
       m_freem(m);
       return 1;
     }
+#endif /* NDRAWBRIDGE < 1 */
 
 #ifdef WLDEBUG
     if (sc->wl_if.if_flags & IFF_DEBUG)
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_ze.c sys/i386/isa/if_ze.c
--- /sys/i386/isa/if_ze.c	Tue Jul  7 00:23:11 1998
+++ sys/i386/isa/if_ze.c	Tue Dec  1 17:47:00 1998
@@ -102,6 +102,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <machine/clock.h>
 #include <machine/md_var.h>
 
@@ -865,7 +871,7 @@
 	for (i = 0; i < ETHER_ADDR_LEN; ++i)
 		outb(sc->nic_addr + ED_P1_PAR0 + i, sc->arpcom.ac_enaddr[i]);
 
-#if NBPFILTER > 0
+#if ((NBPFILTER > 0) || (NDRAWBRIDGE > 0))
 	/*
 	 * Initialize multicast address hashing registers to accept
 	 *	 all multicasts (only used when in promiscuous mode)
@@ -1428,7 +1434,7 @@
 		    	    ((ifp->if_flags & IFF_RUNNING) == 0))
 				ze_init(ifp->if_unit);
 		}
-#if NBPFILTER > 0
+#if ((NBPFILTER > 0) || (NDRAWBRIDGE > 0))
 		if (ifp->if_flags & IFF_PROMISC) {
 			/*
 			 * Set promiscuous mode on interface.
@@ -1520,6 +1526,8 @@
 	if (sc->arpcom.ac_if.if_bpf) {
 		bpf_mtap(&sc->arpcom.ac_if, head);
 
+		/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
 		/*
 		 * Note that the interface cannot be in promiscuous mode if
 		 * there are no BPF listeners.  And if we are in promiscuous
@@ -1536,6 +1544,7 @@
 			m_freem(head);
 			return;
 		}
+#endif /* NDRAWBRIDGE < 1 */
 	}
 #endif
 
@@ -1549,6 +1558,9 @@
 
 bad:	if (head)
 		m_freem(head);
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 	return;
 }
 
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/i386/isa/if_zp.c sys/i386/isa/if_zp.c
--- /sys/i386/isa/if_zp.c	Wed Oct 29 18:38:21 1997
+++ sys/i386/isa/if_zp.c	Tue Dec  1 17:47:00 1998
@@ -114,6 +114,11 @@
 #include "zp.h"
 
 #include "bpfilter.h"
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
 
 #include <sys/param.h>
 #if defined(__FreeBSD__)
@@ -970,6 +975,9 @@
 	if (sc->arpcom.ac_if.if_bpf) {
 		bpf_mtap(&sc->arpcom.ac_if, top);
 
+		/* If Drawbridge is enabled, always pass the packet up */
+#if NDRAWBRIDGE < 1
+
 		/* Note that the interface cannot be in promiscuous mode if
 		 * there are no BPF listeners.  And if we are in promiscuous
 		 * mode, we have to check if this packet is really ours. */
@@ -982,6 +990,7 @@
 			m_freem(top);
 			return;
 		}
+#endif /* NDRAWBRIDGE < 1 */
 	}
 #endif
 	m_adj(top, sizeof(struct ether_header));
@@ -992,6 +1001,9 @@
 	while (inw(BASE + EP_STATUS) & S_COMMAND_IN_PROGRESS);
 	if (top)
 		m_freem(top);
+#if NDRAWBRIDGE > 0
+	DBstats.droppedNoMbufs++;
+#endif
 
 }
 
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/net/if.h sys/net/if.h
--- /sys/net/if.h	Tue Jul  7 00:24:08 1998
+++ sys/net/if.h	Tue Dec  1 17:47:00 1998
@@ -292,7 +292,7 @@
 #endif
 #endif /* KERNEL */
 
-#define	IFQ_MAXLEN	50
+#define	IFQ_MAXLEN	400		/* changed 50 to 400 for drawbridge */
 #define	IFNET_SLOWHZ	1		/* granularity is 1 second */
 
 /*
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/net/if_ethersubr.c sys/net/if_ethersubr.c
--- /sys/net/if_ethersubr.c	Thu Sep 17 13:02:20 1998
+++ sys/net/if_ethersubr.c	Tue Dec  1 17:47:00 1998
@@ -101,6 +101,13 @@
 extern u_char	aarp_org_code[ 3 ];
 #endif NETATALK
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+extern FilterConfig DBcfg;
+#endif
+
 #ifdef BRIDGE
 #include <net/bridge.h>
 #endif
@@ -437,6 +444,65 @@
             return 0 ;
 	}
 #endif
+
+#if NDRAWBRIDGE > 0
+	/*
+	 * Lookup the destination of this packet in the bridge table to find
+	 * out which side of drawbridge it's on.  Perform the desired action
+	 * based on the destination and the listen configuration.
+	 */
+	switch (drawbridge_bridge_lookup((HardwareAddr *)edst, ifp)) {
+
+	/* Redirect to the inside interface */
+	case DB_INSIDE_IF: /* Redirect to inside interface */
+		ifp = DBcfg.in_ifp;
+		bcopy((caddr_t)&DBcfg.local_hwaddr,(caddr_t)eh->ether_shost,6);
+		break;
+
+	/* Redirect to the outside interface */
+	case DB_OUTSIDE_IF: /* Redirect to outside interface */
+		ifp = DBcfg.out_ifp;
+		bcopy((caddr_t)&DBcfg.local_hwaddr,(caddr_t)eh->ether_shost,6);
+		break;
+
+	/* Send out both interfaces */
+	case DB_BOTH_IF: {
+		register struct ifnet *ifp2;
+		register struct mbuf *mdup;
+
+		if ((mdup = m_copy(m, 0, (int)M_COPYALL))) {
+			ifp2 = (ifp == DBcfg.in_ifp) ? DBcfg.out_ifp :
+						       DBcfg.in_ifp;
+			bcopy((caddr_t)&DBcfg.local_hwaddr,
+			      (caddr_t)(mtod(mdup, struct ether_header *)->
+					ether_shost), 6);
+			s = splimp();
+			if (IF_QFULL(&ifp2->if_snd)) {
+				IF_DROP(&ifp2->if_snd);
+				splx(s);
+				m_freem(mdup);
+			} else {
+				IF_ENQUEUE(&ifp2->if_snd, mdup);
+				if ((ifp2->if_flags & IFF_OACTIVE) == 0)
+					(*ifp2->if_start)(ifp2);
+				splx(s);
+			}
+		}
+		break;
+	}
+
+	/* Discard this packet */
+	case DB_DROP_PKT:
+		m_freem(m);
+		return (error);
+		break;
+
+	/* Don't do anything special with this packet */
+	case DB_PROCESS_PKT:
+
+	}
+#endif
+
 	s = splimp();
 	/*
 	 * Queue message on interface, and start output if interface
@@ -485,6 +551,63 @@
 		return;
 	}
 	ifp->if_ibytes += m->m_pkthdr.len + sizeof (*eh);
+
+#if NDRAWBRIDGE > 0
+	/*
+	 * Find out what to do with the incoming packet
+	 */
+	switch (drawbridge_test_pkt(&ifp, eh, m)) {
+ 
+	/* Bridge this packet across to the other interface */
+	case DB_FORWARD_PKT:
+		/*
+		 * ifp now points to the other interface.
+		 * Make sure the other interface is up and running.
+		 */
+		if ((ifp->if_flags & IFF_UP) == 0) {
+			m_freem(m);
+			DBstats.droppedIfDown++;
+			return;
+		}
+		/* XXX This definately needs to be fixed because it's too
+		 *     big of an assumption to make and will not work for
+		 *     the if_wl.c and if_ie.c ethernet drivers...
+		 *
+		 * The driver has moved m_data to the first byte after the
+		 * header so readjust m_data to include the header again.
+		 */
+		m->m_pkthdr.len += sizeof(struct ether_header);
+		m->m_len += sizeof(struct ether_header);
+		m->m_data -= sizeof(struct ether_header);
+		/*
+		 * Queue message on interface, and start output if interface
+		 * not yet active.
+		 */
+		s = splimp();
+		if (IF_QFULL(&ifp->if_snd)) {
+			splx(s);
+			m_freem(m);
+			DBstats.droppedIfQfull++;
+			return;
+		}
+		IF_ENQUEUE(&ifp->if_snd, m);
+		if ((ifp->if_flags & IFF_OACTIVE) == 0)
+			(*ifp->if_start)(ifp);
+		splx(s);
+		return;
+ 
+	/* Discard the packet according to the bridge table or a filter rule */
+	case DB_DROP_PKT:
+		m_freem(m);
+		return;
+ 
+	/* This packet is for us or drawbridge is not running */
+	/* so just continue normal processing of the packet   */
+	case DB_PROCESS_PKT:
+ 
+	}
+#endif
+
 	if (bcmp((caddr_t)etherbroadcastaddr, (caddr_t)eh->ether_dhost,
 	    sizeof(etherbroadcastaddr)) == 0)
 		m->m_flags |= M_BCAST;
@@ -492,6 +615,21 @@
 		m->m_flags |= M_MCAST;
 	if (m->m_flags & (M_BCAST|M_MCAST))
 		ifp->if_imcasts++;
+
+#if NDRAWBRIDGE > 0
+	/*
+	* Drawbridge enables promiscuous mode so we need to add a check here
+	* to discard any packets not addressed to us.  This check is usually
+	* done in the driver but we disabled it so we would get to look at
+	* all incoming packets.
+	*/
+	else if ((ifp->if_flags & IFF_PROMISC)
+	    && bcmp(((struct arpcom *)ifp)->ac_enaddr, (caddr_t)eh->ether_dhost,
+		sizeof(eh->ether_dhost)) != 0) {
+		m_freem(m);
+		return;
+       }
+#endif
 
 	ether_type = ntohs(eh->ether_type);
 
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/net/if_fddisubr.c sys/net/if_fddisubr.c
--- /sys/net/if_fddisubr.c	Wed Jun 24 03:59:36 1998
+++ sys/net/if_fddisubr.c	Tue Dec  1 17:47:00 1998
@@ -111,6 +111,13 @@
 
 #include "bpfilter.h"
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+extern FilterConfig DBcfg;
+#endif
+
 #define senderr(e) { error = (e); goto bad;}
 
 /*
@@ -429,6 +436,65 @@
   queue_it:
  	(void)memcpy((caddr_t)fh->fddi_shost, (caddr_t)ac->ac_enaddr,
 	    sizeof(fh->fddi_shost));
+
+#if NDRAWBRIDGE > 0
+	/*
+	 * Lookup the destination of this packet in the bridge table to find
+	 * out which side of drawbridge it's on.  Perform the desired action
+	 * based on the destination and the listen configuration.
+	 */
+	switch (drawbridge_bridge_lookup((HardwareAddr *)edst, ifp)) {
+
+	/* Redirect to the inside interface */
+	case DB_INSIDE_IF:
+		ifp = DBcfg.in_ifp;
+		bcopy((caddr_t)&DBcfg.local_hwaddr,(caddr_t)fh->fddi_shost,6);
+		break;
+
+	/* Redirect to the outside interface */
+	case DB_OUTSIDE_IF:
+		ifp = DBcfg.out_ifp;
+		bcopy((caddr_t)&DBcfg.local_hwaddr,(caddr_t)fh->fddi_shost,6);
+		break;
+
+	/* Send out both interfaces */
+	case DB_BOTH_IF: {
+		register struct ifnet *ifp2;
+		register struct mbuf *mdup;
+
+		if ((mdup = m_copy(m, 0, (int)M_COPYALL))) {
+			ifp2 = (ifp == DBcfg.in_ifp) ? DBcfg.out_ifp :
+						       DBcfg.in_ifp;
+			bcopy((caddr_t)&DBcfg.local_hwaddr,
+			      (caddr_t)(mtod(mdup, struct fddi_header *)->
+						fddi_shost), 6);
+			s = splimp();
+			if (IF_QFULL(&ifp2->if_snd)) {
+				IF_DROP(&ifp->if_snd);
+				splx(s);
+				m_freem(mdup);
+			} else {
+				IF_ENQUEUE(&ifp2->if_snd, mdup);
+				if ((ifp2->if_flags & IFF_OACTIVE) == 0)
+					(*ifp2->if_start)(ifp2);
+				splx(s);
+			}
+		}
+		break;
+	}
+
+	/* Discard this packet */
+	case DB_DROP_PKT:
+		m_freem(m);
+		return (error);
+		break;
+
+	/* Don't do anything special with this packet */
+	case DB_PROCESS_PKT:
+
+	}
+#endif
+
 	s = splimp();
 	/*
 	 * Queue message on interface, and start output if interface
@@ -475,6 +541,63 @@
 	}
 	ifp->if_lastchange = time;
 	ifp->if_ibytes += m->m_pkthdr.len + sizeof (*fh);
+
+#if NDRAWBRIDGE > 0
+	/*
+	 * Find out what to do with the incoming packet
+	 */
+	switch (drawbridge_test_pkt(&ifp, fh, m)) {
+
+	/* Bridge this packet across to the other interface */
+	case DB_FORWARD_PKT:
+		/*
+		 * ifp now points to the other interface.
+		 * Make sure the other interface is up and running.
+		 */
+		if ((ifp->if_flags & IFF_UP) == 0) {
+			m_freem(m);
+			DBstats.droppedIfDown++;
+			return;
+		}
+		/* XXX This definately needs to be fixed because it's too 
+		 *     big of an assumption to make.
+		 *
+		 * The driver has moved m_data to the first byte after the
+		 * header so readjust m_data to include the header again.
+		 */
+		m->m_pkthdr.len += sizeof(struct fddi_header);
+		m->m_len += sizeof(struct fddi_header);
+		m->m_data -= sizeof(struct fddi_header);
+		/*
+		 * Queue message on interface, and start output if interface
+		 * not yet active.
+		 */
+		s = splimp();
+		if (IF_QFULL(&ifp->if_snd)) {
+			splx(s);
+			m_free(m);
+			DBstats.droppedIfQfull++;
+			return;
+		}
+		IF_ENQUEUE(&ifp->if_snd, m);
+		if ((ifp->if_flags & IFF_OACTIVE) == 0)
+			(*ifp->if_start)(ifp);
+		splx(s);
+		return;
+
+	/* Discard the packet according to the bridge table or a filter rule */
+	case DB_DROP_PKT:
+		/* filter (discard) the packet */
+		m_freem(m);
+		return;
+
+	/* This packet is for us or drawbridge is not running */
+	/* so just continue normal processing of the packet   */
+	case DB_PROCESS_PKT:
+
+        }
+#endif
+
 	if (fh->fddi_dhost[0] & 1) {
 		if (bcmp((caddr_t)fddibroadcastaddr, (caddr_t)fh->fddi_dhost,
 		    sizeof(fddibroadcastaddr)) == 0)
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/pci/if_de.c sys/pci/if_de.c
--- /sys/pci/if_de.c	Fri Nov 27 18:26:10 1998
+++ sys/pci/if_de.c	Tue Dec  1 17:47:01 1998
@@ -113,6 +113,12 @@
 #define	DEVAR_INCLUDE	"pci/if_devar.h"
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0 
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif 
+
 #ifdef BRIDGE
 #include <net/bridge.h>
 #endif
@@ -3321,7 +3327,19 @@
 	 * descriptors to process.
  	 */
 	if (eop == ri->ri_nextout)
+#if NDRAWBRIDGE < 1
 	    break;
+#else
+	{
+	   /*
+	    * The card has run out of available receive descriptors.
+	    * (This driver uses mbufs as descriptors)
+	    */
+	   DBstats.droppedNoMbufs++;
+	   break;
+	}
+#endif
+
 	    
 	/*
 	 * 90% of the packets will fit in one descriptor.  So we optimize
@@ -3415,10 +3433,19 @@
                 /* all others accepted locally */
             } else
 #endif
+	   /*
+	    * When Drawbridge is configured, do not discard the packet if
+	    * it doesn't have our MAC address.  This check is now done
+	    * in if_ethersubr after the drawbridge code.
+	    */
+#if NDRAWBRIDGE < 1
 	    if ((sc->tulip_flags & (TULIP_PROMISC|TULIP_HASHONLY))
 		    && (eh.ether_dhost[0] & 1) == 0
 		    && !TULIP_ADDREQUAL(eh.ether_dhost, sc->tulip_enaddr))
 		    goto next;
+#else
+	    ; /* this ends the 'else' when BRIDGE is defined... */
+#endif
 	    accept = 1;
 	    total_len -= sizeof(struct ether_header);
 	} else {
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/pci/if_fxp.c sys/pci/if_fxp.c
--- /sys/pci/if_fxp.c	Sun Oct 11 01:30:11 1998
+++ sys/pci/if_fxp.c	Tue Dec  1 17:47:01 1998
@@ -107,6 +107,12 @@
 
 #endif /* __NetBSD__ */
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #ifdef BRIDGE
 #include <net/if_types.h>
 #include <net/bridge.h>
@@ -839,6 +845,9 @@
 		MGETHDR(mn, M_DONTWAIT, MT_DATA);
 		if (mn == NULL) {
 			m_freem(mb_head);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return;
 		}
 		if (mb_head->m_pkthdr.len > MHLEN) {
@@ -846,6 +855,9 @@
 			if ((mn->m_flags & M_EXT) == 0) {
 				m_freem(mn);
 				m_freem(mb_head);
+#if NDRAWBRIDGE > 0
+				DBstats.droppedNoMbufs++;
+#endif
 				return;
 			}
 		}
@@ -970,6 +982,9 @@
 					if (total_len <
 					    sizeof(struct ether_header)) {
 						m_freem(m);
+#if NDRAWBRIDGE > 0
+						DBstats.droppedNoMbufs++;
+#endif
 						goto rcvloop;
 					}
 					m->m_pkthdr.rcvif = ifp;
@@ -997,6 +1012,7 @@
                                             goto getit ;
                                         }
 #endif
+#if NDRAWBRIDGE < 1
 					/*
 					 * Only pass this packet up
 					 * if it is for us.
@@ -1007,6 +1023,9 @@
 					    FXP_RFA_STATUS_IAMATCH) &&
 					    (eh->ether_dhost[0] & 1)
 					    == 0) {
+#else
+					{
+#endif /* NDRAWBRIDGE < 1 */
 dropit:
 						if (m)
 						m_freem(m);
@@ -1020,6 +1039,10 @@
 					m->m_pkthdr.len = m->m_len ;
 					ether_input(ifp, eh, m);
 				}
+#if NDRAWBRIDGE > 0
+				else
+					DBstats.droppedNoMbufs++;
+#endif
 				goto rcvloop;
 			}
 			if (statack & FXP_SCB_STATACK_RNR) {
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/pci/if_tl.c sys/pci/if_tl.c
--- /sys/pci/if_tl.c	Sat Oct 31 11:25:38 1998
+++ sys/pci/if_tl.c	Tue Dec  1 19:20:42 1998
@@ -220,6 +220,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <vm/vm.h>              /* for vtophys */
 #include <vm/vm_param.h>        /* for vtophys */
 #include <vm/pmap.h>            /* for vtophys */
@@ -1934,6 +1940,9 @@
 			cur_rx->tl_ptr->tlist_frsize = MCLBYTES;
 			cur_rx->tl_ptr->tlist_cstat = TL_CSTAT_READY;
 			cur_rx->tl_ptr->tl_frag.tlist_dcnt = MCLBYTES;
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			continue;
 		}
 
@@ -1970,6 +1979,7 @@
 		if (ifp->if_bpf) {
 			m->m_pkthdr.len = m->m_len = total_len;
 			bpf_mtap(ifp, m);
+#if NDRAWBRIDGE < 1
 			if (ifp->if_flags & IFF_PROMISC &&
 				(bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr,
 		 				ETHER_ADDR_LEN) &&
@@ -1977,6 +1987,7 @@
 				m_freem(m);
 				continue;
 			}
+#endif /* NDRAWBRIDGE < 1 */
 		}
 #endif
 		/* Remove header from mbuf and pass it on. */
@@ -2334,6 +2345,9 @@
 		MGETHDR(m_new, M_DONTWAIT, MT_DATA);
 		if (m_new == NULL) {
 			printf("tl%d: no memory for tx list", sc->tl_unit);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			return(1);
 		}
 		if (m_head->m_pkthdr.len > MHLEN) {
@@ -2342,6 +2356,9 @@
 				m_freem(m_new);
 				printf("tl%d: no memory for tx list",
 				sc->tl_unit);
+#if NDRAWBRIDGE > 0
+				DBstats.droppedNoMbufs++;
+#endif
 				return(1);
 			}
 		}
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/pci/if_tx.c sys/pci/if_tx.c
--- /sys/pci/if_tx.c	Thu Nov 12 19:47:43 1998
+++ sys/pci/if_tx.c	Tue Dec  1 18:19:48 1998
@@ -111,6 +111,12 @@
 #include <net/bpfdesc.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #if defined(__OpenBSD__)
 #include <sys/ioctl.h>
 #include <sys/errno.h>
@@ -804,6 +810,9 @@
 				printf(EPIC_FORMAT ": cannot allocate mbuf cluster\n",EPIC_ARGS(sc));
 				m_freem(m0);
 				ifp->if_oerrors++;
+#if NDRAWBRIDGE > 0
+				DBstats.droppedNoMbufs++;
+#endif
 				continue;
 			}
 
@@ -888,6 +897,9 @@
 			buf->mbuf = m;
 			desc->status = 0x8000;
 			sc->sc_if.if_ierrors++;
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			continue;
 		}
 
@@ -908,13 +920,14 @@
 #else /* __OpenBSD__ */
 			bpf_mtap( sc->sc_if.if_bpf, m );
 #endif /* __FreeBSD__ */
-
+#if NDRAWBRIDGE < 1
 		/* Accept only our packets, broadcasts and multicasts */
 		if( (eh->ether_dhost[0] & 1) == 0 &&
 		    bcmp(eh->ether_dhost,sc->sc_macaddr,ETHER_ADDR_LEN)){
 			m_freem(m);
 			continue;
 		}
+#endif /* NDRAWBRIDGE < 1 */
 #endif
 
 		/* Second mbuf holds packet ifself */
@@ -1002,9 +1015,23 @@
             if( status & (INTSTAT_RQE|INTSTAT_OVW) ){
 #if defined(EPIC_DEBUG)
                 if( status & INTSTAT_OVW ) 
+#if NDRAWBRIDGE > 0
+		{
+		    DBstats.droppedNoMbufs++;
+#endif
                     printf(EPIC_FORMAT ": RX buffer overflow\n",EPIC_ARGS(sc));
+#if NDRAWBRIDGE > 0
+		}
+#endif
                 if( status & INTSTAT_RQE ) 
+#if NDRAWBRIDGE > 0
+		{
+		    DBstats.droppedNoMbufs++;
+#endif
                     printf(EPIC_FORMAT ": RX FIFO overflow\n",EPIC_ARGS(sc));
+#if NDRAWBRIDGE > 0
+		}
+#endif
                 if( sc->sc_if.if_flags & IFF_DEBUG ) 
                     epic_dump_state(sc);
 #endif
diff -Nur --exclude=compile --exclude=*.orig --exclude=drawbr* --exclude=DRAWBRIDGE --exclude=newvers.sh /sys/pci/if_xl.c sys/pci/if_xl.c
--- /sys/pci/if_xl.c	Wed Nov 18 10:47:50 1998
+++ sys/pci/if_xl.c	Tue Dec  1 18:06:26 1998
@@ -113,6 +113,12 @@
 #include <net/bpf.h>
 #endif
 
+#include "drawbridge.h"
+#if NDRAWBRIDGE > 0
+#include <net/drawbrdg.h>
+extern Statistics DBstats;
+#endif
+
 #include <vm/vm.h>              /* for vtophys */
 #include <vm/pmap.h>            /* for vtophys */
 #include <machine/clock.h>      /* for DELAY */
@@ -1737,6 +1743,9 @@
 	if (m_new == NULL) {
 		printf("xl%d: no memory for rx list -- packet dropped!\n",
 								sc->xl_unit);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 		return(ENOBUFS);
 	}
 
@@ -1745,6 +1754,9 @@
 		printf("xl%d: no memory for rx list -- packet dropped!\n",
 								sc->xl_unit);
 		m_freem(m_new);
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 		return(ENOBUFS);
 	}
 
@@ -1800,6 +1812,9 @@
 							sc->xl_unit);
 			ifp->if_ierrors++;
 			cur_rx->xl_ptr->xl_status = 0;
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			continue;
 		}
 
@@ -1817,6 +1832,9 @@
 		if (xl_newbuf(sc, cur_rx) == ENOBUFS) {
 			ifp->if_ierrors++;
 			cur_rx->xl_ptr->xl_status = 0;
+#if NDRAWBRIDGE > 0
+			DBstats.droppedNoMbufs++;
+#endif
 			continue;
 		}
 
@@ -1832,6 +1850,7 @@
 		if (ifp->if_bpf) {
 			m->m_pkthdr.len = m->m_len = total_len;
 			bpf_mtap(ifp, m);
+#if NDRAWBRIDGE < 1
 			if (ifp->if_flags & IFF_PROMISC &&
 				(bcmp(eh->ether_dhost, sc->arpcom.ac_enaddr,
 						ETHER_ADDR_LEN) &&
@@ -1839,6 +1858,7 @@
 				m_freem(m);
 				continue;
 			}
+#endif
 		}
 #endif
 		/* Remove header from mbuf and pass it on. */
