aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-06-19 15:22:56 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-06-19 15:22:56 +0000
commit909d2eb3090c773d271097d2c9dc5e164aa2f03b (patch)
tree23e926d38c1b4cf03da4c2adaa2ddc5dac5810ce /file.c
parent54d58d66f71496a23c948144e1ad9fccad9fe39a (diff)
Allow for column headers not to be printed in order to make it possible to export packets as plain text in a format that could then have a chance of being imported again (assuming other factors such as packet bytes were printed, etc.) in order to recover the original pcap file.
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1636 svn path=/trunk/; revision=50036
Diffstat (limited to 'file.c')
-rw-r--r--file.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/file.c b/file.c
index 7fa6681920..66949864c7 100644
--- a/file.c
+++ b/file.c
@@ -2410,6 +2410,8 @@ print_packet(capture_file *cf, frame_data *fdata,
g_snprintf(bookmark_name, sizeof bookmark_name, "__frame%u__", fdata->num);
if (args->print_args->print_summary) {
+ if (!args->print_args->print_col_headings)
+ args->print_header_line = FALSE;
if (args->print_header_line) {
if (!print_line(args->print_args->stream, 0, args->header_line_buf))
goto fail;
@@ -2479,7 +2481,8 @@ print_packet(capture_file *cf, frame_data *fdata,
args->print_separator = TRUE;
/* Print a header line if we print any more packet summaries */
- args->print_header_line = TRUE;
+ if (args->print_args->print_col_headings)
+ args->print_header_line = TRUE;
}
if (args->print_args->print_hex) {
@@ -2495,7 +2498,8 @@ print_packet(capture_file *cf, frame_data *fdata,
args->print_separator = TRUE;
/* Print a header line if we print any more packet summaries */
- args->print_header_line = TRUE;
+ if (args->print_args->print_col_headings)
+ args->print_header_line = TRUE;
} /* if (args->print_args->print_dissections != print_dissections_none) */
epan_dissect_cleanup(&edt);
@@ -2525,7 +2529,7 @@ cf_print_packets(capture_file *cf, print_args_t *print_args)
fmt_data *cfmt;
callback_args.print_args = print_args;
- callback_args.print_header_line = TRUE;
+ callback_args.print_header_line = print_args->print_col_headings;
callback_args.header_line_buf = NULL;
callback_args.header_line_buf_len = 256;
callback_args.print_formfeed = FALSE;