Wireshark

  • Riverbed Technology
  • WinPcap
SHARKFEST '13 - Wireshark Developer and User Conference - June 16-19, 2013 - UC Berkeley
  • Wireshark
    • About
    • Download
    • Blog
  • Get Help
    • Ask a Question
    • FAQs
    • Documentation
    • Mailing Lists
    • Online Tools
    • Wiki
    • Bug Tracker
  • Develop
    • Get Involved
    • Developer's Guide
    • Browse the Code
    • Latest Builds

Wireshark-dev: [Wireshark-dev] [Patch] capture-wpcap.c

Date Index Thread Index Other Months All Mailing Lists
Date Prev Date Next Thread Prev Thread Next


From: Gisle Vanem <gvanem@xxxxxxxxxxxx>
Date: Sat, 28 Jul 2007 16:41:01 +0200

This file fails to compile with the latest libpcap since
pcap_compile() now takes a 'const char *' as the filter-string.
AFAICS an easy fix is to use WPCAP_CONSTIFIED. Patch attached.

--gv
--- SVN-Latest/capture-wpcap.c	Mon Jan 22 23:20:35 2007
+++ capture-wpcap.c	Sat Jul 28 16:34:35 2007
@@ -62,7 +62,7 @@
static int     (*p_pcap_datalink) (pcap_t *);
static int     (*p_pcap_setfilter) (pcap_t *, struct bpf_program *);
static char*   (*p_pcap_geterr) (pcap_t *);
-static int     (*p_pcap_compile) (pcap_t *, struct bpf_program *, char *, int,
+static int     (*p_pcap_compile) (pcap_t *, struct bpf_program *, const char *, int,
			bpf_u_int32);
#ifdef WPCAP_CONSTIFIED
static int     (*p_pcap_lookupnet) (const char *, bpf_u_int32 *, bpf_u_int32 *,
@@ -232,7 +232,11 @@
}

int
+#ifdef WPCAP_CONSTIFIED
+pcap_compile(pcap_t *a, struct bpf_program *b, const char *c, int d,
+#else
pcap_compile(pcap_t *a, struct bpf_program *b, char *c, int d,
+#endif
            bpf_u_int32 e)
{
	g_assert(has_wpcap);
  • Prev by Date: Re: [Wireshark-dev] Wierd code in m2m plugin
  • Next by Date: [Wireshark-dev] Registering ICMP dissector
  • Previous by thread: Re: [Wireshark-dev] ../../epan/dissectors/packet-per.h:37: error: expected declaration specifiers or '...' before 'asn1_ctx_t'
  • Next by thread: [Wireshark-dev] Registering ICMP dissector
  • Index(es):
    • Date
    • Thread

Wireshark and the "fin" logo are registered trademarks of the Wireshark Foundation