diff options
author | sam <sam@FreeBSD.org> | 2002-11-15 00:00:15 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2002-11-15 00:00:15 +0000 |
commit | 6a05792540ffa00713f4b3a1521864f7dddc1f39 (patch) | |
tree | 2a5611d45149f91e7ddfd0e32391f1ef7d8590e1 /sys/contrib/dev/oltr | |
parent | 36661cddf10b1ee6cf5c6ca63413f6f860242c8e (diff) | |
download | FreeBSD-src-6a05792540ffa00713f4b3a1521864f7dddc1f39.zip FreeBSD-src-6a05792540ffa00713f4b3a1521864f7dddc1f39.tar.gz |
network interface and link layer changes:
o on input don't strip the Ethernet header from packets
o input packet handling is now done with if_input
o track changes to ether_ifattach/ether_ifdetach API
o track changes to bpf tapping
o call ether_ioctl for default handling of ioctl's
o use constants from net/ethernet.h where possible
Reviewed by: many
Approved by: re
Diffstat (limited to 'sys/contrib/dev/oltr')
-rw-r--r-- | sys/contrib/dev/oltr/if_oltr.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/contrib/dev/oltr/if_oltr.c b/sys/contrib/dev/oltr/if_oltr.c index 21c36e1..a4b1a82 100644 --- a/sys/contrib/dev/oltr/if_oltr.c +++ b/sys/contrib/dev/oltr/if_oltr.c @@ -56,6 +56,13 @@ #if (NBPFILTER > 0) || (__FreeBSD_version > 400000) #include <net/bpf.h> + +#ifndef BPF_MTAP +#define BPF_MTAP(_ifp, _m) do { \ + if ((_ifp)->if_bpf) \ + bpf_mtap((_ifp), (_m)); \ +} while (0) +#endif #endif #include <vm/vm.h> /* for vtophys */ @@ -760,8 +767,7 @@ outloop: sc->tx_frame++; #if (NBPFILTER > 0) || (__FreeBSD_version > 400000) - if (ifp->if_bpf) - bpf_mtap(ifp, m0); + BPF_MTAP(ifp, m0); #endif /*ifp->if_opackets++;*/ @@ -1465,8 +1471,7 @@ DriverReceiveFrameCompleted(void *DriverHandle, int ByteCount, int FragmentCount } } #if (NBPFILTER > 0) || (__FreeBSD_version > 400000) - if (ifp->if_bpf) - bpf_mtap(ifp, m0); + BPF_MTAP(ifp, m0); #endif /*if (ifp->if_flags & IFF_PROMISC) {*/ |