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

How to add text to register

0

I would like to have proto_tree_add_text() in static hf_register_info hf[] = {}... i.e. i would like to display the text in the pane2 as a column in pane1....

This question is marked "community wiki".

asked 06 Sep '11, 22:54

flashkicker's gravatar image

flashkicker
109131919
accept rate: 41%


One Answer:

1

With proto_tree_add_text(), there is only a text label placed in pane2. If you want to use the data as a field (to be able to filter on it and add it as a column), you will need to use one of the other proto_tree_add_* functions (that do use a hf variable).

answered 07 Sep '11, 00:19

SYN-bit's gravatar image

SYN-bit ♦♦
17.1k957245
accept rate: 20%

ya since we dont have hfindex in it we cant add it ...do we have a function where we can add hex elements into the pane1 i would like 16 bytes from the raw data to be separated by a single whitespace under a single name

(07 Sep '11, 00:32) flashkicker

Have a look at all the proto_tree_add_* functions in epan/proto.h

I think proto_tree_add_bytesformat() would fit your need best.

(07 Sep '11, 00:51) SYN-bit ♦♦

yes it does.... i'm now checking it out now.... :)...Thanks a lot

(07 Sep '11, 01:10) flashkicker

Done its up and working

(07 Sep '11, 01:33) flashkicker