diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-05-06 23:33:41 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2010-05-06 23:33:41 +0000 |
commit | 3024175b303910a620af9fe66fe012bca61d9900 (patch) | |
tree | 1aa042d94c1c2c65a70a49ca2e83874522296849 /capture_opts.c | |
parent | cf13c471b3838fbff8a6a7194d9c03c01f73f0eb (diff) |
Just check for pcap_create(); it first appeared in libpcap 1.0.0, and
pcap_set_buffer_size() did as well, so there aren't any libpcap releases
with pcap_create() but not pcap_set_buffer_size().
Only do one check for pcap_create.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32695 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_opts.c')
-rw-r--r-- | capture_opts.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/capture_opts.c b/capture_opts.c index 48d1f37335..d060810234 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 -#if defined(_WIN32) || defined(HAVE_PCAP_SET_BUFFER_SIZE) +#if defined(_WIN32) || defined(HAVE_PCAP_CREATE) 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 -#if defined(_WIN32) || defined(HAVE_PCAP_SET_BUFFER_SIZE) +#if defined(_WIN32) || defined(HAVE_PCAP_CREATE) 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; -#if defined(_WIN32) || defined(HAVE_PCAP_SET_BUFFER_SIZE) +#if defined(_WIN32) || defined(HAVE_PCAP_CREATE) case 'B': /* Buffer size */ capture_opts->buffer_size = get_positive_int(optarg_str_p, "buffer size"); break; |