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
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 */
19 /* its fully qualified name */
22 /* the contents of the whole element from <> to </> */
25 /* chunks of cdata from <> to </> excluding sub tags */
28 /* the subtree for its sub items */
31 wmem_map_t
* attributes
;
32 /* key: the attribute name
33 value: hf_id of what's between quotes */
35 /* the namespace's namespaces */
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 */
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
{
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
;
60 const char *name_orig_case
;
64 proto_item
* last_item
;
69 wmem_map_t
*decryption_keys
;
73 xml_frame_t
*xml_get_tag(xml_frame_t
*frame
, const char *name
);
75 xml_frame_t
*xml_get_attrib(xml_frame_t
*frame
, const char *name
);
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
87 * indent-tabs-mode: nil
90 * vi: set shiftwidth=4 tabstop=8 expandtab:
91 * :indentSize=4:tabSize=8:noTabs=true: