mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 16:40:47 +00:00
IfAPI: Retire if_etherbpfmtap() and if_bpfmtap()
Summary: These came in the original DrvAPI commits in 2014, and are obsoleted by bpf_mtap_if() and ether_bpf_mtap_if(). The `_if` suffix, rather than prefix, conveys that it's operating on the bpf of the interface, instead than the interface itself. Reviewed by: glebius Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D41146
This commit is contained in:
parent
8052b01e7e
commit
2a3716432d
|
@ -984,7 +984,7 @@ awg_start_locked(struct awg_softc *sc)
|
|||
if_sendq_prepend(ifp, m);
|
||||
break;
|
||||
}
|
||||
if_bpfmtap(ifp, m);
|
||||
bpf_mtap_if(ifp, m);
|
||||
}
|
||||
|
||||
if (cnt != 0) {
|
||||
|
|
|
@ -1036,7 +1036,7 @@ gen_start_locked(struct gen_softc *sc)
|
|||
if_sendq_prepend(ifp, m);
|
||||
break;
|
||||
}
|
||||
if_bpfmtap(ifp, m);
|
||||
bpf_mtap_if(ifp, m);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -5368,7 +5368,7 @@ bge_start_locked(if_t ifp)
|
|||
* If there's a BPF listener, bounce a copy of this frame
|
||||
* to him.
|
||||
*/
|
||||
if_bpfmtap(ifp, m_head);
|
||||
bpf_mtap_if(ifp, m_head);
|
||||
}
|
||||
|
||||
if (count > 0)
|
||||
|
|
|
@ -5574,7 +5574,7 @@ bxe_tx_start_locked(struct bxe_softc *sc,
|
|||
tx_count++;
|
||||
|
||||
/* send a copy of the frame to any BPF listeners. */
|
||||
if_etherbpfmtap(ifp, m);
|
||||
ether_bpf_mtap_if(ifp, m);
|
||||
|
||||
tx_bd_avail = bxe_tx_avail(sc, fp);
|
||||
|
||||
|
@ -5715,7 +5715,7 @@ bxe_tx_mq_start_locked(struct bxe_softc *sc,
|
|||
tx_count++;
|
||||
|
||||
/* send a copy of the frame to any BPF listeners */
|
||||
if_etherbpfmtap(ifp, next);
|
||||
ether_bpf_mtap_if(ifp, next);
|
||||
|
||||
drbr_advance(ifp, tx_br);
|
||||
}
|
||||
|
|
|
@ -1132,7 +1132,7 @@ dwc_txstart_locked(struct dwc_softc *sc)
|
|||
if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0);
|
||||
break;
|
||||
}
|
||||
if_bpfmtap(ifp, m);
|
||||
bpf_mtap_if(ifp, m);
|
||||
sc->tx_map_head = next_txidx(sc, sc->tx_map_head);
|
||||
sc->tx_mapcount++;
|
||||
++enqueued;
|
||||
|
|
|
@ -597,7 +597,7 @@ eqos_start_locked(if_t ifp)
|
|||
if_setdrvflagbits(ifp, IFF_DRV_OACTIVE, 0);
|
||||
break;
|
||||
}
|
||||
if_bpfmtap(ifp, m);
|
||||
bpf_mtap_if(ifp, m);
|
||||
pending++;
|
||||
}
|
||||
|
||||
|
|
|
@ -1377,7 +1377,7 @@ fxp_start_body(if_t ifp)
|
|||
/*
|
||||
* Pass packet to bpf if there is a listener.
|
||||
*/
|
||||
if_bpfmtap(ifp, mb_head);
|
||||
bpf_mtap_if(ifp, mb_head);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -2621,7 +2621,7 @@ nfe_start_locked(if_t ifp)
|
|||
break;
|
||||
}
|
||||
enq++;
|
||||
if_etherbpfmtap(ifp, m0);
|
||||
ether_bpf_mtap_if(ifp, m0);
|
||||
}
|
||||
|
||||
if (enq > 0) {
|
||||
|
|
|
@ -326,7 +326,7 @@ ntb_transmit_locked(struct ntb_net_queue *q)
|
|||
CTR0(KTR_NTB, "TX: ntb_transmit_locked");
|
||||
while ((m = drbr_peek(ifp, q->br)) != NULL) {
|
||||
CTR1(KTR_NTB, "TX: start mbuf %p", m);
|
||||
if_etherbpfmtap(ifp, m);
|
||||
ether_bpf_mtap_if(ifp, m);
|
||||
len = m->m_pkthdr.len;
|
||||
mflags = m->m_flags;
|
||||
rc = ntb_transport_tx_enqueue(q->qp, m, m, len);
|
||||
|
|
12
sys/net/if.c
12
sys/net/if.c
|
@ -4909,18 +4909,6 @@ if_gethandle(u_char type)
|
|||
return (if_alloc(type));
|
||||
}
|
||||
|
||||
void
|
||||
if_bpfmtap(if_t ifp, struct mbuf *m)
|
||||
{
|
||||
BPF_MTAP(ifp, m);
|
||||
}
|
||||
|
||||
void
|
||||
if_etherbpfmtap(if_t ifp, struct mbuf *m)
|
||||
{
|
||||
ETHER_BPF_MTAP(ifp, m);
|
||||
}
|
||||
|
||||
void
|
||||
if_vlancap(if_t ifp)
|
||||
{
|
||||
|
|
|
@ -629,8 +629,6 @@ int if_vlantrunkinuse(if_t ifp);
|
|||
caddr_t if_getlladdr(const if_t ifp);
|
||||
struct vnet *if_getvnet(const if_t ifp);
|
||||
void *if_gethandle(u_char);
|
||||
void if_bpfmtap(if_t ifp, struct mbuf *m);
|
||||
void if_etherbpfmtap(if_t ifp, struct mbuf *m);
|
||||
void if_vlancap(if_t ifp);
|
||||
int if_transmit(if_t ifp, struct mbuf *m);
|
||||
void if_init(if_t ifp, void *ctx);
|
||||
|
|
Loading…
Reference in a new issue