diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 2002-01-10 04:44:34 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 2002-01-10 04:44:34 +0000 |
commit | f7265ba975b079f97d3837ba91cb371f63059c5b (patch) | |
tree | 6d7240e50e195c75db9872b444c714926525e264 /ptvcursor.h | |
parent | aa36cec9df2e30710deaebc50f10ea3c033dedd5 (diff) |
Allow NCP types to define bitfields. In order to implement
sub-trees, I added new functions to ptvcursor:
ptvcursor_add_no_advance()
ptvcursor_tvbuff()
ptvcursor_current_offset()
Note that no NCP type that actually uses bitfields has been
checked in yet.
svn path=/trunk/; revision=4509
Diffstat (limited to 'ptvcursor.h')
-rw-r--r-- | ptvcursor.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/ptvcursor.h b/ptvcursor.h index 0926ff8f06..366796954d 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.3 2001/11/13 23:55:30 gram Exp $ + * $Id: ptvcursor.h,v 1.4 2002/01/10 04:44:34 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -48,8 +48,22 @@ ptvcursor_new(proto_tree*, tvbuff_t*, gint); proto_item* ptvcursor_add(ptvcursor_t*, int hf, gint length, gboolean endianness); + +/* Gets data from tvbuff, adds it to proto_tree, *DOES NOT* increment + * offset, and returns proto_item* */ +proto_item* +ptvcursor_add_no_advance(ptvcursor_t*, int hf, gint length, gboolean endianness); + /* Frees memory for ptvcursor_t, but nothing deeper than that. */ void ptvcursor_free(ptvcursor_t*); +/* Returns tvbuff. */ +tvbuff_t* +ptvcursor_tvbuff(ptvcursor_t*); + +/* Returns current offset. */ +gint +ptvcursor_current_offset(ptvcursor_t*); + #endif /* __PTVCURSOR_H__ */ |