mirror of
https://github.com/opnsense/src.git
synced 2026-04-15 14:29:58 -04:00
rev bpf attach/detach event api to include the dlt
This commit is contained in:
parent
bcdaa85069
commit
5ce8d9708c
2 changed files with 4 additions and 3 deletions
|
|
@ -535,7 +535,7 @@ bpf_attachd(struct bpf_d *d, struct bpf_if *bp)
|
|||
bpf_bpfd_cnt++;
|
||||
BPFIF_UNLOCK(bp);
|
||||
|
||||
EVENTHANDLER_INVOKE(bpf_track, bp->bif_ifp, 1);
|
||||
EVENTHANDLER_INVOKE(bpf_track, bp->bif_ifp, bp->bif_dlt, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -563,7 +563,7 @@ bpf_detachd(struct bpf_d *d)
|
|||
BPFD_UNLOCK(d);
|
||||
BPFIF_UNLOCK(bp);
|
||||
|
||||
EVENTHANDLER_INVOKE(bpf_track, ifp, 0);
|
||||
EVENTHANDLER_INVOKE(bpf_track, ifp, bp->bif_dlt, 0);
|
||||
|
||||
/*
|
||||
* Check if this descriptor had requested promiscuous mode.
|
||||
|
|
|
|||
|
|
@ -184,7 +184,8 @@ EVENTHANDLER_DECLARE(vlan_unconfig, vlan_unconfig_fn);
|
|||
|
||||
/* BPF attach/detach events */
|
||||
struct ifnet;
|
||||
typedef void (*bpf_track_fn)(void *, struct ifnet *, int /* 1 =>'s attach */);
|
||||
typedef void (*bpf_track_fn)(void *, struct ifnet *, int /* dlt */,
|
||||
int /* 1 =>'s attach */);
|
||||
EVENTHANDLER_DECLARE(bpf_track, bpf_track_fn);
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue