ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] Question for how to show the value of Length rightin wiresha

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Fri, 27 Apr 2007 09:16:48 -0700
Kukosa, Tomas wrote:

the last parameter of proto_tree_add_item() function /which you probably
use to add field into the tree/ indicates if ineger field is little or
big endian. Fot little endian (your case) it has to be TRUE.

Or use proto_tree_add_uint() and the value fetched with tvb_get_letohs().

You should use e.g. FT_BYTES for your data field, it has variable
length.

...using the length fetched with tvb_get_letohs().