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: Guy Harris <guy@xxxxxxxxxx>
Date: Mon, 4 Oct 1999 14:38:05 -0700 (PDT)
> > The endianness could perhaps be separate from the type.  In most cases,
> > the endianness of a given field is fixed, and could be in another field
> > of the "header_field_info" structure, and not have to be passed as an
> > argument.
> 
> Yep. But in a general case, it is preferable to have this information as
> a proto_tree_add_... routine parameter.

That's another possibility, i.e. have the "proto_tree_add_...()" calls
take an endianness flag as an argument - for numerical (and enumerated)
multi-byte quantities, you have to specify the endianness near the call
currently, in that you have to use either "pntoh[ls]" or "pletoh[ls]" to
fetch the value.

> And maybe the delimiter in a proto_tree_add parameter (or in the structure)
> so that we can specify for instance '\n' or "\r\n" or other non standard
> delimiters.

In that case, the delimiter should perhaps be "line ending", rather than
an explicit "\n" or "\r\n", so that it can cope with "\n" or "\r\n".