tcpdump mailing list archives

Re: libpcap-1.0.0 on amd64


From: Guy Harris <guy () alum mit edu>
Date: Sat, 14 Feb 2009 14:17:20 -0800


On Feb 8, 2009, at 10:13 AM, Marc Weber wrote:

I've had some type missmatch errors caused by int != pcap_t on amd64
The following patch makes it compile.

Unfortunately, it also falsely claims that pcap_activate() returns a pcap_t *, which it doesn't. It does in pcap-null.c, but that's a bug - pcap-null.c wasn't converted to the final style, wherein each pcap- xxx.c supplies its own create routine, and, if it has an activate function (which all but pcap-null.c must have), sets the activate_op pointer in the pcap_t to point to that function. pcap_activate() calls that function and returns its "int" return value.

However I've had another problem:

I couldn't compile wireshark because of
 In function `pcap_open_live':
 undefined reference to `pcap_create'

which finally helped me finding out that I was compiling pcap-null.c.

On what OS are you compiling this? The configure script should discover the right capture mechanism to use on most major UN*Xes and not fall back on pcap-null.c.

Anyway I'm not sure wether the null interface should be compatible to
the other backends so maybe there is a function missing as well?

Yes, there's a function missing. That's part of the same bug - I've checked in a change to pcap-null.c to fix that.

Anyway I believe most people do compile libpcap because they want
package capture so I'd even suggest allowing the -null interface only on
explicit user request failing otherwise or tracing a message to stderr
(?)

That might be useful.
-
This is the tcpdump-workers list.
Visit https://cod.sandelman.ca/ to unsubscribe.


Current thread: