This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

BIG endian format display

0

Hi all,

I have put the encoding format in the proto_tree_add_item as ENC_BIG_ENDIAN. Will it show the values as calculated for Bid Endian when I call the corresponding dissector function for that PDU ? For example, 0x0102 will have its value displayed as 0x0201??

Please give a feedback .

asked 13 Jun '14, 04:36

Amit%20Bhanja's gravatar image

Amit Bhanja
11224
accept rate: 0%


One Answer:

1

If you have a 2-byte field, where the first byte is 0x01 and the second byte is 0x02, then:

  • if you add that two-byte field with ENC_BIG_ENDIAN, its value will be 0x0102;
  • if you add that two-byte field with ENC_LITTLE_ENDIAN, its value will be 0x0201.

answered 13 Jun '14, 17:01

Guy%20Harris's gravatar image

Guy Harris ♦♦
17.4k335196
accept rate: 19%