diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-03-24 20:22:00 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-03-25 03:22:33 +0000 |
commit | 083f6b6e6dcd97aaf0553d0cfdd0b8a5fd2e6339 (patch) | |
tree | 50bf2bb41032be6ac8f73f6c6d02a66408027f51 /capture_opts.h | |
parent | 493ddd5963b2a4f95897f8fa5100277a0973834d (diff) | |
download | wireshark-083f6b6e6dcd97aaf0553d0cfdd0b8a5fd2e6339.tar.gz |
Have a #define for whether the capture buffer size can be set.
It can be set if either 1) this is Windows (where we're assumed to be
using WinPcap, which includes calls to set the buffer size) or 2) we
have pcap_create() (in which case we also have pcap_set_buffer_size(),
at least in a normal libpcap release).
Use that rather than testing "defined(_WIN32) ||
defined(HAVE_PCAP_CREATE)"; that makes it a bit more obvious what's
being tested.
Change-Id: Id9f8455019d19206b04dd6820a748cb97ae5ad12
Reviewed-on: https://code.wireshark.org/review/7816
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'capture_opts.h')
-rw-r--r-- | capture_opts.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/capture_opts.h b/capture_opts.h index 5eb928e400..4ace0bf974 100644 --- a/capture_opts.h +++ b/capture_opts.h @@ -74,7 +74,7 @@ extern "C" { #define OPTSTRING_A "" #endif -#if defined(_WIN32) || defined(HAVE_PCAP_CREATE) +#ifdef CAN_SET_CAPTURE_BUFFER_SIZE #define LONGOPT_BUFFER_SIZE \ {(char *)"buffer-size", required_argument, NULL, 'B'}, #define OPTSTRING_B "B:" @@ -179,7 +179,7 @@ typedef struct interface_tag { gboolean has_snaplen; int snaplen; gboolean local; -#if defined(_WIN32) || defined(HAVE_PCAP_CREATE) +#ifdef CAN_SET_CAPTURE_BUFFER_SIZE gint buffer; #endif #ifdef HAVE_PCAP_CREATE @@ -229,7 +229,7 @@ typedef struct interface_options_tag { GPid extcap_pid; /* pid of running process or INVALID_EXTCAP_PID */ guint extcap_child_watch; #endif -#if defined(_WIN32) || defined(HAVE_PCAP_CREATE) +#ifdef CAN_SET_CAPTURE_BUFFER_SIZE int buffer_size; #endif gboolean monitor_mode; |