For the dissector I'm creating I have to dissect 11 bits from two bytes. The bytes in the hex dump are: CF 81 which is the following in binary: 1100 1111 1000 0001 However, I need the bytes organized as: 81 CF So I can get the bits as: 1000 0001 1100 1111 Where the bolded bits are the bits of interest. My attempt was to store the two bytes in a separate variable using the tvbuf:bitfield() method. Then, after extracting the 11 bits desired, adding them to the display tree with tree:add_le() method. However, I am not getting the proper value. Thank you for your consideration! asked 14 Dec '16, 16:03 Irfan Hossain |
One Answer:
Are you having trouble getting the data in the dissection tree correctly or in your local variable correctly? If the former then you should be able to use answered 04 Jan '17, 06:27 JeffMorriss ♦ |
Thank you for your answer! The original problem was fixed a different way due to the data organization, but this fixed another issue I had with endianess. Thanks!