aboutsummaryrefslogtreecommitdiffstats
path: root/epan/print.h
diff options
context:
space:
mode:
authorDario Lombardo <lomato@gmail.com>2018-12-10 13:44:03 +0100
committerPeter Wu <peter@lekensteyn.nl>2019-01-03 14:33:48 +0000
commit30c90fa745af6b63da6aa6b59e4fbb24d2f195bd (patch)
tree02bdfdbc37fe7f9178167e1cef6bd71bcc66af7c /epan/print.h
parent19d787d0514696eff4b723d23c7615155c23b245 (diff)
epan: use json_dumper for json outputs.
They include -Tjson, -Tjsonraw, -Tek. Change-Id: Ib3d700482ce5c29727c3f778cc3c46a1bf7756c4 Reviewed-on: https://code.wireshark.org/review/31000 Petri-Dish: Dario Lombardo <lomato@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'epan/print.h')
-rw-r--r--epan/print.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/print.h b/epan/print.h
index ad96942dbc..52da0ce2db 100644
--- a/epan/print.h
+++ b/epan/print.h
@@ -17,9 +17,10 @@
#include <epan/epan.h>
#include <epan/packet.h>
-
#include <epan/print_stream.h>
+#include <wsutil/json_dumper.h>
+
#include "ws_symbol_export.h"
#ifdef __cplusplus
@@ -91,7 +92,7 @@ WS_DLL_PUBLIC GSList *proto_node_group_children_by_unique(proto_node *node);
// Groups children by json key (children with the same json key get put in the same group
WS_DLL_PUBLIC GSList *proto_node_group_children_by_json_key(proto_node *node);
-WS_DLL_PUBLIC void write_json_preamble(FILE *fh);
+WS_DLL_PUBLIC json_dumper write_json_preamble(FILE *fh);
WS_DLL_PUBLIC void write_json_proto_tree(output_fields_t* fields,
print_dissections_e print_dissections,
gboolean print_hex_data,
@@ -100,8 +101,8 @@ WS_DLL_PUBLIC void write_json_proto_tree(output_fields_t* fields,
epan_dissect_t *edt,
column_info *cinfo,
proto_node_children_grouper_func node_children_grouper,
- FILE *fh);
-WS_DLL_PUBLIC void write_json_finale(FILE *fh);
+ json_dumper *dumper);
+WS_DLL_PUBLIC void write_json_finale(json_dumper *dumper);
WS_DLL_PUBLIC void write_ek_proto_tree(output_fields_t* fields,
gboolean print_summary,