aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-xmpp-core.h
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2012-07-22 21:48:51 +0000
committerEvan Huus <eapache@gmail.com>2012-07-22 21:48:51 +0000
commitdaa0ff3ac80126abf74110a8fdb13a38369ba089 (patch)
tree341399cfadefcbf2ec3ee44947bcd3f5ee99e71b /epan/dissectors/packet-xmpp-core.h
parent5c75ecd4245289be43cdbdae7edd9952a44918d8 (diff)
The XMPP dissector was allocating a new parser for every packet and never
freeing them. This was slow and leaked gobs of memory. Be like XML: allocate one parser during set-up and share it around. svn path=/trunk/; revision=43920
Diffstat (limited to 'epan/dissectors/packet-xmpp-core.h')
-rw-r--r--epan/dissectors/packet-xmpp-core.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/epan/dissectors/packet-xmpp-core.h b/epan/dissectors/packet-xmpp-core.h
index f79aa27af4..221d4ab2e3 100644
--- a/epan/dissectors/packet-xmpp-core.h
+++ b/epan/dissectors/packet-xmpp-core.h
@@ -26,8 +26,15 @@
#ifndef XMPP_CORE_H
#define XMPP_CORE_H
+#include "epan/tvbparse.h"
+
#include "packet-xmpp-utils.h"
+extern void xmpp_init_parsers(void);
+extern tvbparse_wanted_t *want_ignore;
+extern tvbparse_wanted_t *want_stream_end_tag;
+extern tvbparse_wanted_t *want_stream_end_with_ns;
+
extern void xmpp_iq(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *packet);
extern void xmpp_presence(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *packet);
extern void xmpp_message(proto_tree *tree, tvbuff_t *tvb, packet_info *pinfo, xmpp_element_t *packet);