Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-json.h
blob5160a868132f3a38c8ecb49a2bc0430f3314d0c9
1 /* packet-json.h
2 * Routines for JSON dissection
3 * References:
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;
30 } json_ie_t;
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)?
37 typedef struct {
38 int *hf_id;
39 json_data_decoder_func json_data_decoder;
40 } json_data_decoder_t;
42 typedef struct _json_key {
43 int offset;
44 int len;
45 char* key_str;
46 bool use_compact;
47 } json_key_t;
49 #endif /* _PACKET_JSON_H */
52 * Editor modelines - https://www.wireshark.org/tools/modelines.html
54 * Local variables:
55 * c-basic-offset: 4
56 * tab-width: 8
57 * indent-tabs-mode: nil
58 * End:
60 * vi: set shiftwidth=4 tabstop=8 expandtab:
61 * :indentSize=4:tabSize=8:noTabs=true: