Hi,
I’m also OK either way but as Pascal says taking the mask into account seems more sane.
How about changing
static
void
proto_tree_set_uint(field_info *fi,
guint32 value)
to return integer and use that.
Regards
Anders
From: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx]
On Behalf Of Pascal Quantin
Sent: den 18 juli 2016 15:40
To: Developer support list for Wireshark <wireshark-dev@xxxxxxxxxxxxx>
Subject: Re: [Wireshark-dev] proto_tree_add_item_ret_uint() returns unmasked value - should it?
I was bugged by the same issue but contrary to Michael, I used the API and added the bit shift / masking manually from the output of proto_tree_add_item_ret_uint...
So I'm fine doing the change to take the mask into account (It would seem saner) but let's coordinate so that we can fix the dissectors accordingly (and not introduce new bugs ;) ).
Or we keep the current behavior but add a big warning in the function header to make the users aware of this behavior.
Pascal.