Wireshark mailing list archives

Re: Rename TVB captured length vs reported length


From: Alexis La Goutte <alexis.lagoutte () gmail com>
Date: Tue, 18 Feb 2014 08:44:42 +0100

+1
And don't forget to update release-notes.ascii (about change API/ABI...)



On Tue, Feb 18, 2014 at 4:41 AM, Hadriel Kaplan
<hadriel.kaplan () oracle com>wrote:


+1

I was just using one of those last week and resorted to grep'ing through
the code to find the who set those various tvb "length" values, to figure
out which "length" was which.  Making it sound more similar to
wtap_pkthdr's len vs. caplen is better, which it sounds like your change
would do.

-hadriel


On Feb 17, 2014, at 5:07 PM, Evan Huus <eapache () gmail com> 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?

Evan

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

Current thread: