I have a custom header as {version[2 bits], control[8 bits], high[6 bits], low[11 bits], index[5 bits]} I am trying to create the data structure for my dissector plugin and I am having trouble with it. Currently my structure looks like this:
Please help me get the correct structure. |
Change the '0x0' fields to applicable values for a bitmask to get desired field values. I am currently stuck. Can you please show an example as to what value should I change it to.
(25 Sep '15, 05:46)
samprit
It always helps to look at other dissectors to see how they addressed the issue at hand. Of course you'll need to understand that dissectors protocol as well, but who doesn't know about IPv4? So have a look at packet-ip.c and see how the structures are setup for some of their fields covering only a few bits of an octet. Oh, and for more details checkout doc/README
(25 Sep '15, 06:52)
Jaap ♦
|