aboutsummaryrefslogtreecommitdiffstats
path: root/mergecap.c
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2018-12-11 23:38:30 +0100
committerGuy Harris <guy@alum.mit.edu>2018-12-12 02:57:59 +0000
commitdcbd556e4da77760edf991c4394cc1821c2fbd06 (patch)
treed8543e7f2d9d53198dac0937cfba37ed085fff48 /mergecap.c
parent8ab57eb3d625f5401c8fab82a3891dce3dfe71dc (diff)
mergecap: set full name as capture application
When mergecap is generating a PCAPNG capture file it sets its name ("mergecap") as the capture application. This seems rather limited, compared to e.g., text2pcap. This change sets the capture application name to "mergecap" with full details, the same as text2pcap: "mergecap (Wireshark) 2.9.0 (v2.9.0rc0-2798-g47d5a923)" Change-Id: Ia08717a9f2bcaa3fa1dc8ce13afcdaa8a0bc0c66 Signed-off-by: Jaap Keuter <jaap.keuter@xs4all.nl> Reviewed-on: https://code.wireshark.org/review/31011 Petri-Dish: Guy Harris <guy@alum.mit.edu> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'mergecap.c')
-rw-r--r--mergecap.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/mergecap.c b/mergecap.c
index efd3e386b9..0425efc2f3 100644
--- a/mergecap.c
+++ b/mergecap.c
@@ -234,6 +234,7 @@ real_main(int argc, char *argv[])
{
GString *comp_info_str;
GString *runtime_info_str;
+ char *appname;
char *init_progfile_dir_error;
int opt;
static const struct option long_options[] = {
@@ -271,13 +272,16 @@ real_main(int argc, char *argv[])
/* Get the run-time version information string */
runtime_info_str = get_runtime_version_info(NULL);
+ /* Get the application name with version info */
+ appname = g_strdup_printf("mergecap (Wireshark) %s", get_ws_vcs_version_info());
+
/* Add it to the information to be reported on a crash. */
- ws_add_crash_info("Mergecap (Wireshark) %s\n"
+ ws_add_crash_info("%s\n"
"\n"
"%s"
"\n"
"%s",
- get_ws_vcs_version_info(), comp_info_str->str, runtime_info_str->str);
+ appname, comp_info_str->str, runtime_info_str->str);
g_string_free(comp_info_str, TRUE);
g_string_free(runtime_info_str, TRUE);
@@ -416,13 +420,13 @@ real_main(int argc, char *argv[])
status = merge_files_to_stdout(file_type,
(const char *const *) &argv[optind],
in_file_count, do_append, mode, snaplen,
- "mergecap", verbose ? &cb : NULL,
+ appname, verbose ? &cb : NULL,
&err, &err_info, &err_fileno, &err_framenum);
} else {
/* merge the files to the outfile */
status = merge_files(out_filename, file_type,
(const char *const *) &argv[optind], in_file_count,
- do_append, mode, snaplen, "mergecap", verbose ? &cb : NULL,
+ do_append, mode, snaplen, appname, verbose ? &cb : NULL,
&err, &err_info, &err_fileno, &err_framenum);
}