Wireshark-dev: [Wireshark-dev] Rename TVB captured length vs reported length
From: Evan Huus <eapache@xxxxxxxxx>
Date: Mon, 17 Feb 2014 17:07:04 -0500
After yet another patch submission where this was unclear, I would
like to propose the following change:

tvb_length, tvb_length_remaining, etc. are changed to all operate on
the reported length on the wire

tvb_reported_* are dropped in favor of tvb_captured_* which operate on
the available captured length (what is currently given by just
tvb_length).

The problem is that 95% of the time the intended behaviour is best
achieved by the reported length, but 95% of the time people new to the
API pick up on tvb_length and friends and assume that's what they
want. I realize this is a subtly breaking behavioral change to the
API, but I figure in the long run it will make a lot of things much
simpler. It also gives a mental model which is IMHO slightly nicer:
the TVB represents the entire packet with potentially-incomplete
backing data, instead of representing the backing data of a
potentially-bigger-on-the-inside packet.

Thoughts?

Evan