diff options
author | Dario Lombardo <lomato@gmail.com> | 2018-04-09 12:31:38 +0200 |
---|---|---|
committer | Dario Lombardo <lomato@gmail.com> | 2018-04-18 08:57:39 +0000 |
commit | 511c2e166a6d3eeb37930a3dd7f40056498456ca (patch) | |
tree | da9d1f74320c65560a2eb4517c9fe78b5a5d886b /tshark.c | |
parent | 88435354c024597601bdbf2cb916f4b07faf2e52 (diff) |
tshark: add -G elastic-mapping report.
This option generates an ElasticSearch mapping file as described here:
https://www.elastic.co/blog/analyzing-network-packets-with-wireshark-elasticsearch-and-kibana
It leverages the Glib-json library.
Change-Id: Iff25f991e87d3da07bf06654e353fb785799dde9
Reviewed-on: https://code.wireshark.org/review/26848
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -476,6 +476,7 @@ glossary_option_help(void) fprintf(output, " -G column-formats dump column format codes and exit\n"); fprintf(output, " -G decodes dump \"layer type\"/\"decode as\" associations and exit\n"); fprintf(output, " -G dissector-tables dump dissector table names, types, and properties\n"); + fprintf(output, " -G elastic-mapping dump ElasticSearch mapping file\n"); fprintf(output, " -G fieldcount dump count of header fields and exit\n"); fprintf(output, " -G fields dump fields glossary and exit\n"); fprintf(output, " -G ftypes dump field type basic and descriptive names\n"); @@ -964,6 +965,10 @@ main(int argc, char *argv[]) write_prefs(NULL); else if (strcmp(argv[2], "dissector-tables") == 0) dissector_dump_dissector_tables(); +#ifdef HAVE_JSONGLIB + else if (strcmp(argv[2], "elastic-mapping") == 0) + proto_registrar_dump_elastic(); +#endif else if (strcmp(argv[2], "fieldcount") == 0) { /* return value for the test suite */ exit_status = proto_registrar_dump_fieldcount(); |