Wireshark-dev: Re: [Wireshark-dev] how to extract "IP.len" (IP_total length) to my local variab
From: Guy Harris <[email protected]>
Date: Fri, 24 Jun 2011 12:37:06 -0700
On Jun 24, 2011, at 12:25 PM, John x wrote:

> but how to get the location (called offset, right?) value? since I need to reach to the last byte of the packet

Offsets within the tvbuff containing your packet start at 0, so if your packet is N bytes long, the offset of the last byte of the packet is N-1.

Subtract 1 from the result of tvb_reported_length(); that's the offset to use.