Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] Dissect a packet base header bits

From: Stephen Fisher <stephentfisher@xxxxxxxxx>
Date: Wed, 7 Mar 2007 22:06:59 -0800
On Wed, Mar 07, 2007 at 09:32:50PM -0800, Steven Le wrote:

> How can I display bit fields in the same byte in wireshark? Is it right to
> add item with same offset and register header with bitmasking?

Yes, you would put field registrations with a bitmask specified there 
instead of 0x0.  You then don't need to do any bitmasking if you use 
proto_tree_add_item().

> If yes, which ft type should I use in example below?  FT_UINT8??

> For example, in first byte:
> 7   6   5   4   3   2   1  0

Yes, FT_UINT8 would work.


Steve