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] How to get backing tvb??

From: Jeff Morriss <jeff.morriss.ws@xxxxxxxxx>
Date: Mon, 19 Mar 2012 09:52:41 -0400
Alex Lindberg wrote:
I need to get the backing or parent tvbuff.  In the past, I have used

   tvbuff_t *new_buff;
   new_buff = tvb->tvbuffs.subset.tvb

This works in the 1.6 trunk stream. Now however, in the 1.7 (mainline trunk) this throws a compiler error:

   dereferencing pointer to incomplete type.

I resolved this by adding

   #include <epan/tvbuff-int.h>.

Is there an easier (safer) way to do this?

Well, the first obvious question to me would be: why do you need the backing or parent tvbuff? What is the tvbuff API missing that makes you need it?