Subject: Re: adding an 802.11 data link type
To: Atsushi Onoe <>
From: Bill Studenmund <>
List: tech-net
Date: 08/07/2002 18:38:54
On Thu, 8 Aug 2002, Atsushi Onoe wrote:

> > Since BPF gives the driver an opaque hook into the interface, if_bpf, there's
> > no need to change that part of the driver interface.  What you really want
> > are additional bpf calls,
> >
> >          bpf_tap2(caddr_t if_bpf, caddr_t ptr, size_t len, int flags)
> >          bpf_mtap2(caddr_t if_bpf, struct mbuf *m0, int flags)
> >
> > We will define flags so the bottom 16 bits are reserved for passing an
> > optional DLT type. Then if you need special processing, you can just do
> >          bpf_map2(ifp->if_bpf, m0, DLT_IEEE80211B | DLF_RX);
> This interface will introduce the exact problem which Bill pointed out.
> How the driver reduces to pass the packet to bpf.
> Since if_bpf is an opaque, the driver should call twice or three times to
> pass the packet to bpf if the bpf listenr just want to DLT_EN10MB.

That's why the BPF layer calls the driver and tells it which packet types
it wants.

Actually there probably will be 4 potential calls, one for 802.3, one for
802.11, one for 802.11 + common power values (I think this format has been
made, not sure), and one for the driver's own format.

Take care,