Wireshark-dev: Re: [Wireshark-dev] Undissected reserved fields
Date Prev · Date Next · Thread Prev · Thread Next
From: Michal Labedzki <michal.labedzki@xxxxxxxxx>
Date: Sun, 1 Mar 2015 13:58:48 +0100
Personally, I always dissect reserved fields. Please do not forget
that there are many bit-reserved fields too. This probably implies
that we want to create filter for them (hf items), to keep the same
look for all fields in bitfield. I am not sure if _ws.reserved is fine
in bitfield. For other fields, I think also is good idea to create new
filters, because purpose of reserved field is to be used in future,
right? (in my practise... I think not...)

proto_tree_add_reserved_mbz()? (if use _ws.reserved)
Or maybe...
proto_tree_add_item(..., ENC_LITTLE_ENDIAN | ENC_MBZ)?  # ENC_MBZ,
seems to be similar format like ENC_ASCII, ENC_UTF8... By the way...
Add expert info if ENC_ASCII is not ASCII? The same for UTF8.

On 28 February 2015 at 00:08, Sean O. Stalley <sean.stalley@xxxxxxxxx> wrote:
> +1. Would use this API if added (especially if it could be used for bitfields).
>
> -Sean
>
> On Fri, Feb 27, 2015 at 01:06:04PM -0800, Guy Harris wrote:
>>
>> On Feb 27, 2015, at 10:28 AM, Jeff Morriss <jeff.morriss.ws@xxxxxxxxx> wrote:
>>
>> > My opinion (which I've voiced on this list many times over the past ~10 years) is that such fields SHOULD be dissected.  Even better they should have an Expert Info if they are supposed to be 0 and aren't (Guy had suggested on a bug or somewhere that we should have an API with a name that includes "mbz"--for Must Be Zero--which would add the Expert Info automatically).
>>
>> It was in the thread that started here:
>>
>>       https://www.wireshark.org/lists/wireshark-dev/201402/msg00131.html
>>
>> and I suggested both proto_tree_add_spare() (for fields that are spare and *not* required to be zero) and proto_tree_add_mbz() (for fields that *are* required to be zero) in
>>
>>       https://www.wireshark.org/lists/wireshark-dev/201402/msg00135.html
>>
>> Neither of those take an hf_ value as an argument, so they don't clutter the list of filterable fields with a bunch of individual values for each set of spare bits; to look for "must be zero but isn't", you'd look for the expert info.
>> ___________________________________________________________________________
>> 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
> ___________________________________________________________________________
> 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