Date: Fri, 27 Jul 2001 10:55:49 +0200 From: Marco Molteni <molter@tin.it> To: freebsd-hackers@freebsd.org Subject: how to share include files between kernel and userland? Message-ID: <20010727105549.A4331@cobweb.example.org>
next in thread | raw e-mail | index | archive | help
Hi, 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. Thanks Marco To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010727105549.A4331>