Huge thanks to our Platinum Members Endace and LiveAction,
and our Silver Member Veeam, for supporting the Wireshark Foundation and project.

Wireshark-dev: Re: [Wireshark-dev] parent level tvb access for fragmented and compiled packets

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Wed, 12 Mar 2008 21:13:13 -0700

On Mar 12, 2008, at 8:52 PM, khushbu thakkar wrote:

Thanx for the response.
By parent-level tvb i meant top level tvbuff.
I need Destination IP Address and Differentiated Service Field from IP layer. Can it be possible to get.

Destination IP address, yes - pinfo->net_dst is an "address" structure; it contains:

	a "type" field, which should be AT_IPv4 or AT_IPv6 in your case;

	a "len" field, which is the length of the address data;

a "data" field, which is a "const void *" that points to the raw bytes of the address.

DS field - currently, no, although we could arrange to supply the TOS field from the last fragment received for IPv4 or the Traffic Class field from the last fragment received for IPv6. That'd involve code changes to Wireshark.

(BTW, should the IPv6 dissector have an "interpret the Traffic Class field as a DS field" option, similar to the IPv4 dissector's "interpret the TOS field as a DS field" option, as per RFC 2474?)