Add API to expose "expert info" summary.

This is intended for use in expert_add_info_format or proto_tree_add_expert_format to get the "base" string to then append additional information, but I'm sure other uses can be found.
Similar to some of the proto_get_xxx APIs, but still only "create as needed".

Change-Id: Ib76e6ed557c2ae41e0a40957a9efa4bf485909da
Reviewed-on: https://code.wireshark.org/review/10420
Reviewed-by: Michael Mann <mmann78@netscape.net>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Michael Mann 2015-09-07 15:00:11 -04:00 committed by Anders Broman
parent 44a0bafd15
commit bcba9ba0d3
3 changed files with 22 additions and 0 deletions

View File

@ -512,6 +512,7 @@ libwireshark.so.0 libwireshark0 #MINVER#
expert_checksum_vals@Base 1.12.0~rc1
expert_deregister_protocol@Base 1.99.9
expert_get_highest_severity@Base 1.9.1
expert_get_summary@Base 1.99.10
expert_group_vals@Base 1.12.0~rc1
expert_register_field_array@Base 1.12.0~rc1
expert_register_protocol@Base 1.12.0~rc1

View File

@ -410,6 +410,20 @@ expert_registrar_get_byname(const char *field_name)
return hfinfo;
}
/**
* Get summary text of an expert_info field.
* This is intended for use in expert_add_info_format or proto_tree_add_expert_format
* to get the "base" string to then append additional information
*/
const gchar* expert_get_summary(expert_field *eiindex)
{
expert_field_info *eiinfo;
/* Look up the item */
EXPERT_REGISTRAR_GET_NTH(eiindex->ei, eiinfo);
return eiinfo->summary;
}
/** clear flags according to the mask and set new flag values */
#define FI_REPLACE_FLAGS(fi, mask, flags_in) { \

View File

@ -176,6 +176,13 @@ WS_DLL_PUBLIC expert_module_t *expert_register_protocol(int id);
*/
WS_DLL_PUBLIC void expert_deregister_protocol (expert_module_t *module);
/**
* Get summary text of an expert_info field.
* This is intended for use in expert_add_info_format or proto_tree_add_expert_format
* to get the "base" string to then append additional information
*/
WS_DLL_PUBLIC const gchar* expert_get_summary(expert_field *eiindex);
/** Register a expert field array.
@param module the protocol handle from expert_register_protocol()
@param ei the ei_register_info array