On 02/17/14 17:07, Evan Huus wrote:
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?
+1 from me.
One of the emails from this thread:
https://www.wireshark.org/lists/wireshark-dev/200909/msg00291.html
has been sitting in my "todo" list for, well, coming up on 5 years!