Wireshark mailing list archives

Re: [Wireshark-dev] Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script.


From: Chris Maynard <Chris.Maynard () gtech com>
Date: Wed, 19 Oct 2011 18:05:05 +0000 (UTC)

Anders Broman <a.broman@...> writes:

Should we use ENC_NA here too to prevent confusion?
My preference is the opposite use ENC_BIG_ENDIAN as that is the 
"natural" encoding for the
protocol  and ENC_BIG_ENDIAN is less confusing in my opinion.

For what it's worth, I agree with Anders here.  I tend to think of the endian as
being associated more with the protocol than with each individual field, so I
would prefer a consistent BIG (or LITTLE as the case may be) endian used 
throughout.

I think this also has other potential advantages, e.g., if a multi-byte field is
incorrectly coded as a 1-byte field then later fixed, or if a single-byte field
is later expanded to a multi-byte field through a protocol update, the
endianness won't have to be changed from ENC_NA to ENC_[BIG|LITTLE]_ENDIAN.  And
of course, the fact that ENC_NA is the same as ENC_BIG_ENDIAN only introduces
more potential problems for little-endian protocols.

- Chris


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: