Add pcap_compile_nopcap(); [Not tested]
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 2 Oct 2010 16:27:55 +0000 (16:27 +0000)
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 2 Oct 2010 16:27:55 +0000 (16:27 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@34336 f5534014-38df-0310-8fa8-9805f1628bb7

capture-wpcap.c

index 2cda3251365e58e83d4c37e9ea0b16244f6b92c7..f1d0cf06d66c8901cc1b13612ffc0598385a4f04 100644 (file)
@@ -63,6 +63,8 @@ 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 *, const char *, int,
                        bpf_u_int32);
+static int     (*p_pcap_compile_nopcap) (int, int, struct bpf_program *, const char *, int,
+                       bpf_u_int32);
 static int     (*p_pcap_lookupnet) (const char *, bpf_u_int32 *, bpf_u_int32 *,
                        char *);
 static pcap_t* (*p_pcap_open_live) (const char *, int, int, int, char *);
@@ -134,6 +136,7 @@ load_wpcap(void)
                SYM(pcap_setfilter, FALSE),
                SYM(pcap_geterr, FALSE),
                SYM(pcap_compile, FALSE),
+                SYM(pcap_compile_nopcap, FALSE),
                SYM(pcap_lookupnet, FALSE),
 #ifdef HAVE_PCAP_REMOTE
                SYM(pcap_open, FALSE),
@@ -289,6 +292,14 @@ pcap_compile(pcap_t *a, struct bpf_program *b, const char *c, int d,
        return p_pcap_compile(a, b, c, d, e);
 }
 
+int
+pcap_compile_nopcap(int a, int b, struct bpf_program *c, const char *d, int e,
+            bpf_u_int32 f)
+{
+       g_assert(has_wpcap);
+       return p_pcap_compile_nopcap(a, b, c, d, e, f);
+}
+
 int
 pcap_lookupnet(const char *a, bpf_u_int32 *b, bpf_u_int32 *c, char *d)
 {