On Sat, May 01, 2004 at 05:19:16PM +0200, Ulf Lamping wrote:
> Instead of putting this additional field information into the
> hf_register_info data at protocol registry (which is too inflexible),
> this info should be stored in the field_info while adding the the items
> to the proto_tree, just replacing the current visible field (currently
> used as a single flag only :-).
That sounds reasonable - although it might still be useful to allow a
registered field to have a "default" set of field values, so that you'd
only need to set the flags if the value wasn't the default.
If we add that as an additional field to the header_field_info
structure, that means changing most dissectors to add the field - that
can probably be done with a script, but it's still a big change - and
changing scripts that mechanically generate header_field_info tables.
However, as the default value of the vast majority of fields is probably
0 (i.e., no flags set), it might not be worth adding that capability.
> This flag field could also keep other field specific information, like a
> more general way of marking bad packets (e.g. when a checksum failed).
Yes, that'd be useful as well.