Wireshark mailing list archives

Re: proto_tree_add_item_ret_uint() returns unmasked value - should it?


From: Michael Mann <mmann78 () netscape net>
Date: Mon, 18 Jul 2016 09:04:43 -0400


I've been wondering that myself, and I'm leaning towards "yes it should" because there have been many cases where I 
couldn't use proto_tree_add_item_ret_uint where I wanted to because masks were involved.
 
 
-----Original Message-----
From: Anders Broman <anders.broman () ericsson com>
To: wireshark-dev <wireshark-dev () wireshark org>
Sent: Mon, Jul 18, 2016 8:45 am
Subject: [Wireshark-dev] proto_tree_add_item_ret_uint() returns unmasked value - should it?



Hi,
proto_tree_add_item_ret_uint() returns the value corresponding to the length of the value fetched e.g uint8, uint16 etc 
but does not take the mask of
the hf entry into consideration which lead to a bug in an proprietary dissector I have.
Should it in fact return the value displayed in the corresponding hf variable e.g take the mask into consideration?
Regards
Anders   

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

Current thread: