tcpdump mailing list archives

Re: tcpdump 4.0.0rc3 and libpcap 1.0.0rc3 now available


From: Guy Harris <guy () alum mit edu>
Date: Mon, 27 Oct 2008 18:57:19 -0700


On Oct 27, 2008, at 6:28 PM, Michael Richardson wrote:

I tried building the library before signing it:

marajade-[Misc/tcpdump/4.0/libpcap-1.0.0] mcr 1039 %make
gcc -O2 -fPIC -I. -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" - c ./pcap-linux.c
./pcap-linux.c: In function 'pcap_read_packet':
./pcap-linux.c:653: error: invalid application of 'sizeof' to incomplete type 'struct tpacket_auxdata'

Sigh. More of the Perils Of Writing Code For the Latest Shiniest Version Of {fill in your OS} And Not Carefully Conditionalizing The Use Of Features That Might Not Be In Every Relevant Release Of That OS; it was assuming your Linux had the tpacket_auxdata structure, but apparently it doesn't.

(What kernel version does your machine have? My test (virtual) machines might have newer kernels; at least one of them has that structure but doesn't have a tp_vlan_tci member in it, so I had to fix *that*, but I guess none of them lack the structure entirely.)

I've checked in a change that should fix that (by reverting to the old code if the kernel lacks that structure or lacks a tp_vlan_tci member in that structure); see whether it compiles now. (If not, I won't be able to address it immediately, but should be able to get to it later tonight.)
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: