diff options
author | tuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-04-27 08:11:10 +0000 |
---|---|---|
committer | tuexen <tuexen@f5534014-38df-0310-8fa8-9805f1628bb7> | 2009-04-27 08:11:10 +0000 |
commit | f73d9a9f56db0cefb8eda15a22307266af8c67bb (patch) | |
tree | 5c1463bcb80679ccde4e95d58a6d47416fdff832 /capture_opts.c | |
parent | 89e6ab202bcadaa885a6fd538b21c76950462f08 (diff) |
Add -n option to dumpcap. It will save the capture files in
pcapng format instead of pcap. The default is to use pcap.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@28170 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'capture_opts.c')
-rw-r--r-- | capture_opts.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/capture_opts.c b/capture_opts.c index ae94e8dd3e..177ffe3701 100644 --- a/capture_opts.c +++ b/capture_opts.c @@ -106,6 +106,7 @@ capture_opts_init(capture_options *capture_opts, void *cf) capture_opts->linktype = -1; /* the default linktype */ capture_opts->saving_to_file = FALSE; capture_opts->save_file = NULL; + capture_opts->use_pcapng = FALSE; /* the default is pcap */ capture_opts->real_time_mode = TRUE; capture_opts->show_info = TRUE; capture_opts->quit_after_cap = FALSE; @@ -179,6 +180,7 @@ capture_opts_log(const char *log_domain, GLogLevelFlags log_level, capture_optio g_log(log_domain, log_level, "LinkType : %d", capture_opts->linktype); g_log(log_domain, log_level, "SavingToFile : %u", capture_opts->saving_to_file); g_log(log_domain, log_level, "SaveFile : %s", (capture_opts->save_file) ? capture_opts->save_file : ""); + g_log(log_domain, log_level, "Fileformat : %s", (capture_opts->use_pcapng) ? "PCAPNG" : "PCAP"); g_log(log_domain, log_level, "RealTimeMode : %u", capture_opts->real_time_mode); g_log(log_domain, log_level, "ShowInfo : %u", capture_opts->show_info); g_log(log_domain, log_level, "QuitAfterCap : %u", capture_opts->quit_after_cap); @@ -500,6 +502,9 @@ capture_opts_add_opt(capture_options *capture_opts, int opt, const char *optarg, } break; #endif + case 'n': /* Use pcapng format */ + capture_opts->use_pcapng = TRUE; + break; case 'p': /* Don't capture in promiscuous mode */ capture_opts->promisc_mode = FALSE; break; |