This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

Editing info column of dissector

0

I am trying to edit an existing dissector to make it display some values in the info column. Currently, I am able to do this to a certain extent and display values that come from a value_string array, using the val_to_str function. However, now I want to be able to display other values that are contained within an array of the type hf_register_info.

I am having trouble doing this with the val_to_str function and wondering if there is a different function I would have to use or if/how it can be done with val_to_str.

Here is part of the array I am trying to take the data from.

static hf_register_info hf[] = { { &hf_pfcp_vc_base_port, { "PFCP VC Base Port", "pfcp.vc_base_port", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL } } }

Thanks for any help.

asked 16 Jul '12, 07:55

bball2601's gravatar image

bball2601
16567
accept rate: 50%


One Answer:

0

What do you want to extract from the hf_ field? You might want to look at proto_tree_fill_label().

answered 23 Jul '12, 07:18

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%