Wireshark-dev: Re: [Wireshark-dev] CRC32 representation
From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Mon, 16 Apr 2018 09:34:21 -0400


On Fri, Apr 13, 2018 at 4:33 AM, Anton Glukhov <anton.a.glukhov@xxxxxxxxx> wrote:
Hi all,

I wonder what's the best choice to represent CRC32 little-endian checksum? Should It be represented "as is"(exactly how it goes on wire) or I should flip it to show it in correct number form. Example: I have valid crc32 for some data: 0x01020304, it represented in pcap file as 0x04030201. Should I flip it to show it to user or it's better to keep it as is?

You might want to use proto_tree_add_checksum() to add your checksum to the tree--it does all the work for you.  (It will display the data in human-readable form--i.e., "flipped.")