home *** CD-ROM | disk | FTP | other *** search
- *** if_loop.c Tue Jan 28 18:09:18 1992
- --- if_loop.c.bpf Tue Jan 28 18:10:48 1992
- ***************
- *** 37,42 ****
- --- 37,49 ----
- #include <vax/mtpr.h>
- #endif
-
- + #include "bpfilter.h"
- + #if NBPFILTER > 0
- + #include <sys/time.h>
- + #include <net/bpf.h>
- + static caddr_t lo_bpf;
- + #endif
- +
- #define LOMTU (1024+512)
-
- struct ifnet loif;
- ***************
- *** 65,70 ****
- --- 72,80 ----
- ifp->if_flags |= IFF_UP;
- #endif BERK
- ifp->if_flags |= IFF_RUNNING;
- + #if NBPFILTER > 0
- + bpfattach(&lo_bpf, ifp, DLT_NULL, sizeof(u_int));
- + #endif
- }
-
- looutput(ifp, m0, dst)
- ***************
- *** 93,98 ****
- --- 103,114 ----
- m->m_next = m0;
- m0 = m;
- }
- + #if NBPFILTER > 0
- + if (lo_bpf) {
- + *(mtod(m0, u_int *)) = dst->sa_family;
- + bpf_mtap(lo_bpf, m0);
- + }
- + #endif
- *(mtod(m0, struct ifnet **)) = ifp;
- s = splimp();
- ifp->if_opackets++;
-