Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-xml.h
blob2e9a9c651aeee1934d5e8b99e574d58f288a48bb
1 /* packet-xml.h
2 * wireshark's xml dissector .
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10 #ifndef __PACKET_XML_H__
11 #define __PACKET_XML_H__
13 #include "ws_symbol_export.h"
15 typedef struct _xml_ns_t {
16 /* the name of this namespace */
17 char* name;
19 /* its fully qualified name */
20 const char* fqn;
22 /* the contents of the whole element from <> to </> */
23 int hf_tag;
25 /* chunks of cdata from <> to </> excluding sub tags */
26 int hf_cdata;
28 /* the subtree for its sub items */
29 int ett;
31 wmem_map_t* attributes;
32 /* key: the attribute name
33 value: hf_id of what's between quotes */
35 /* the namespace's namespaces */
36 wmem_map_t* elements;
37 /* key: the element name
38 value: the child namespace */
40 GPtrArray* element_names;
41 /* imported directly from the parser and used while building the namespace */
43 } xml_ns_t;
45 #define XML_FRAME_ROOT 0
46 #define XML_FRAME_TAG 1
47 #define XML_FRAME_XMPLI 2
48 #define XML_FRAME_DTD_DOCTYPE 3
49 #define XML_FRAME_ATTRIB 4
50 #define XML_FRAME_CDATA 5
52 typedef struct _xml_frame_t {
53 int type;
54 struct _xml_frame_t* parent;
55 struct _xml_frame_t* first_child;
56 struct _xml_frame_t* last_child;
57 struct _xml_frame_t* prev_sibling;
58 struct _xml_frame_t* next_sibling;
59 const char *name;
60 const char *name_orig_case;
61 tvbuff_t *value;
62 proto_tree* tree;
63 proto_item* item;
64 proto_item* last_item;
65 xml_ns_t* ns;
66 int start_offset;
67 int length;
68 packet_info* pinfo;
69 wmem_map_t *decryption_keys;
70 } xml_frame_t;
72 WS_DLL_PUBLIC
73 xml_frame_t *xml_get_tag(xml_frame_t *frame, const char *name);
74 WS_DLL_PUBLIC
75 xml_frame_t *xml_get_attrib(xml_frame_t *frame, const char *name);
76 WS_DLL_PUBLIC
77 xml_frame_t *xml_get_cdata(xml_frame_t *frame);
79 #endif /* __PACKET_XML_H__ */
82 * Editor modelines - https://www.wireshark.org/tools/modelines.html
84 * Local variables:
85 * c-basic-offset: 4
86 * tab-width: 8
87 * indent-tabs-mode: nil
88 * End:
90 * vi: set shiftwidth=4 tabstop=8 expandtab:
91 * :indentSize=4:tabSize=8:noTabs=true: