From 571dbab7a130da08db863a3dc97cc3bad9fcb726 Mon Sep 17 00:00:00 2001 From: etxrab Date: Thu, 6 May 2010 18:34:30 +0000 Subject: 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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32688 f5534014-38df-0310-8fa8-9805f1628bb7 --- tshark.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'tshark.c') diff --git a/tshark.c b/tshark.c index 2350cca994..6015f9c55f 100644 --- a/tshark.c +++ b/tshark.c @@ -232,7 +232,7 @@ print_usage(gboolean print_ver) fprintf(output, " -f packet filter in libpcap filter syntax\n"); fprintf(output, " -s packet snapshot length (def: 65535)\n"); fprintf(output, " -p don't capture in promiscuous mode\n"); -#ifdef _WIN32 +#if defined(_WIN32) || defined(HAVE_PCAP_SET_BUFFER_SIZE) fprintf(output, " -B size of kernel buffer (def: 1MB)\n"); #endif fprintf(output, " -y link layer type (def: first appropriate)\n"); @@ -769,16 +769,16 @@ main(int argc, char *argv[]) #define OPTSTRING_INIT "a:b:c:C:d:De:E:f:F:G:hi:K:lLnN:o:pPqr:R:s:St:T:u:vVw:xX:y:z:" #ifdef HAVE_LIBPCAP -#ifdef _WIN32 -#define OPTSTRING_WIN32 "B:" +#if defined(_WIN32) || defined(HAVE_PCAP_SET_BUFFER_SIZE) +#define OPTSTRING_EXTRA "B:" #else -#define OPTSTRING_WIN32 "" -#endif /* _WIN32 */ +#define OPTSTRING_EXTRA "" +#endif /* _WIN32 or HAVE_PCAP_SET_BUFFER_SIZE */ #else -#define OPTSTRING_WIN32 "" +#define OPTSTRING_EXTRA "" #endif /* HAVE_LIBPCAP */ - static const char optstring[] = OPTSTRING_INIT OPTSTRING_WIN32; + static const char optstring[] = OPTSTRING_INIT OPTSTRING_EXTRA; /* * Get credential information for later use. @@ -1003,9 +1003,9 @@ main(int argc, char *argv[]) case 's': /* Set the snapshot (capture) length */ case 'w': /* Write to capture file x */ case 'y': /* Set the pcap data link type */ -#ifdef _WIN32 +#if defined(_WIN32) || defined(HAVE_PCAP_SET_BUFFER_SIZE) case 'B': /* Buffer size */ -#endif /* _WIN32 */ +#endif /* _WIN32 or HAVE_PCAP_SET_BUFFER_SIZE */ #ifdef HAVE_LIBPCAP status = capture_opts_add_opt(&global_capture_opts, opt, optarg, &start_capture); if(status != 0) { -- cgit v1.2.3