Subject: Re: adding an 802.11 data link type
To: None <>
From: Atsushi Onoe <>
List: tech-net
Date: 08/08/2002 10:19:11
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii

> So if I understand your code right, (ic->ic_rawbpf) is a necessary but not
> sufficient condition to hand the packet off to bpf_mtap. The bpf system
> would have had to ask for that packet type too. So something like:
> if ((ic->ic_rawbpf) && (ic->ic_raw_bpfcount))
> 	bpf_mtap(ic->ic_rawbpf, m0);

Please note that this interface is very similar to existing bpf hook.
So the value of ic->ic_rawbpf remains NULL unless someone issues BPFSETIF
and BIOCSDLT, and recovered to NULL when the bpf listener closes bpf.
The number of opening listeners are counted in bpf itself.

Atsushi Onoe