aboutsummaryrefslogtreecommitdiffstats
path: root/epan/tvbparse.h
diff options
context:
space:
mode:
authorLuis Ontanon <luis.ontanon@gmail.com>2005-09-28 21:32:47 +0000
committerLuis Ontanon <luis.ontanon@gmail.com>2005-09-28 21:32:47 +0000
commitc6ed07b117f951075a231bc9c1172c3c4c1f4507 (patch)
treeaa13ac94b5a45b3402f3f5729b0e362b76f7f022 /epan/tvbparse.h
parent84e00aa0f35c3be94f3cb95234e9d1f47d164571 (diff)
tvbparse.[ch]:
- add a tvbparse_handle() (for recursion) - change tvbparse_until() to allow more control when parsing - make the wanted control an union so that different types of data can be used packet-xml.c: - change the parser definition to match changes to tvbparse_until() svn path=/trunk/; revision=16045
Diffstat (limited to 'epan/tvbparse.h')
-rw-r--r--epan/tvbparse.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/epan/tvbparse.h b/epan/tvbparse.h
index 78a300740d..536f31e25c 100644
--- a/epan/tvbparse.h
+++ b/epan/tvbparse.h
@@ -218,8 +218,16 @@ tvbparse_wanted_t* tvbparse_until(int id,
tvbparse_action_t before_cb,
tvbparse_action_t after_cb,
const tvbparse_wanted_t* ending,
- gboolean include_ending);
+ int op_mode);
+/*
+ * op_mode values determine how the terminating element and the current offset
+ * of the parser are handled
+ */
+
+#define TP_UNTIL_INCLUDE 0 /* elem is included, its span is spent by the parser */
+#define TP_UNTIL_SPEND 1 /* elem is not included, but its span is spent by the parser */
+#define TP_UNTIL_LEAVE 2 /* elem is not included, neither its span is spent by the parser */
/*
* one_of
@@ -270,6 +278,15 @@ tvbparse_wanted_t* tvbparse_some(int id,
#define tvbparse_one_or_more(id, private_data, before_cb, after_cb, wanted)\
tvbparse_some(id, 1, G_MAXINT, private_data, before_cb, after_cb, wanted)
+
+/*
+ * handle
+ *
+ * this is a pointer to a pointer to a wanted element (that might have not
+ * been initialized yet) so that recursive structures
+ */
+tvbparse_wanted_t* tvbparse_handle(tvbparse_wanted_t** handle);
+
/* quoted
* this is a composed candidate, that will try to match a quoted string
* (included the quotes) including into it every escaped quote.