Wireshark 2.9.0-477-g68ec514b The Wireshark network protocol analyzer

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

packet-xml.h
1 /* packet-xml.h
2 * wireshark's xml dissector .
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10 #ifndef __PACKET_XML_H__
11 #define __PACKET_XML_H__
12
13 #include "ws_symbol_export.h"
14
15 typedef struct _xml_ns_t {
16 /* the name of this namespace */
17 gchar* name;
18
19 /* its fully qualified name */
20 const gchar* fqn;
21
22 /* the contents of the whole element from <> to </> */
23 int hf_tag;
24
25 /* chunks of cdata from <> to </> excluding sub tags */
26 int hf_cdata;
27
28 /* the subtree for its sub items */
29 gint ett;
30
31 wmem_map_t* attributes;
32 /* key: the attribute name
33 value: hf_id of what's between quotes */
34
35 /* the namespace's namespaces */
36 wmem_map_t* elements;
37 /* key: the element name
38 value: the child namespace */
39
40 GPtrArray* element_names;
41 /* imported directly from the parser and used while building the namespace */
42
43 } xml_ns_t;
44
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
51
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 gchar *name;
60 const gchar *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 } xml_frame_t;
70
71 WS_DLL_PUBLIC
72 xml_frame_t *xml_get_tag(xml_frame_t *frame, const gchar *name);
73 WS_DLL_PUBLIC
74 xml_frame_t *xml_get_attrib(xml_frame_t *frame, const gchar *name);
75 WS_DLL_PUBLIC
76 xml_frame_t *xml_get_cdata(xml_frame_t *frame);
77
78 #endif /* __PACKET_XML_H__ */
79
80 /*
81 * Editor modelines - http://www.wireshark.org/tools/modelines.html
82 *
83 * Local variables:
84 * c-basic-offset: 4
85 * tab-width: 8
86 * indent-tabs-mode: nil
87 * End:
88 *
89 * vi: set shiftwidth=4 tabstop=8 expandtab:
90 * :indentSize=4:tabSize=8:noTabs=true:
91 */
_xml_ns_t
Definition: packet-xml.h:15
_wmem_map_t
Definition: wmem_map.c:44
_packet_info
Definition: packet_info.h:44
tvbuff
Definition: tvbuff-int.h:35
_proto_node
Definition: proto.h:759
_xml_frame_t
Definition: packet-xml.h:52