diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2008-11-09 15:08:27 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2008-11-09 15:08:27 +0000 |
commit | 19e72e3b9f3138440f80b79260f2adaee85eae40 (patch) | |
tree | 291a75bc288930e303d106f2c4b3e8fb865415a0 /sys/dev/pci/if_txp.c | |
parent | be7cd0fdfd40b4f306a204fdbb31aa7cdd7efec5 (diff) |
Introduce bpf_mtap_ether(), which for the benefit of bpf listeners
creates the VLAN encapsulation from the tag stored in the mbuf
header. Idea from FreeBSD, input from claudio@ and canacar@.
Switch all hardware VLAN enabled drivers to the new function.
ok claudio@
Diffstat (limited to 'sys/dev/pci/if_txp.c')
-rw-r--r-- | sys/dev/pci/if_txp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index 343bb2c6dc1..326324b426a 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txp.c,v 1.97 2008/10/16 19:18:03 naddy Exp $ */ +/* $OpenBSD: if_txp.c,v 1.98 2008/11/09 15:08:26 naddy Exp $ */ /* * Copyright (c) 2001 @@ -690,7 +690,7 @@ txp_rx_reclaim(struct txp_softc *sc, struct txp_rx_ring *r, * Handle BPF listeners. Let the BPF user see the packet. */ if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); + bpf_mtap_ether(ifp->if_bpf, m, BPF_DIRECTION_IN); #endif if (rxd->rx_stat & htole32(RX_STAT_IPCKSUMBAD)) @@ -1454,7 +1454,7 @@ txp_start(struct ifnet *ifp) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT); + bpf_mtap_ether(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif txd->tx_flags |= TX_FLAGS_VALID; |