Wireshark-dev: [Wireshark-dev] Re: What to do with tvb_get_bits()

Date Prev · Date Next · Thread Prev · Thread Next
From: Jaap Keuter <jaap.keuter@xxxxxxxxx>
Date: Thu, 20 Feb 2025 20:17:04 +0100
Hi,

Ehm, yes, this is what you can do with tvb_get_bits32(), ie., read 1-32 bits into a 32 bit variable.
That won’t change, only the implicit tvb_get_bits(), which is an alias for the explicit tvb_get_bits32(), would be deprecated.

Thanks,
Jaap

On 19 Feb 2025, at 23:28, Anders Broman <a.broman58@xxxxxxxxx> wrote:

Personally I think I prefere tvb_get_bits() which can read 1-32 bits into a 32 bit variable.
Anders


Den ons 19 feb. 2025 23:08Jaap Keuter <jaap.keuter@xxxxxxxxx> skrev:
Hi List,

Following [1] we should have no more calls to tvb_get_bits() in our code base anymore.
This then opens up the possibility to deprecate this function in favour of tvb_get_bits_[8|16|32]().
Would this deprecation cause unforeseen problems, or would this help to clean up our API?

Thanks,
Jaap