Suppose I have a custom protocol called cust_prot. One of the field is of 4 bytes length and has a flag bit as follows:
So, I wanted to know what will be the data structure. I have made the following structure but am not sure whether we need to do masking or not.
Also if someone can provide the way to display that flag bit, it will be very useful. asked 15 Sep '15, 04:29 samprit edited 15 Sep '15, 04:41 |
One Answer:
Use the usual Note that the exact format of the display of the field can be varied by changing the field width (32) and bit mask and using the correct E.G.,: usimg 8 as the field width, a bit mask of 0x08 and an offset of 1 from will display the field as 1 bit in 8 bits. Try experimenting with different values. This is all explained in doc/README.dissector. answered 15 Sep '15, 05:47 Bill Meier ♦♦ edited 15 Sep '15, 05:48 |
If an answer has solved your issue, please accept the answer for the benefit of other users by clicking the checkmark icon next to the answer. Please read the FAQ for more information.