Ethereal-dev: Re: [Ethereal-dev] Latest Ethereal profiling data ...

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

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Mon, 1 Dec 2003 10:12:57 -0800
On Mon, Dec 01, 2003 at 05:43:46PM +0000, didier wrote:
> BTW, why do we use a pointer for value in field_info (proto.h) and in
> proto_node?
>           fvalue_t                        *value;
> } field_info;

Probably because that was the most straightforward way to deal with
objects of a particular type.

"fvalue_t" is defined in "epan/ftypes/ftypes.h", so the structure is
exported; we could probably have an "fvalue_init()" routine that took a
pointer to an "fvalue_t" and an "ftenum_t" as arguments and initialized
the "fvalue_t" appropriately for that type, and an FVALUE_CLEANUP macro
that calls the free routine for the value if it exists, and include the
"fvalue_t" in the field_info structure.

We could perhaps do the same for "field_info" structures in a
"proto_node" structure.