tcpdump mailing list archives

libpcap-1.0.0 on amd64


From: Marc Weber <marco-oweber () gmx de>
Date: Sun, 8 Feb 2009 19:13:01 +0100

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

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.
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?

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
(?)

Sincerly
Marc Weber

======== patch ==============================
diff --git a/pcap.c b/pcap.c
index 010ef74..0bfb191 100644
--- a/pcap.c
+++ b/pcap.c
@@ -211,7 +211,7 @@ pcap_set_buffer_size(pcap_t *p, int buffer_size)
        return 0;
 }
 
-int
+pcap_t *
 pcap_activate(pcap_t *p)
 {
        int status;
diff --git a/pcap/pcap.h b/pcap/pcap.h
index ea18edc..3910a2d 100644
--- a/pcap/pcap.h
+++ b/pcap/pcap.h
@@ -263,7 +263,7 @@ int pcap_can_set_rfmon(pcap_t *);
 int    pcap_set_rfmon(pcap_t *, int);
 int    pcap_set_timeout(pcap_t *, int);
 int    pcap_set_buffer_size(pcap_t *, int);
-int    pcap_activate(pcap_t *);
+pcap_t *pcap_activate(pcap_t *);
 
 pcap_t *pcap_open_live(const char *, int, int, int, char *);
 pcap_t *pcap_open_dead(int, int);

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


Current thread: