Modifying Bro for NetBSD

FYI, the changes in the attached diff were necessary to get Bro 0.9a4a to compile on a NetBSD 2.0_RC4 (x86) installation.

Sean

bro-pub-0.9a4a.diff (795 Bytes)

Sean,

Your patch deals mainly with NetBSD addition of an
(extra) error parameter in libpcap's pcap_compile_nopcap().
I submitted a patch to detect this some time ago:

http://mailman.icsi.berkeley.edu/pipermail/bro/2003-December/001364.html

[BTW, and off-topic, would it be possible to anonymize
email addresses in the mailing list?]

Unfortunately, I didn't have a NetBSD box to test it,
and it seems it may not be working properly.

On the other hand, your patch seems to add even a
new extra parameter. I checked NetBSD 2.0, and the
function API is:

[ ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-release-2-0/src/lib/libpcap/gencode.c ]

pcap_compile_nopcap(int snaplen_arg, int linktype_arg,
             struct bpf_program *program,
       char *buf, int optimize, bpf_u_int32 mask, char *errbuf)

I.e., just the error buffer parameter. This seems incoherent
with your patch.

Can you please send me your pcap.h file? It should be
located at /usr/include/pcap.h, or maybe /usr/include/[lib]pcap/pcap.h

Last, is there any NetBSD machine I can have access to?

-Chema

Chema,

I attached the /usr/include/pcap.h file. Offhand, the arguments appear to be the same as the ones I changed the Bro files to require. Are you sure they're incongruent?

Unfortunately, I don't have a NetBSD machine to give you access to right at the moment, but I could probably get one up next week if nobody else on the list can help. It'll even run on your toaster, in case you have time to try. :slight_smile:

Sean

pcap.h (5.05 KB)