diff options
author | Guy Harris <guy@alum.mit.edu> | 2013-04-12 10:58:08 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2013-04-12 10:58:08 -0700 |
commit | de111152d951bee96deb6ac608b812937db9c433 (patch) | |
tree | 831c21e88f448121702da301453e5aad17c038b2 /pcap-dbus.c | |
parent | c58572138aef5bce693db0f77ccaf4c5a566376d (diff) |
Add a pcap-dbus.h header and include it in pcap-dbus.c and pcap.c.
That way, we ensure that the same function prototypes are seen when
dbus_create() and dbus_findalldevs() are defined and when they're used.
Also, add pcap-dbus.c to the list of "extra" files in Makefile.in, so it
goes into the release tarball.
Diffstat (limited to 'pcap-dbus.c')
-rw-r--r-- | pcap-dbus.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pcap-dbus.c b/pcap-dbus.c index 91b6102f..b6679e43 100644 --- a/pcap-dbus.c +++ b/pcap-dbus.c @@ -32,8 +32,6 @@ #include "config.h" #endif -#include "pcap-int.h" - #include <string.h> #include <time.h> @@ -41,6 +39,9 @@ #include <dbus/dbus.h> +#include "pcap-dbus.h" +#include "pcap-int.h" + static int dbus_read(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user) { @@ -81,9 +82,10 @@ dbus_read(pcap_t *handle, int max_packets, pcap_handler callback, u_char *user) /* pkth.caplen = min (payload_len, handle->snapshot); */ gettimeofday(&pkth.ts, NULL); - if (handle->fcode.bf_insns == NULL || bpf_filter(handle->fcode.bf_insns, raw_msg, pkth.len, pkth.caplen)) { + if (handle->fcode.bf_insns == NULL || + bpf_filter(handle->fcode.bf_insns, (u_char *)raw_msg, pkth.len, pkth.caplen)) { handle->md.packets_read++; - callback(user, &pkth, raw_msg); + callback(user, &pkth, (u_char *)raw_msg); count++; } |