diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-10-10 21:13:21 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-10-10 21:13:21 +0000 |
commit | a3d8b3481f86d4997133352c44e17924f220d02f (patch) | |
tree | b1a9d1d119f7c3cd727cee983123d1b0cc838f68 /tethereal.c | |
parent | 2699b77d84c0c9787f0e0a3fdf43155e3016b468 (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.
svn path=/trunk/; revision=8670
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 |