Ethereal-dev: Re: [ethereal-dev] Dissector exceptions

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

Date: Wed, 10 May 2000 09:06:07 +0200
> Given a sequential accessor for tvbuffs, how would you like
> to add the data to the proto_tree? The current proto_tree_add_*()
> routines take an offset and a byte length.

That's the big problem here ;-)

> One way would be to provide proto_tree_add_*() routines that
> take a tvbuff_cursor_t* as an argument, and the routine directly
> queries the cursor about the offset and length of its previous
> access. You'd have to call the proto_tree_add*() function
> before using the cursor again, though.

If one permitted signed values, one could go back in the buffer.

Or create a tvbuff_cursor_set_location( offset, bit);

Where you can move around the buffer arbitrary (sp?) 

-- 
Andreas Sikkema
andreas.sikkema@xxxxxxxxxxx
"Standing barefoot in a river of clues, most people would 
         not get their toes wet." - Brian Kantor in a.s.r.