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] Dissecting bit fields

From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Mon, 29 Jan 2007 20:20:53 +0100 (CET)
Hi,

Ehh, I could point you to packet-bacnet.c which has a typical way of
implementing dissection of a bitfield. Look up the FT_BOOLEAN symbol and
see how these fields are decoded.

Thanx,
Jaap

On Mon, 29 Jan 2007, Kai Blin wrote:

> Hi folks,
>
> I was wondering if there was a nice method to dissect a 32bit bit field, other
> than reading it into 32 seperate variables and dissecting it 32 times with a
> different bit flag (which seems to be the method of choice in the dissectors
> I looked up).
>
> Cheers,
> Kai
> --
> Kai Blin, <blin At gmx Dot net>
> WorldForge developer    http://www.worldforge.org/
> Wine developer          http://wiki.winehq.org/KaiBlin/
> --
> Ninjas and Pirates agree: Cowboys suck!
>