Wireshark mailing list archives
Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...
From: Bill Meier <wmeier () newsguy com>
Date: Sun, 14 Dec 2014 13:44:19 -0500
On 12/13/2014 4:56 PM, Evan Huus wrote:
I didn't think single-byte fields could really have an endianess, so I thought ENC_NA was appropriate for them? Evan
Using ENC_NA is certainly reasonable (and makes logical sense) for fetching single-byte fields.
That being said, the convention (certainly not enforced) seems to be to use ENC_..._ENDIAN for fetching all integral types.
Looking at the current (non-generated) dissector source before I started making changes, I noted that the usage for singe-byte fetches (for proto_tree_add_item(), etc) was more or less as follows:
ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN: ~12.5K ENC_NA ~ 2.7KI also noted that the ASN.1 generated dissectors appear to be using the ENC_..._ENDIAN convention as well when fetching single-byte fields.
----------If there's a consensus that ENC_NA should be used when fetching single-byte fields, it might be a bit of work, but probably fairly simple to do a wholesale change....
Bill ___________________________________________________________________________ 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:
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Evan Huus (Dec 13)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Bill Meier (Dec 14)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Stephen Fisher (Dec 14)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Bill Meier (Dec 14)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Anders Broman (Dec 14)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Evan Huus (Dec 14)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Jeff Morriss (Dec 14)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Michal Labedzki (Dec 14)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Alexis La Goutte (Dec 14)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Graham Bloice (Dec 15)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Stephen Fisher (Dec 15)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Stephen Fisher (Dec 14)
- Re: [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ... Bill Meier (Dec 14)