On Fri, Jul 27, 2001 at 10:55:49AM +0200, Marco Molteni wrote:
> I am writing a program to parse frames dumped to bpf by an, the
> aironet driver.
>
> I am using the latest patches by Doug Ambrisko, that allow the driver
> to dump not only the 802.11 frame but also the special Aironet header
> that the device prepends to the 802.11 frame, ie:
>
> aironet header | 802.11 frame
>
> Now, to my question with include files. The struct that describes the
> aironet header, an_rxframe, is in an/if_anreg.h, so I included
> if_anreg.h in my program. Among other things, if_anreg.h needs the
> definition of struct arpcom, which is in net/if_arp.h. Good, I
> included also net/if_arp.h, but the compiler still complained. It
> turns out that the definition of struct arpcom is guarded by
> #ifdef _KERNEL.
>
> So, what should I do? Define _KERNEL in my program, or copy the
> definition of struct an_rxframe directly in my C file? I hoped to find
> a third, more elegant solution.
First, apply the patches in PR 29210 if you haven't already (now that
I think of it, they are probably in Doug's mega patch.) This removes
all duplicate structures. Next, move an_rxframe to if_aironet_ieee.h
so it's in the userland include file. The kernel now uses both of them
so that should be the best answer.
-- Brooks
--
Any statement of the form "X is the one, true Y" is FALSE.
PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4
PGP signature