tcpdump mailing list archives

Re: D_IN vs PCAP_D_IN


From: "Aaron Turner" <synfinatic () gmail com>
Date: Mon, 27 Feb 2006 22:49:16 -0800

On 2/27/06, dean gaudet <dean-list-tcpdump-workers () arctic org> wrote:
On Mon, 27 Feb 2006, Aaron Turner wrote:

Well looks like sometime in libpcap 0.9.x, pcap.h changed the enum for
direction_t to pcap_direction_t and the enumerated types within.
While I can understand the reason of the change, it's driving me nuts
since there doesn't seem to be an easy way to handle this gracefully.

heh that's sort of my fault 'cause i pointed it out right after the first
release with those "unprotected" symbols... but istr there was another
release almost immediately to fix build problems on NT?  can't you just
require the most recent?

Not using NT, this is *nix.  Requiring the most recent while ideal,
just isn't realistic right now.

Since I don't use autoconf for this project, anyone have a way of
detecting what version of pcap.h is there?  Simple things like:

#ifndef D_IN
#define D_IN PCAP_D_IN
#endif

you could #define D_IN PCAP_D_IN and so forth before #including the
tcpdump headers... then you can always use PCAP_D_IN.

Unless I'm missing something obvious, that wouldn't work since
PCAP_D_IN wouldn't be defined before or after #include <pcap.h> for
older versions of libpcap.


--
Aaron Turner
http://synfin.net/
-
This is the tcpdump-workers list.
Visit https://lists.sandelman.ca/ to unsubscribe.


Current thread: