ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
April 17th, 2024 | 14:30-16:00 SGT (UTC+8) | Online

Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] master f412c9a: Use ENC_BIG_ENDIAN when

From: Alexis La Goutte <alexis.lagoutte@xxxxxxxxx>
Date: Mon, 15 Dec 2014 08:52:50 +0100
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 Labedzki <michal.labedzki@xxxxxxxxx> wrote:
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 use ENC_NA to improve readability too. I take a quick
look and see my single-byte field, where around is a lot of multibyte
fields.

About copy-paste bugs: now there is a guard like Petri-Dish/pre-commit.

On 15 December 2014 at 01:43, Jeff Morriss <jeff.morriss.ws@xxxxxxxxx> wrote:
> 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 to when we made the change from using FALSE / TRUE
>>> to specify if its "big endian" in things like proto_tree_add_item() ?
>>
>>
>>
>> Good point !
>>
>> fix-encoding-args.pl (used to do the change) just converted FALSE|0 to
>> BIG_ENDIAN and etc, so the "convention" actually kind-of-happened
>> because previously TRUE|1 or FALSE|0 were the only choices for the
>> 'encoding-arg".
>>
>> So, I stand corrected.
>>
>> Maybe what I should be doing is converting all the single-byte fetches
>> to use ENC_NA.
>>
>> Thoughts ?
>
>
> We discussed this some time ago; the consensus at the time seemed to be use
> ENC_*_ENDIAN for 1-byte fields:
>
> https://www.wireshark.org/lists/wireshark-dev/201107/msg00404.html
>
>
> ___________________________________________________________________________
> Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
> Archives:    http://www.wireshark.org/lists/wireshark-dev
> Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
>             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe



--

Pozdrawiam / Best regards
-------------------------------------------------------------------------------------------------------------
Michał Łabędzki, Software Engineer
Tieto Corporation

Product Development Services

http://www.tieto.com / http://www.tieto.pl
---
ASCII: Michal Labedzki
location: Swobodna 1 Street, 50-088 Wrocław, Poland
room: 5.01 (desk next to 5.08)
---
Please note: The information contained in this message may be legally
privileged and confidential and protected from disclosure. If the
reader of this message is not the intended recipient, you are hereby
notified that any unauthorised use, distribution or copying of this
communication is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the message and deleting it from your computer. Thank You.
---
Please consider the environment before printing this e-mail.
---
Tieto Poland spółka z ograniczoną odpowiedzialnością z siedzibą w
Szczecinie, ul. Malczewskiego 26. Zarejestrowana w Sądzie Rejonowym
Szczecin-Centrum w Szczecinie, XIII Wydział Gospodarczy Krajowego
Rejestru Sądowego pod numerem 0000124858. NIP: 8542085557. REGON:
812023656. Kapitał zakładowy: 4 271500 PLN
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe