Subject: Re: [tcpdump-workers] fddipad on NetBSD
To: None <tcpdump-workers@lists.tcpdump.org>
From: Guy Harris <guy@alum.mit.edu>
List: tech-net
Date: 04/06/2005 19:38:46
Michael Richardson wrote:

> I'd like to make sure that libpcap 0.9.1-096 compiles on NetBSD 1.6.
> 
> It appears that the test for fddipad says defined(__NetBSD__),
> but that member must have been introduced in a post-1.6 version of
> NetBSD.

Actually, the problem appears to be that PCAP_FDDIPAD is defined in 
pcap-int.h *after* it's used, so that the fddipad member isn't #defined 
into the pcap structure even if PCAP_FDDIPAD is later #defined.  It 
should be moved up to be defined before "struct pcap" is defined; I've 
checked in a change to do that.

If all versions of NetBSD put those 3 bytes of padding into FDDI packets 
supplied to BPF, then the definition of PCAP_FDDIPAD shouldn't be based 
on the NetBSD version - and if not all of them do, a run-time test using 
the result of "uname()" should be done.

Perhaps a post-1.6 version happened to define PCAP_FDDIPAD elsewhere (or 
perhaps the code didn't even compile on those versions - did you try it 
on 2.0, for example?).