2 * Routines for JSON dissection
4 * RFC 4627: https://tools.ietf.org/html/rfc4627
5 * Website: http://json.org/
7 * Copyright 2010, Jakub Zawadzki <darkjames-ws@darkjames.pl>
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
16 #ifndef _PACKET_JSON_H
17 #define _PACKET_JSON_H
19 /* XXX - This should probably be a string or custom dissector table */
20 extern GHashTable
*json_header_fields_hash
;
22 /* json data decoding function
24 typedef void(*json_data_decoder_func
)(tvbuff_t
* tvb
, proto_tree
* tree
, packet_info
* pinfo
, int offset
, int len
, const char* key_str
);
26 /* Array of functions to dissect IEs
28 typedef struct _json_ie
{
29 json_data_decoder_func json_data_decoder
;
32 /* A struct to hold the hf and callback function stored in a hastable with the json key as key.
33 * If the callback is null NULL the filter will be used useful to create filterable items in json.
34 * XXX Todo: Implement hte UAT from the http dissector to enable the users to create filters? and/or
35 * read config from file, similar to Diameter(filter only)?
39 json_data_decoder_func json_data_decoder
;
40 } json_data_decoder_t
;
42 typedef struct _json_key
{
49 #endif /* _PACKET_JSON_H */
52 * Editor modelines - https://www.wireshark.org/tools/modelines.html
57 * indent-tabs-mode: nil
60 * vi: set shiftwidth=4 tabstop=8 expandtab:
61 * :indentSize=4:tabSize=8:noTabs=true: