aboutsummaryrefslogtreecommitdiffstats
path: root/ptvcursor.h
diff options
context:
space:
mode:
authorGilbert Ramirez <gram@alumni.rice.edu>2002-05-09 23:50:34 +0000
committerGilbert Ramirez <gram@alumni.rice.edu>2002-05-09 23:50:34 +0000
commit41cc7f0707c5c62ae5651fcd70a9e9b12a4ce387 (patch)
tree46737517f86dbb9ec37210737dd521c9c3920608 /ptvcursor.h
parent9625720a39eddda6ef4c34725fe8017160cf05d9 (diff)
Merge the work in Novell_NCP_branch into the mainline code.
A little work still needs to be done on the new NCP dissector -- make some of the COL_INFO texts more useful, handle a Unicode issue, and modify some of the cases that use "request conditions". But the NCP dissector as it stands is very usable now. Note: I didn't merge in the PROTO_LENGTH_UNTIL_END macro... I wanted to think about the various possible macros and review an email conversation I had with Guy on the subject. svn path=/trunk/; revision=5432
Diffstat (limited to 'ptvcursor.h')
-rw-r--r--ptvcursor.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/ptvcursor.h b/ptvcursor.h
index 7840ddba63..830c0f0027 100644
--- a/ptvcursor.h
+++ b/ptvcursor.h
@@ -3,7 +3,7 @@
* Proto Tree TVBuff cursor
* Gilbert Ramirez <gram@alumni.rice.edu>
*
- * $Id: ptvcursor.h,v 1.5 2002/01/21 07:36:48 guy Exp $
+ * $Id: ptvcursor.h,v 1.6 2002/05/09 23:50:25 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -36,8 +36,6 @@
typedef struct ptvcursor ptvcursor_t;
-#define PTVC_VARIABLE_LENGTH -1
-
/* Allocates an initializes a ptvcursor_t with 3 variables:
* proto_tree, tvbuff, and offset. */
ptvcursor_t*
@@ -54,6 +52,11 @@ ptvcursor_add(ptvcursor_t*, int hf, gint length, gboolean endianness);
proto_item*
ptvcursor_add_no_advance(ptvcursor_t*, int hf, gint length, gboolean endianness);
+/* Advance the ptvcursor's offset within its tvbuff without
+ * adding anything to the proto_tree. */
+void
+ptvcursor_advance(ptvcursor_t* ptvc, gint length);
+
/* Frees memory for ptvcursor_t, but nothing deeper than that. */
void
ptvcursor_free(ptvcursor_t*);
@@ -66,4 +69,12 @@ ptvcursor_tvbuff(ptvcursor_t*);
gint
ptvcursor_current_offset(ptvcursor_t*);
+/* Returns the proto_tree* */
+proto_tree*
+ptvcursor_tree(ptvcursor_t* ptvc);
+
+/* Sets a new proto_tree* for the ptvcursor_t */
+void
+ptvcursor_set_tree(ptvcursor_t* ptvc, proto_tree *tree);
+
#endif /* __PTVCURSOR_H__ */