diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2002-05-09 23:50:34 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2002-05-09 23:50:34 +0000 |
commit | 41cc7f0707c5c62ae5651fcd70a9e9b12a4ce387 (patch) | |
tree | 46737517f86dbb9ec37210737dd521c9c3920608 /ptvcursor.c | |
parent | 9625720a39eddda6ef4c34725fe8017160cf05d9 (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.c')
-rw-r--r-- | ptvcursor.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/ptvcursor.c b/ptvcursor.c index bce7f80dd3..3d1cadbef0 100644 --- a/ptvcursor.c +++ b/ptvcursor.c @@ -3,7 +3,7 @@ * Proto Tree TVBuff cursor * Gilbert Ramirez <gram@alumni.rice.edu> * - * $Id: ptvcursor.c,v 1.5 2002/01/10 04:44:34 gram Exp $ + * $Id: ptvcursor.c,v 1.6 2002/05/09 23:50:25 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -75,6 +75,14 @@ ptvcursor_add_no_advance(ptvcursor_t* ptvc, int hf, gint length, return item; } +/* Advance the ptvcursor's offset within its tvbuff without + * adding anything to the proto_tree. */ +void +ptvcursor_advance(ptvcursor_t* ptvc, gint length) +{ + ptvc->offset += length; +} + /* Frees memory for ptvcursor_t, but nothing deeper than that. */ void ptvcursor_free(ptvcursor_t *ptvc) @@ -94,3 +102,15 @@ ptvcursor_current_offset(ptvcursor_t* ptvc) { return ptvc->offset; } + +proto_tree* +ptvcursor_tree(ptvcursor_t* ptvc) +{ + return ptvc->tree; +} + +void +ptvcursor_set_tree(ptvcursor_t* ptvc, proto_tree *tree) +{ + ptvc->tree = tree; +} |