aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-05-06 23:33:41 +0000
committerGuy Harris <guy@alum.mit.edu>2010-05-06 23:33:41 +0000
commit7dbbb8c57285cfffcb87a38c73ce1c4f8146b0c1 (patch)
tree1aa042d94c1c2c65a70a49ca2e83874522296849 /capture_opts.c
parent6ee96dc4a444e76650b4fcd87d4ba5e4b44778a4 (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. svn path=/trunk/; revision=32695
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 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;