diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-10-10 21:13:21 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2003-10-10 21:13:21 +0000 |
commit | 496c9e471dc23dfefdb58739197e6c66dbdd5ad4 (patch) | |
tree | b1a9d1d119f7c3cd727cee983123d1b0cc838f68 /tethereal.c | |
parent | 158e46294067cd65f506df485c68862b4d85504d (diff) |
Not all versions of libpcap have "pcap_compile_nopcap()"; use it only if
we have it.
Not all versions of libpcap have DLT_LINUX_SLL, either; use DLT_EN10MB
instead.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8670 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'tethereal.c')
-rw-r--r-- | tethereal.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tethereal.c b/tethereal.c index 1d42835bea..9a432c8674 100644 --- a/tethereal.c +++ b/tethereal.c @@ -1,6 +1,6 @@ /* tethereal.c * - * $Id: tethereal.c,v 1.201 2003/10/10 13:33:49 jmayer Exp $ + * $Id: tethereal.c,v 1.202 2003/10/10 21:13:21 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -793,6 +793,8 @@ main(int argc, char *argv[]) gchar *cf_name = NULL, *rfilter = NULL; #ifdef HAVE_LIBPCAP gchar *if_text; +#endif +#ifdef HAVE_PCAP_COMPILE_NOPCAP struct bpf_program fcode; #endif dfilter_t *rfcode = NULL; @@ -1340,10 +1342,10 @@ main(int argc, char *argv[]) if (!dfilter_compile(rfilter, &rfcode)) { fprintf(stderr, "tethereal: %s\n", dfilter_error_msg); epan_cleanup(); -#ifdef HAVE_LIBPCAP - if (pcap_compile_nopcap(DLT_LINUX_SLL,0, &fcode, rfilter, 0, 0) != -1) { +#ifdef HAVE_PCAP_COMPILE_NOPCAP + if (pcap_compile_nopcap(DLT_EN10MB, 0, &fcode, rfilter, 0, 0) != -1) { fprintf(stderr, - " Note: This display filter code looks like a valid capture filter,\n" + " Note: This display filter code looks like a valid capture filter;\n" " maybe you mixed them up?\n"); } #endif |