Wireshark-dev: Re: [Wireshark-dev] dissecting bit
From: Jakub Zawadzki <[email protected]>
Date: Wed, 18 May 2011 17:33:16 +0200
On Wed, May 18, 2011 at 10:19:36AM -0400, Brian Oleksa wrote:
> Below is all the my current code base and screen shots. Also attached is 
> the layout of the packet:

Please don't write in HTML and don't send screenshots to the mailing list, 
it might be only 323 kB or 100 kB, but when you multiply it by XXX users 
it becomes MB's.

> [...]

Wireshark _bit* API accept cases where 0 bit is MSB (0x80),
and 7 bit is LSB (0x01).

Reading MIL-STD-2045-47001C spec this is reversed, i.e. 
0-bit is LSB (0x01 or 2^0) aand 7-bit is MSB (0x80 or 2^7)

Bit endianess [1] in tvb_get_bitsN() is not supported,
so you need to implement it.

Working with bits is really phun, so enjoy! ;-)

[1] http://en.wikipedia.org/wiki/Bit_numbering

Cheers,
  Jakub.