summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/tshark.pod22
-rw-r--r--docbook/release-notes.asciidoc4
-rw-r--r--epan/proto.c136
-rw-r--r--epan/proto.h6
-rw-r--r--tshark.c13
5 files changed, 65 insertions, 116 deletions
diff --git a/doc/tshark.pod b/doc/tshark.pod
index 8c3f314e3c..28061cd759 100644
--- a/doc/tshark.pod
+++ b/doc/tshark.pod
@@ -52,7 +52,7 @@ S<[ B<-z> E<lt>statisticsE<gt> ]>
S<[ E<lt>capture filterE<gt> ]>
B<tshark>
-B<-G> [fields|fields2|fields3|protocols|values|decodes|defaultprefs|currentprefs]
+B<-G> [fields|protocols|values|decodes|defaultprefs|currentprefs]
=head1 DESCRIPTION
@@ -353,7 +353,7 @@ This option causes the output file(s) to be created with group-read permission
(meaning that the output file(s) can be read by other members of the calling
user's group).
-=item -G [fields|fields2|fields3|protocols|values|decodes|defaultprefs|currentprefs]
+=item -G [fields|protocols|values|decodes|defaultprefs|currentprefs]
The B<-G> option will cause B<Tshark> to dump one of several types of glossaries
and then exit. If no specific glossary type is specified, then the B<fields> report will be generated by default.
@@ -379,17 +379,9 @@ The fields are tab-delimited.
* Field 3 = field abbreviation
* Field 4 = type ( textual representation of the ftenum type )
* Field 5 = parent protocol abbreviation
- * Field 6 = blurb describing field
-
-B<fields2> Same as the B<fields> report but includes two additional columns.
-
- * Field 7 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
- * Field 8 = blurb describing field (yes, apparently we repeated this accidentally)
-
-B<fields3> Same as the B<fields> report but includes two additional columns.
-
- * Field 7 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
- * Field 8 = bitmask: format: hex: 0x....
+ * Field 6 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
+ * Field 7 = bitmask: format: hex: 0x....
+ * Field 8 = blurb describing field
B<protocols> Dumps the protocols in the registration database to stdout.
An independent program can take this output and format it into nice tables
@@ -632,9 +624,9 @@ applied.
Cause the specified filter (which uses the syntax of read/display filters,
rather than that of capture filters) to be applied before printing a
decoded form of packets or writing packets to a file. Packets matching the
-filter are printed or written to file; packets that the matching packets
+filter are printed or written to file; packets that the matching packets
depend upon (e.g., fragments), are not printed but are written to file;
-packets not matching the filter nor depended upon are discarded rather
+packets not matching the filter nor depended upon are discarded rather
than being printed or written.
Use this instead of -R for filtering using single-pass analysis. If doing
diff --git a/docbook/release-notes.asciidoc b/docbook/release-notes.asciidoc
index e82c8385e6..3a6ab45554 100644
--- a/docbook/release-notes.asciidoc
+++ b/docbook/release-notes.asciidoc
@@ -52,6 +52,10 @@ have been updated.
* Tshark's filtering and multi-pass analysis have been reworked for consistency
and in order to support dependent frame calculations during reassembly. See the
man page descriptions for -2, -R, and -Y.
+* Tshark's -G fields2 and -G fields3 options have been eliminated. The
+-G fields option now includes the 2 extra fields that -G fields3 previously
+provided, and the blurb information has been relegated to the last column since
+in many cases it is blank anyway.
=== New Protocol Support
diff --git a/epan/proto.c b/epan/proto.c
index 4ea0e2fffc..05dd4e82b0 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -5346,7 +5346,7 @@ proto_item_fill_label(field_info *fi, gchar *label_str)
case FT_ABSOLUTE_TIME:
label_fill(label_str, hfinfo,
- abs_time_to_str((const nstime_t *)fvalue_get(&fi->value),
+ abs_time_to_str((const nstime_t *)fvalue_get(&fi->value),
(absolute_time_display_e)hfinfo->display, TRUE));
break;
@@ -6608,36 +6608,17 @@ proto_registrar_dump_values(void)
*
* Header Fields
* -------------
- * (format 1)
* Field 1 = 'F'
* Field 2 = descriptive field name
* Field 3 = field abbreviation
* Field 4 = type ( textual representation of the the ftenum type )
* Field 5 = parent protocol abbreviation
- * Field 6 = blurb describing field
- *
- * (format 2)
- * Field 1 = 'F'
- * Field 2 = descriptive field name
- * Field 3 = field abbreviation
- * Field 4 = type ( textual representation of the the ftenum type )
- * Field 5 = parent protocol abbreviation
- * Field 6 = blurb describing field
- * Field 7 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
- * Field 8 = blurb describing field (yes, apparently we repeated this accidentally)
- *
- * (format 3)
- * Field 1 = 'F'
- * Field 2 = descriptive field name
- * Field 3 = field abbreviation
- * Field 4 = type ( textual representation of the the ftenum type )
- * Field 5 = parent protocol abbreviation
- * Field 6 = blurb describing field
- * Field 7 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
- * Field 8 = bitmask: format: hex: 0x....
+ * Field 6 = base for display (for integer types); "parent bitfield width" for FT_BOOLEAN
+ * Field 7 = bitmask: format: hex: 0x....
+ * Field 8 = blurb describing field
*/
void
-proto_registrar_dump_fields(const int format)
+proto_registrar_dump_fields(void)
{
header_field_info *hfinfo, *parent_hfinfo;
int i, len;
@@ -6683,50 +6664,47 @@ proto_registrar_dump_fields(const int format)
enum_name = ftype_name(hfinfo->type);
base_name = "";
- if (format > 1) {
- if (hfinfo->type == FT_UINT8 ||
- hfinfo->type == FT_UINT16 ||
- hfinfo->type == FT_UINT24 ||
- hfinfo->type == FT_UINT32 ||
- hfinfo->type == FT_UINT64 ||
- hfinfo->type == FT_INT8 ||
- hfinfo->type == FT_INT16 ||
- hfinfo->type == FT_INT24 ||
- hfinfo->type == FT_INT32 ||
- hfinfo->type == FT_INT64) {
-
-
- switch (hfinfo->display & BASE_DISPLAY_E_MASK) {
- case BASE_NONE:
- base_name = "BASE_NONE";
- break;
- case BASE_DEC:
- base_name = "BASE_DEC";
- break;
- case BASE_HEX:
- base_name = "BASE_HEX";
- break;
- case BASE_OCT:
- base_name = "BASE_OCT";
- break;
- case BASE_DEC_HEX:
- base_name = "BASE_DEC_HEX";
- break;
- case BASE_HEX_DEC:
- base_name = "BASE_HEX_DEC";
- break;
- case BASE_CUSTOM:
- base_name = "BASE_CUSTOM";
- break;
- default:
- base_name = "????";
- break;
- }
- } else if (hfinfo->type == FT_BOOLEAN) {
- /* For FT_BOOLEAN: 'display' can be "parent bitfield width" */
- g_snprintf(width, sizeof(width), "%d", hfinfo->display);
- base_name = width;
+ if (hfinfo->type == FT_UINT8 ||
+ hfinfo->type == FT_UINT16 ||
+ hfinfo->type == FT_UINT24 ||
+ hfinfo->type == FT_UINT32 ||
+ hfinfo->type == FT_UINT64 ||
+ hfinfo->type == FT_INT8 ||
+ hfinfo->type == FT_INT16 ||
+ hfinfo->type == FT_INT24 ||
+ hfinfo->type == FT_INT32 ||
+ hfinfo->type == FT_INT64) {
+
+ switch (hfinfo->display & BASE_DISPLAY_E_MASK) {
+ case BASE_NONE:
+ base_name = "BASE_NONE";
+ break;
+ case BASE_DEC:
+ base_name = "BASE_DEC";
+ break;
+ case BASE_HEX:
+ base_name = "BASE_HEX";
+ break;
+ case BASE_OCT:
+ base_name = "BASE_OCT";
+ break;
+ case BASE_DEC_HEX:
+ base_name = "BASE_DEC_HEX";
+ break;
+ case BASE_HEX_DEC:
+ base_name = "BASE_HEX_DEC";
+ break;
+ case BASE_CUSTOM:
+ base_name = "BASE_CUSTOM";
+ break;
+ default:
+ base_name = "????";
+ break;
}
+ } else if (hfinfo->type == FT_BOOLEAN) {
+ /* For FT_BOOLEAN: 'display' can be "parent bitfield width" */
+ g_snprintf(width, sizeof(width), "%d", hfinfo->display);
+ base_name = width;
}
blurb = hfinfo->blurb;
@@ -6734,26 +6712,10 @@ proto_registrar_dump_fields(const int format)
blurb = "";
else if (strlen(blurb) == 0)
blurb = "\"\"";
- if (format == 1) {
- printf("F\t%s\t%s\t%s\t%s\t%s\n",
- hfinfo->name, hfinfo->abbrev, enum_name,
- parent_hfinfo->abbrev, blurb);
- }
- else if (format == 2) {
- printf("F\t%s\t%s\t%s\t%s\t%s\t%s\t%s\n",
- hfinfo->name, hfinfo->abbrev, enum_name,
- parent_hfinfo->abbrev, blurb,
- base_name, blurb);
- }
- else if (format == 3) {
- printf("F\t%s\t%s\t%s\t%s\t%s\t%s\t0x%x\n",
- hfinfo->name, hfinfo->abbrev, enum_name,
- parent_hfinfo->abbrev, blurb,
- base_name, hfinfo->bitmask);
- }
- else {
- g_assert_not_reached();
- }
+
+ printf("F\t%s\t%s\t%s\t%s\t%s\t0x%x\t%s\n",
+ hfinfo->name, hfinfo->abbrev, enum_name,
+ parent_hfinfo->abbrev, base_name, hfinfo->bitmask, blurb);
}
}
}
diff --git a/epan/proto.h b/epan/proto.h
index f52e00c579..adf5ffbc82 100644
--- a/epan/proto.h
+++ b/epan/proto.h
@@ -1835,10 +1835,8 @@ WS_DLL_PUBLIC void proto_registrar_dump_protocols(void);
/** Dumps a glossary of the field value strings or true/false strings to STDOUT */
WS_DLL_PUBLIC void proto_registrar_dump_values(void);
-/** Dumps a glossary of the protocol and field registrations to STDOUT.
- * Format 1 is the original format. Format 2 includes the base (for integers)
- * and the blurb. */
-WS_DLL_PUBLIC void proto_registrar_dump_fields(const int format);
+/** Dumps a glossary of the protocol and field registrations to STDOUT. */
+WS_DLL_PUBLIC void proto_registrar_dump_fields(void);
/** Dumps a glossary field types and descriptive names to STDOUT */
WS_DLL_PUBLIC void proto_registrar_dump_ftypes(void);
diff --git a/tshark.c b/tshark.c
index 468d92f462..02895135d4 100644
--- a/tshark.c
+++ b/tshark.c
@@ -354,9 +354,7 @@ glossary_option_help(void)
fprintf(output, "Usage: tshark -G [report]\n");
fprintf(output, "\n");
fprintf(output, "Glossary table reports:\n");
- fprintf(output, " -G [fields] dump glossary in original format and exit\n");
- fprintf(output, " -G fields2 dump glossary in format 2 and exit\n");
- fprintf(output, " -G fields3 dump glossary in format 3 and exit\n");
+ fprintf(output, " -G fields dump fields glossary and exit\n");
fprintf(output, " -G protocols dump protocols in registration database and exit\n");
fprintf(output, " -G values dump value, range, true/false strings and exit\n");
fprintf(output, " -G ftypes dump field type basic and descriptive names\n");
@@ -367,7 +365,6 @@ glossary_option_help(void)
fprintf(output, " -G defaultprefs dump default preferences and exit\n");
fprintf(output, " -G currentprefs dump current preferences and exit\n");
fprintf(output, "\n");
-
}
/*
@@ -1098,14 +1095,10 @@ main(int argc, char *argv[])
proto_initialize_all_prefixes();
if (argc == 2)
- proto_registrar_dump_fields(1);
+ proto_registrar_dump_fields();
else {
if (strcmp(argv[2], "fields") == 0)
- proto_registrar_dump_fields(1);
- else if (strcmp(argv[2], "fields2") == 0)
- proto_registrar_dump_fields(2);
- else if (strcmp(argv[2], "fields3") == 0)
- proto_registrar_dump_fields(3);
+ proto_registrar_dump_fields();
else if (strcmp(argv[2], "protocols") == 0)
proto_registrar_dump_protocols();
else if (strcmp(argv[2], "values") == 0)