Ask Your Question

Revision history [back]

byte_order=big_endian bit_order=LSB

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?

Thanks

click to hide/show revision 2
None

byte_order=big_endian bit_order=LSB

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

Truth { FALSE 0 TRUE 1 }

{

struct Message { .....

FALSE 0

..... Truth[8] fastEth;

TRUE 1

Truth[3] gigaEth; .....

}

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?

Thanks

byte_order=big_endian bit_order=LSB

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

byte_order=big_endian bit_order=LSB

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