Ethereal-dev: [ethereal-dev] Surely, I missed something...
Guy and Gilbert please explain to me what I missed in the usage
of the proto_tree_add_xxx routines.
At the beginning we had proto_tree_add_item[_{hidden,format}]
and proto_tree_add_text which allow the user to add respectively a
registered or free text field format to the protocol tree.
Now we have many proto_tree_add_xxx[_{hidden,format}] routines which
allow to easily control the field display. Good. But what I do not
understand is the usage (in many dissectors) of a specific
proto_tree_add_xxx routine (said add_boolean) if in the registration
process we already know the type (i.e. FT_BOOLEAN), why not using
proto_tree_add_item in that case ? and what happens if we do a
proto_tree_add_xxx on an hfinfo item field of type FT_YYY ?
Could you tell me also if some of them are not intended to work with a
NULL tvbuff ? the ones that do not have the value in argument, I think ?
Laurent.
PS: I hate to have to change many plugins in order to use the correct
add_xxx call according to the field type (add_item was better :-),
or would it be simpler to use tvbuff ??
--
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.