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 display data with variable length?

From: "Agustin Figueredo Canosa" <dvs@xxxxxxxxxx>
Date: Mon, 18 Oct 2010 13:09:31 +0200 (CEST)
I want display data with variable length with my disector.
I have defined it in hf_table using:

{&hf_xxx_data,
			{ "Data",           "xxx.data",
			FT_UINT64, BASE_HEX,
			NULL, 0x0,
			NULL, HFILL }

And I have use
proto_tree_add_item(xxx_tree, hf_xxx_data, tvb, offset, xxx_data_length,
FALSE);

Where xxx_data_length is known.

So it´s always displayed with 64bits (in hex) but this field is variable,
so many times it shows the info preceded by 0's. Could I hide the 0´s?
Should I defined this field using another format?

Thanks