Wireshark-dev: [Wireshark-dev] How to dissect bits

From: Manojkiran Eda <manojkiran.eda@xxxxxxxxx>
Date: Thu, 28 Apr 2022 12:02:45 +0530
Hi All,

I am a wireshark newbie & I am trying to write a new dissector from scratch and I am looking for the best way to dissect the presence bits in a bit field based on position.

My problem is :
I have 64 bit data represented in the form of a bitfield, where the presence of b1 at a particular position tells if a particular command is supported. This 64 bit data is used for conveying how many commands(max supported is 64) are implemented.

I am trying to look at https://github.com/wireshark/wireshark/blob/master/doc/README.developer to understand what API's that i can use to acheive this - and also the best way to show this information in wireshark GUI, but haven't got any success so far.

Can anyone help point me to any leads/examples of how I can do this.


Thanks,
Manoj