diff options
author | Peter Wu <peter@lekensteyn.nl> | 2020-04-06 00:16:34 +0200 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2020-04-06 01:29:37 +0000 |
commit | ef717da61a7a12023d89dc9891dee540b156da69 (patch) | |
tree | a3af6c706f45bfa7a79d7e3b3d9fdd4295f5154f | |
parent | 55d3d322394488b5b62d5c4445ed8f6fa071f09a (diff) |
CMake: remove ENABLE_PCAP_NG_DEFAULT option
pcapng has been the compile-time default since 2011. If there are any
users who would like to use the libpcap format, then they should use
runtime options instead (e.g. `tshark -P` or `editcap -F pcap`).
Change-Id: I54b70368cdc3ca78bc8617bc488cc687740a1eb9
Reviewed-on: https://code.wireshark.org/review/36721
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <gharris@sonic.net>
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | CMakeOptions.txt | 1 | ||||
-rw-r--r-- | capture_opts.c | 4 | ||||
-rw-r--r-- | cmakeconfig.h.in | 3 | ||||
-rw-r--r-- | editcap.c | 8 | ||||
-rw-r--r-- | epan/prefs.c | 4 | ||||
-rw-r--r-- | mergecap.c | 8 | ||||
-rw-r--r-- | tshark.c | 12 |
8 files changed, 0 insertions, 44 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 94ad63db66..559a1522dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1509,10 +1509,6 @@ foreach(_plugin_src_dir ${PLUGIN_SRC_DIRS}) add_subdirectory( ${_plugin_src_dir} ) endforeach() -if(ENABLE_PCAP_NG_DEFAULT) - set(PCAP_NG_DEFAULT 1) -endif() - # Large file support (e.g. make off_t 64 bit if supported) include(gmxTestLargeFiles) gmx_test_large_files(GMX_LARGEFILES) diff --git a/CMakeOptions.txt b/CMakeOptions.txt index cc5eb9d52d..f28ed69bb4 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -62,7 +62,6 @@ option(ENABLE_STATIC "Build Wireshark libraries statically" OFF) option(USE_STATIC "Always link statically with external libraries" OFF) option(ENABLE_PLUGINS "Build with plugins" ON) option(ENABLE_PLUGIN_IFDEMO "Build with plugin interface demo" OFF) -option(ENABLE_PCAP_NG_DEFAULT "Enable pcapng as default file format" ON) option(ENABLE_ZLIB "Build with zlib compression support" ON) option(ENABLE_MINIZIP "Build with zip file compression support" ON) diff --git a/capture_opts.c b/capture_opts.c index 2cc9fc6be8..8e69b1679d 100644 --- a/capture_opts.c +++ b/capture_opts.c @@ -88,11 +88,7 @@ capture_opts_init(capture_options *capture_opts) capture_opts->saving_to_file = FALSE; capture_opts->save_file = NULL; capture_opts->group_read_access = FALSE; -#ifdef PCAP_NG_DEFAULT capture_opts->use_pcapng = TRUE; /* Save as pcapng by default */ -#else - capture_opts->use_pcapng = FALSE; /* Save as pcap by default */ -#endif capture_opts->real_time_mode = TRUE; capture_opts->show_info = TRUE; capture_opts->restart = FALSE; diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index 9da6a09dbd..f13d2a87bc 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -322,9 +322,6 @@ /* Define to the version of this package. */ #cmakedefine PACKAGE_VERSION -/* Support for pcapng */ -#cmakedefine PCAP_NG_DEFAULT 1 - /* Define if we have QtMultimedia */ #define QT_MULTIMEDIA_LIB 1 @@ -155,11 +155,7 @@ GTree *frames_user_comments = NULL; static struct select_item selectfrm[MAX_SELECTIONS]; static guint max_selected = 0; static int keep_em = 0; -#ifdef PCAP_NG_DEFAULT static int out_file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_PCAPNG; /* default to pcapng */ -#else -static int out_file_type_subtype = WTAP_FILE_TYPE_SUBTYPE_PCAP; /* default to pcap */ -#endif static int out_frame_type = -2; /* Leave frame type alone */ static int verbose = 0; /* Not so verbose */ static struct time_adjustment time_adj = {NSTIME_INIT_ZERO, 0}; /* no adjustment */ @@ -830,11 +826,7 @@ print_usage(FILE *output) fprintf(output, " -i <seconds per file> split the packet output to different files based on\n"); fprintf(output, " uniform time intervals with a maximum of\n"); fprintf(output, " <seconds per file> each.\n"); -#ifdef PCAP_NG_DEFAULT fprintf(output, " -F <capture type> set the output file type; default is pcapng.\n"); -#else - fprintf(output, " -F <capture type> set the output file type; default is pcap.\n"); -#endif fprintf(output, " An empty \"-F\" option will list the file types.\n"); fprintf(output, " -T <encap type> set the output file encapsulation type; default is the\n"); fprintf(output, " same as the input file. An empty \"-T\" option will\n"); diff --git a/epan/prefs.c b/epan/prefs.c index e8e9603686..e85a4a7ae3 100644 --- a/epan/prefs.c +++ b/epan/prefs.c @@ -4156,11 +4156,7 @@ pre_init_prefs(void) /* set the default values for the capture dialog box */ prefs.capture_prom_mode = TRUE; -#ifdef PCAP_NG_DEFAULT prefs.capture_pcap_ng = TRUE; -#else - prefs.capture_pcap_ng = FALSE; -#endif prefs.capture_real_time = TRUE; prefs.capture_no_extcap = FALSE; prefs.capture_auto_scroll = TRUE; diff --git a/mergecap.c b/mergecap.c index 0dfcf5295b..6e8414dd20 100644 --- a/mergecap.c +++ b/mergecap.c @@ -64,11 +64,7 @@ print_usage(FILE *output) fprintf(output, " default is to merge based on frame timestamps.\n"); fprintf(output, " -s <snaplen> truncate packets to <snaplen> bytes of data.\n"); fprintf(output, " -w <outfile>|- set the output filename to <outfile> or '-' for stdout.\n"); -#ifdef PCAP_NG_DEFAULT fprintf(output, " -F <capture type> set the output file type; default is pcapng.\n"); -#else - fprintf(output, " -F <capture type> set the output file type; default is pcap.\n"); -#endif fprintf(output, " an empty \"-F\" option will list the file types.\n"); fprintf(output, " -I <IDB merge mode> set the merge mode for Interface Description Blocks; default is 'all'.\n"); fprintf(output, " an empty \"-I\" option will list the merge modes.\n"); @@ -240,11 +236,7 @@ main(int argc, char *argv[]) gboolean verbose = FALSE; int in_file_count = 0; guint32 snaplen = 0; -#ifdef PCAP_NG_DEFAULT int file_type = WTAP_FILE_TYPE_SUBTYPE_PCAPNG; /* default to pcapng format */ -#else - int file_type = WTAP_FILE_TYPE_SUBTYPE_PCAP; /* default to pcap format */ -#endif int err = 0; gchar *err_info = NULL; int err_fileno; @@ -414,20 +414,12 @@ print_usage(FILE *output) /*fprintf(output, "\n");*/ fprintf(output, "Output:\n"); -#ifdef PCAP_NG_DEFAULT fprintf(output, " -w <outfile|-> write packets to a pcapng-format file named \"outfile\"\n"); -#else - fprintf(output, " -w <outfile|-> write packets to a pcap-format file named \"outfile\"\n"); -#endif fprintf(output, " (or '-' for stdout)\n"); fprintf(output, " --capture-comment <comment>\n"); fprintf(output, " set the capture file comment, if supported\n"); fprintf(output, " -C <config profile> start with specified configuration profile\n"); -#ifdef PCAP_NG_DEFAULT fprintf(output, " -F <output file type> set the output file type, default is pcapng\n"); -#else - fprintf(output, " -F <output file type> set the output file type, default is pcap\n"); -#endif fprintf(output, " an empty \"-F\" option will list the file types\n"); fprintf(output, " -V add output of packet tree (Packet Details)\n"); fprintf(output, " -O <protocols> Only show packet details of these protocols, comma\n"); @@ -733,11 +725,7 @@ main(int argc, char *argv[]) volatile int max_packet_count = 0; #endif gboolean quiet = FALSE; -#ifdef PCAP_NG_DEFAULT volatile int out_file_type = WTAP_FILE_TYPE_SUBTYPE_PCAPNG; -#else - volatile int out_file_type = WTAP_FILE_TYPE_SUBTYPE_PCAP; -#endif volatile gboolean out_file_name_res = FALSE; volatile int in_file_type = WTAP_TYPE_AUTO; gchar *volatile cf_name = NULL; |