#include "config.h"
#endif
-#include "pcap-int.h"
-
#include <string.h>
#include <time.h>
#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)
{
/* 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++;
}
--- /dev/null
+pcap_t *dbus_create(const char *, char *, int *);
+int dbus_findalldevs(pcap_if_t **devlistp, char *errbuf);
#endif
#ifdef PCAP_SUPPORT_DBUS
-int dbus_findalldevs(pcap_if_t **alldevsp, char *err_str);
-pcap_t *dbus_create(const char *device, char *ebuf, int *is_ours);
+#include "pcap-dbus.h"
#endif
int