aboutsummaryrefslogtreecommitdiffstats
path: root/epan/expert.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-09-07 15:00:11 -0400
committerAnders Broman <a.broman58@gmail.com>2015-09-08 04:45:19 +0000
commitbcba9ba0d3341e3ad1c506d7dd9c762e5129a9b0 (patch)
tree4d355f2abccf2e8641e67fe32139447e51ff2456 /epan/expert.c
parent44a0bafd15a8d1e606f87198f679a5fec1a4bfd2 (diff)
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>
Diffstat (limited to 'epan/expert.c')
-rw-r--r--epan/expert.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/epan/expert.c b/epan/expert.c
index 9dd53863fb..f8017216c7 100644
--- a/epan/expert.c
+++ b/epan/expert.c
@@ -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) { \