aboutsummaryrefslogtreecommitdiffstats
path: root/capinfos.c
diff options
context:
space:
mode:
authorDavid Perry <boolean263@protonmail.com>2021-08-09 10:12:17 -0400
committerAndersBroman <a.broman58@gmail.com>2021-09-10 05:32:53 +0000
commitc6343153638c2ed739fcb1ebdcd37070fe653a1d (patch)
treefa59a0888a47a0061f3cbf79f8cf71180459f98a /capinfos.c
parentd87fb12bc2d3a44b632810ee9b413ccddc4c2723 (diff)
[#17519] capinfos: no section headers in table output
Remove "Section N:" headers from capinfos table (`-T`) output when outputting "additional capture file information" with `-F` and/or comments with `-k`. These headers broke the formatting of table output. The downside to this fix is that pcapng files with multiple SHBs and/or comments will have extra table columns that don't line up with the header, as in: ...,hardware1,os1,application1,comment1,comment1,hardware2,os2, application2,comment2,comment2,... There's no real good way around this though.
Diffstat (limited to 'capinfos.c')
-rw-r--r--capinfos.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/capinfos.c b/capinfos.c
index 7cef396f2d..c43dddd83a 100644
--- a/capinfos.c
+++ b/capinfos.c
@@ -1057,10 +1057,6 @@ print_stats_table(const gchar *filename, capture_info *cf_info)
section_number++) {
wtap_block_t shb;
- // If we have more than one section, add headers for each section.
- if (wtap_file_get_num_shbs(cf_info->wth) > 1)
- printf("Section %u: \n", section_number);
-
shb = wtap_file_get_shb(cf_info->wth, section_number);
if (cap_file_more_info) {
char *str;
@@ -1103,10 +1099,6 @@ print_stats_table(const gchar *filename, capture_info *cf_info)
char *opt_comment;
gboolean have_cap = FALSE;
- // If we have more than one section, add headers for each section.
- if (wtap_file_get_num_shbs(cf_info->wth) > 1)
- printf("Section %u: \n", section_number);
-
for (i = 0; wtap_block_get_nth_string_option_value(shb, OPT_COMMENT, i, &opt_comment) == WTAP_OPTTYPE_SUCCESS; i++) {
have_cap = TRUE;
putsep();