Wireshark-dev: Re: [Wireshark-dev] dissector array display handling

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Fri, 02 Jul 2010 12:53:36 -0400
Manthos S. wrote:
Dear experts,

i am about to improve my dissector (diverse LTE Protocols).

Is there any array handling in wireshark code to use for displaying the arrays of data properly in the packet details field?

What i mean: I want to display the content of the arrays in an array style with box brackets. I should be able to choose how many elements of the array should be displayed by getting a value from somewhere else in the packet with tvb_get for example.

There's no API to do that automatically.

But a simple for loop with some proto_tree_add*_format() calls would do it easily enough. (The _format part being necessary so you can put the brackets and index in the tree.)