*** if_loop.c.virgin Sun Jun 23 02:51:48 1996 --- if_loop.c Sun Jun 23 02:52:07 1996 *************** *** 37,42 **** --- 37,49 ---- #include #endif + #include "bpfilter.h" + #if NBPFILTER > 0 + #include + #include + 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++;