Wireshark mailing list archives

How to display data with variable length?


From: "Agustin Figueredo Canosa" <dvs () alu uma es>
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

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: