rev bpf attach/detach event api to include the dlt

This commit is contained in:
Sam Leffler 2009-05-25 16:34:35 +00:00
parent bcdaa85069
commit 5ce8d9708c
2 changed files with 4 additions and 3 deletions

View file

@ -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.

View file

@ -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);
/*