First time here? Check out the FAQ!
THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

WSGD Bitfields and byte order

Hi,

I am trying to dissect a protocol with Wireshark Generic dissector. Byte order is big endian for the protocol but bit order is LSB. Relevant fields are below:

enum1 Truth
{
    FALSE 0
    TRUE 1
} 

struct Message
{

   .....

   .....

    Truth[8] fastEth;

    Truth[3] gigaEth;

   .....

   .....
}

When I receive a message in which fastEth[0]=TRUE and rest is FALSE. Dissector shows fastEth[7]=TRUE and rest as FALSE, values are shown as reversed.

  • WSGD has a keyword for byte order (byte_order=big_endian). How can I handle bit order in this situation?

  • Also can I only define bitfieldN when N is multiple of 8?

Thanks

bilgehan's avatar
1
bilgehan
asked 2019-03-22 07:44:56 +0000
grahamb's avatar
23.8k
grahamb
updated 2019-03-22 13:02:36 +0000
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

Does this page on bitfields in WSGD help?

grahamb's avatar
23.8k
grahamb
answered 2019-03-22 11:24:55 +0000
edit flag offensive 0 remove flag delete link

Comments

bitfieldN : N must be 8 16 24 or 32

wsgd's avatar wsgd (2020-01-31 20:30:59 +0000) edit
add a comment see more comments
0

wsgd does NOT manage bit order


On the displayed example

  • wsgd see 11 data (each of 1 bit)
  • wsgd do not see any group of data

Is the example supposed to show ? :

  • ... no bit order
  • 8 bits where a bit order should be applied
  • 3 bits where a bit order should be applied
  • ... no bit order
wsgd's avatar
91
wsgd
answered 2020-01-31 20:58:53 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer