wireshark-dev October 2010 archive
Main Archive Page > Month Archives  > wireshark-dev archives
wireshark-dev: [Wireshark-dev] How to display data with variable

[Wireshark-dev] How to display data with variable length?

From: Agustin Figueredo Canosa <dvs_at_nospam>
Date: Mon Oct 18 2010 - 11:09:31 GMT
To: wireshark-dev@wireshark.org

I want display data with variable length with my disector.
I have defined it in hf_table using:

                        { "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,

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?


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