Ethereal-dev: Re: [ethereal-dev] cvs commit: ethereal packet-aarp.c

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

From: Laurent Deniel <deniel@xxxxxxxxxxx>
Date: Mon, 04 Oct 1999 00:10:52 +0200
Guy Harris wrote:
> 
> > There is no need to add such a test for each field since testing
> > the presence of the whole header seems to be sufficient (except if we
> > want to decode the fields at the beginning of an incomplete header) ?
> 
> We might want to do that.

Well, ok.

> > But there are some cases where the check is not so trivial (decoding of
> > non '\0' terminated strings
> 
> If it's not '\0'-terminated, it may be counted, in which case one would
> presumably be handing the length of the field to the
> "proto_tree_add_...()" routine, and it could do that check.
> 

Ok.

> > or worst on the data itself for instance),
> 
> ...such as a '\0'-terminated string.

Yes, but this is only a particular (simplest) case ;-)

Ok, if so, we will have to add many FT_XXX types (e.g. FT_LITTLE_UINTX,
FT_BIG_UINTX, FT_NON_C_STRING etc.) and carefully choose the routine
arguments...

Laurent.

--
Laurent DENIEL        | E-mail: deniel@xxxxxxxxxxx
Paris, FRANCE         |         laurent.deniel@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
                      | WWW   : http://www.worldnet.fr/~deniel
    All above opinions are personal, unless stated otherwise.