aboutsummaryrefslogtreecommitdiffstats
path: root/capture_opts.c
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2011-06-17 17:52:31 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2011-06-17 17:52:31 +0000
commit19b6883704c8674690ed8fb821041cd509c4b1d7 (patch)
tree2114755f933eee189d1a4ae481381e945a090800 /capture_opts.c
parent1f59d67daa48d62b6c24b2e7bb90b86a711af170 (diff)
Make pcap-ng the default. Add a compile-time option to prefer pcap-ng or
pcap. Add a "-P" capture option which tries to use pcap instead of pcap-ng ("-P" seemed to be the best option but we may want to use a different letter). Update the documentation and release notes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@37696 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_opts.c')
-rw-r--r--capture_opts.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/capture_opts.c b/capture_opts.c
index 3130027f20..3df0d8cdee 100644
--- a/capture_opts.c
+++ b/capture_opts.c
@@ -112,7 +112,11 @@ capture_opts_init(capture_options *capture_opts, void *cf)
capture_opts->saving_to_file = FALSE;
capture_opts->save_file = NULL;
capture_opts->group_read_access = FALSE;
- capture_opts->use_pcapng = FALSE; /* the default is pcap */
+#ifdef PCAP_NG_DEFAULT
+ capture_opts->use_pcapng = TRUE; /* Save as pcap-ng 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->quit_after_cap = FALSE;
@@ -725,6 +729,9 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg_
capture_opts->default_options.promisc_mode = FALSE;
}
break;
+ case 'P': /* Use pcap format */
+ capture_opts->use_pcapng = FALSE;
+ break;
case 'Q': /* Quit after capture (just capture to file) */
capture_opts->quit_after_cap = TRUE;
*start_capture = TRUE; /*** -Q implies -k !! ***/