Wireshark-dev: Re: [Wireshark-dev] Question for how to show the value of Length rightin wiresha
From: "li yang" <[email protected]>
Date: Mon, 30 Apr 2007 10:21:34 +0800
Thanks for your help
I fixed the problem!!

By the way, how could I declare two fields if they are stored in 1 Byte ?
eg:

|   Flag   | MsgCount |
  1bit         7 bits

On 28/04/07, Guy Harris <[email protected]> wrote:
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().
_______________________________________________
Wireshark-dev mailing list
[email protected]
http://www.wireshark.org/mailman/listinfo/wireshark-dev


--
Best Regards
Li Yang
13511066153