Ethereal-dev: Re: [ethereal-dev] Dissector question: variable length structures

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

From: Craig Rodrigues <rodrigc@xxxxxxxxxxxx>
Date: Fri, 14 Jul 2000 11:03:19 -0400
On Fri, Jul 14, 2000 at 09:42:41AM -0500, Gilbert Ramirez wrote:
> On Fri, Jul 14, 2000 at 09:14:38AM -0500, Craig Rodrigues wrote:
> > 
> > 
> > Hi,
> > 
> > variable length data structures?  For example, IIOP
> > defines a string which is represented by it's length n, followed
> > by n + 1 bytes which contain the actual string (with other encoding
> > schemes for wide characters).  Is there a glib structure that I can
> > use?  I'm a bit lazy to do all the memory management by myself. :)
> 
> 
> Do you have to actually manipulate the string (that is, put it into
> a C variable and do something with it), or do you only have to put
> it into the protocol tree? (in which case, the existence of

For now, I think putting it in the protocol tree would be sufficient.
However, I just gave the string as an example, because it is
the simplest one.  CORBA defines other more complicated data structures
which are variable length, so I was just wondering how this sort
of thing was done in other dissectors.

-- 
Craig Rodrigues        
http://www.gis.net/~craigr    
rodrigc@xxxxxxxxxxxx