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

Wireshark-dev: [Wireshark-dev] How to retrieve text displayed for a proto_item ?

From: Teto <mattator@xxxxxxxxx>
Date: Thu, 22 Dec 2011 15:25:45 +0100
Hi everybody,

Easy question despite I couldn't find the answer. Here is an example -
not a real one - of what I would like to do:

proto_item* pi = proto_tree_add_text(tree, tvb, offset, 4, "Sub-tlvs number" );
col_add_fstr(cinfo, COL_INFO, "test: %s" ,
get_displayed_text_of_proto_item(pi) );

It woud ideally display  "Sub-tlvs number" in COL_INFO part. So what's
the equivalent for "get_displayed_text_of_proto_item(pi)". I tried
with PITEM_FINFO(subtree)->hfinfo->name but seems like the wrong part
(displayed nthg).

Regards
Matt