Wireshark mailing list archives

Re: dissecting bit


From: Jakub Zawadzki <darkjames-ws () darkjames pl>
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.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: