diff options
author | Dario Lombardo <lomato@gmail.com> | 2017-12-11 11:29:07 +0100 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2017-12-11 16:49:20 +0000 |
commit | 51300b3c834a3877d567fb57ae78ec74ec8ba80d (patch) | |
tree | ab9b81f4e235bf054ac9a4db799753f48d5fcbca /capture_opts.c | |
parent | c9546dfceb778dcabe7a830272add62e6ae1403e (diff) |
fix compilation without pcap.
Fix a regression introduced by I09beab751c9c2917f017b6c082166d86ca693544.
Change-Id: I57b971086470e836f4147500143c35494118e754
Reviewed-on: https://code.wireshark.org/review/24765
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'capture_opts.c')
-rw-r--r-- | capture_opts.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/capture_opts.c b/capture_opts.c index f7eb768082..9e6991cc40 100644 --- a/capture_opts.c +++ b/capture_opts.c @@ -13,6 +13,10 @@ #include <stdio.h> #include <stdlib.h> +#if defined(HAVE_LIBPCAP) || defined(HAVE_EXTCAP) +#include "capture_opts.h" +#endif + #ifdef HAVE_LIBPCAP #include <string.h> @@ -21,7 +25,6 @@ #include <glib.h> -#include "capture_opts.h" #include "ringbuffer.h" #include <wsutil/clopts_common.h> @@ -34,8 +37,9 @@ #include "ui/filter_files.h" static gboolean capture_opts_output_to_pipe(const char *save_file, gboolean *is_pipe); +#endif - +#if defined(HAVE_LIBPCAP) || defined(HAVE_EXTCAP) void capture_opts_init(capture_options *capture_opts) { @@ -46,7 +50,9 @@ capture_opts_init(capture_options *capture_opts) capture_opts->default_options.descr = NULL; capture_opts->default_options.cfilter = NULL; capture_opts->default_options.has_snaplen = FALSE; +#ifdef HAVE_LIBPCAP capture_opts->default_options.snaplen = WTAP_MAX_PACKET_SIZE_STANDARD; +#endif capture_opts->default_options.linktype = -1; /* use interface default */ capture_opts->default_options.promisc_mode = TRUE; capture_opts->default_options.if_type = IF_WIRED; @@ -103,8 +109,9 @@ capture_opts_init(capture_options *capture_opts) capture_opts->has_file_interval = FALSE; capture_opts->file_interval = 60; /* 1 min */ capture_opts->has_ring_num_files = FALSE; +#ifdef HAVE_LIBPCAP capture_opts->ring_num_files = RINGBUFFER_MIN_NUM_FILES; - +#endif capture_opts->has_autostop_files = FALSE; capture_opts->autostop_files = 1; capture_opts->has_autostop_packets = FALSE; @@ -118,7 +125,9 @@ capture_opts_init(capture_options *capture_opts) capture_opts->output_to_pipe = FALSE; capture_opts->capture_child = FALSE; } +#endif +#ifdef HAVE_LIBPCAP void capture_opts_cleanup(capture_options *capture_opts) { |