Ethereal-dev: Re: [ethereal-dev] Small patch to ease printing timestamps

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, 18 Oct 1999 18:39:43 -0700 (PDT)
> You could do a combination of 1 and 2, but split the
> conversion/formatting into a separate set of routines.
> 
> That way, the display/filtering code uses a standard format, but the
> application developers can just feed it in the format that it comes from
> their packet - or they can use a simple standardized routine for doing
> the conversion to pass in.
> 
> You could use the BASE_* field to overload for time format conversions.
> 
> One possbility is also going to a field-type/field-sub-type mechanism,
> although that would likely be messier in some aspects.

Hmm.  Perhaps the field type could split into field-type and
field-subtype bitfields, so you could still have a single type value?

(Or perhaps we could have the set of field types be expandable, with
types having, say, routines to:

	generate a text-form display of the data, to use when
	constructing the text for the protocol tree;

	parse a text-form version of the data, to use when parsing
	display filters;

	extract the data from a packet and put it into a format for
	comparison;

and then a dissector could add its own types without having to assault
"proto.c" directly.  A "type" value might then be what you get back from
a routine that registers a type.)