Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Expert info is now filterable!

From: Christopher Maynard <Christopher.Maynard@xxxxxxxxx>
Date: Sat, 25 May 2013 14:07:56 +0000 (UTC)
 <mmann78@...> writes:

> For those of you that aren't masochists and follow the bug mailing list, I 
> added support for "(display) filterable" expert info. Expert info can now 
> also be used as a display filter.   And just like the proto_tree_add_text 
> to proto_tree_add_item conversion, there's work to be done making all the 
> expert info calls filterable.

Nice!

> Quick synopsis:
> expert_add_info - used for static strings
> expert_add_info_format_text - used for formatted (printf) strings

> I'd eventually like to replace the existing expert_add_info_format with the 
> expert_add_info_format_text signature when the conversions are complete 
> because I think it's the more appropriate name.

I was wondering about the naming convention here.  proto_tree_add_text() is
for adding text that isn't filterable, but expert_add_info_format_text(),
even if temporary, would be for adding fields that are filterable.  Would it
be better to use the proto* naming convention, something like:

expert_add_info -> expert_add_info_string
expert_add_info_format_text -> expert_add_info_item()

And come to think of it, this is the "expert info" API, so maybe it should be:

expert_info_add_string
expert_info_add_item