Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-15 Thread Stephen Fisher
On Mon, Dec 15, 2014 at 08:23:47AM +0100, Michal Labedzki wrote: > Personally I prefer ENC_NA for single-byte. Me too. How about changing proto_tree_add_item() so that the endian field is optional? Single byte: proto_tree_add_item(tree, proto_test, tvb, 0, 1); Multi-byte: proto_tree_add

Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-15 Thread Graham Bloice
On 15 December 2014 at 07:52, Alexis La Goutte wrote: > > > Yes, Petri-dish/pre-commit is guard but need all people use it... > > +1 -- Graham Bloice ___ Sent via:Wireshark-dev mailing list Archives:http://www.wire

Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-14 Thread Alexis La Goutte
Hi, I prefer also ENC_NA for single-byte. I think, it will be complicated to have a automatically tools for check if ENC_BIG_ENDIAN and ENC_LITTLE_ENDIAN will be autorise.. Yes, Petri-dish/pre-commit is guard but need all people use it... Regards, On Mon, Dec 15, 2014 at 8:23 AM, Michal Labedzk

Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-14 Thread Michal Labedzki
Personally I prefer ENC_NA for single-byte. Some dissectors can mix endianess, like file-elf. What use in case like that? Maybe there is a need to add something new like ENC_NO_ENDIAN? (ENC_HOST_ENDIAN?) That can be used to fetch value that is always in host endian (magic number?) By the way: I

Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-14 Thread Jeff Morriss
On 12/14/2014 03:03 PM, Bill Meier wrote: On 12/14/2014 2:22 PM, Stephen Fisher wrote: On Sun, Dec 14, 2014 at 01:44:19PM -0500, Bill Meier wrote: That being said, the convention (certainly not enforced) seems to be to use ENC_..._ENDIAN for fetching all integral types. Could this be related

Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-14 Thread Evan Huus
On Dec 14, 2014 3:04 PM, "Bill Meier" wrote: > > On 12/14/2014 2:22 PM, Stephen Fisher wrote: >> >> On Sun, Dec 14, 2014 at 01:44:19PM -0500, Bill Meier wrote: >> >>> That being said, the convention (certainly not enforced) seems to be >>> to use ENC_..._ENDIAN for fetching all integral types. >>

Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-14 Thread Anders Broman
Den 14 dec 2014 21:03 skrev "Bill Meier" : > > On 12/14/2014 2:22 PM, Stephen Fisher wrote: >> >> On Sun, Dec 14, 2014 at 01:44:19PM -0500, Bill Meier wrote: >> >>> That being said, the convention (certainly not enforced) seems to be >>> to use ENC_..._ENDIAN for fetching all integral types. >> >>

Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-14 Thread Bill Meier
On 12/14/2014 2:22 PM, Stephen Fisher wrote: On Sun, Dec 14, 2014 at 01:44:19PM -0500, Bill Meier wrote: That being said, the convention (certainly not enforced) seems to be to use ENC_..._ENDIAN for fetching all integral types. Could this be related to when we made the change from using FALS

Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-14 Thread Stephen Fisher
On Sun, Dec 14, 2014 at 01:44:19PM -0500, Bill Meier wrote: > That being said, the convention (certainly not enforced) seems to be > to use ENC_..._ENDIAN for fetching all integral types. Could this be related to when we made the change from using FALSE / TRUE to specify if its "big endian" in

Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-14 Thread Bill Meier
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 (cert

Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when fetching FT_U?INT8 fields ...

2014-12-13 Thread Evan Huus
I didn't think single-byte fields could really have an endianess, so I thought ENC_NA was appropriate for them? Evan On Sat, Dec 13, 2014 at 1:45 PM, Wireshark code review wrote: > URL: > https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=f412c9a01aa031ef9f024ee1b8ec60bf4a73edb