Wireshark-dev: Re: [Wireshark-dev] How to find start of header in buffer (if not starting at 0t
From: Natalie Shapira <nd1234@xxxxxxxxx>
Date: Sun, 28 Jul 2013 08:05:17 +0300
Hi Hardik,
I use it that way:

descriptor_tvb = tvb_new_subset(nmi_tvb, 4, -1, -1);   // descriptor_tvb is a pointer to the tvb in offset of 4 bytes from the beginning
desc_tvb_remain_length = tvb_length(descriptor_tvb);

Natalie.


On Fri, Jul 26, 2013 at 11:47 AM, Hardik Patel <hardik.party@xxxxxxxxx> wrote:
Hello,

In normal case packet header start at 0th byte of buffer, but in case of packet reassembled my packet header start after some offset.


Inline image 1


In  above case my packet header start at 7th byte of buffer .

so i need to know what is length of individual buffer in my dissector program.

so can any buddy guide how to do this??

Regards,
Hardik Patel

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@xxxxxxxxxxxxx>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request@xxxxxxxxxxxxx?subject=unsubscribe