Wireshark-dev: Re: [Wireshark-dev] How to get absolute frame/packet index in buffer?
From: "Sebastien Dubois" <[email protected]>
Date: Thu, 18 Oct 2007 15:43:24 -0400
Title: RE: How to get absolute frame/packet index in buffer?

Yes that's exactly it! Sorry for the confusion.
I tried TVB_RAW_OFFSET and it works just fine.  Thanks all for the info.
/S
-------------------------------------------------------------------------------------------------------------
From: Guy Harris <[email protected]>
Date: Thu, 18 Oct 2007 12:38:36 -0700

Sebastien Dubois wrote:

    The protocol I'm trying to dissect has messages that include pointers that point to other element within the message. These pointers values are the offset from the start of the message I'm trying to dissect. I would have liked to add the offset from the start of the frame/packet to the display, so that users can easily correlate the pointers values with the binary output buffer shown in the dissection panel.

So it sounds as if you really want the offset from the beginning of the data displayed in the hex pane when you click on something from your protocol, not necessarily from the beginning of the link-layer frame; if your protocol is encapsulated in a reassembled frame, the data in the hex pane would be the reassembled data.

If so, TVB_RAW_OFFSET() should do the job.

-------------------------------------------------------------------------------------------------------------------------------------------------------