aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2010-05-06 18:34:30 +0000
committerAnders Broman <anders.broman@ericsson.com>2010-05-06 18:34:30 +0000
commitf9981411f1bab7593b451e37a5815e21334ac5b5 (patch)
tree6662172c875b789af5b1fa447b6fb621db42188b /capture_opts.c
parentc911b0101bccc57ccb12e0f158aa397fe3859756 (diff)
Checking in Stigs changes from
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=475 BUT not activating the check for pcap_create() pcap_set_buffer_size() This should make it possible to build with support for setting the buffersize if not capturing 802.11 traffic. The code for handling the 'B' option should be OK in any case. svn path=/trunk/; revision=32688
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/capture_opts.c b/capture_opts.c
index 657c91f41b..48d1f37335 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -97,7 +97,7 @@ capture_opts_init(capture_options *capture_opts, void *cf)
capture_opts->sampling_param = 0;
#endif
#endif
-#ifdef _WIN32
+#if defined(_WIN32) || defined(HAVE_PCAP_SET_BUFFER_SIZE)
capture_opts->buffer_size = 1; /* 1 MB */
#endif
capture_opts->has_snaplen = FALSE;
@@ -173,7 +173,7 @@ capture_opts_log(const char *log_domain, GLogLevelFlags log_level, capture_optio
g_log(log_domain, log_level, "No capture RPCAP : %u", capture_opts->nocap_rpcap);
g_log(log_domain, log_level, "No capture local : %u", capture_opts->nocap_local);
#endif
-#ifdef _WIN32
+#if defined(_WIN32) || defined(HAVE_PCAP_SET_BUFFER_SIZE)
g_log(log_domain, log_level, "BufferSize : %u (MB)", capture_opts->buffer_size);
#endif
g_log(log_domain, log_level, "SnapLen (%u): %u", capture_opts->has_snaplen, capture_opts->snaplen);
@@ -464,7 +464,7 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_
return 1;
}
break;
-#ifdef _WIN32
+#if defined(_WIN32) || defined(HAVE_PCAP_SET_BUFFER_SIZE)
case 'B': /* Buffer size */
capture_opts->buffer_size = get_positive_int(optarg_str_p, "buffer size");
break;