Re: [Wireshark-dev] CRC32 representation

2018-04-16 Thread Jeff Morriss
On Fri, Apr 13, 2018 at 4:33 AM, Anton Glukhov 
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.")
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

[Wireshark-dev] CRC32 representation

2018-04-13 Thread Anton Glukhov
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?

Best regards,
Anton
___
Sent via:Wireshark-dev mailing list 
Archives:https://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe