Wireshark mailing list archives
Re: Simplifying (and fixing) tvbuff [Long]
From: Jaap Keuter <jaap.keuter () xs4all nl>
Date: Wed, 14 Dec 2011 22:39:39 +0100
On 2011-12-14 15:02, Chris Maynard wrote:
Bill Meier writes:I think the long description boils down to the following: Consider thecollection of tvbs (chain) as a stack of tvbs. packet.c pushes the initial tvb onto the stack then calls next dissector; After the dissection is complete, the stack is eventually free'd via a call to tvb_free_chain in epan_dissect_cleanup. A dissector: - can add new tvbs (real, subset, composite) to the stack handed to it; (Subset and Composite tvbs should reference only tvbs which are towards thebeginning of the same stack). - must not save a pointer to a tvb from that stack (handed to it) for use when dissecting another frame (sincea higher level function may very well free the stack); - can create its own tvb stack which the dissector is free to manage as desired.Bill, this information, plus the recent post entitled, "buffer to tvb",got mewondering if there is perhaps enough useful information here worthy of aseparate doc/README.tvbuff? - Chris
+1, documenting such fundamental building blocks is always good. Eventually
this would end up in section II of the developer guide. Thanks, Jaap ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Simplifying (and fixing) tvbuff [Long] Bill Meier (Dec 12)
- Re: Simplifying (and fixing) tvbuff [Long] Bill Meier (Dec 12)
- Re: Simplifying (and fixing) tvbuff [Long] Bill Meier (Dec 13)
- Re: Simplifying (and fixing) tvbuff [Long] Chris Maynard (Dec 14)
- Re: Simplifying (and fixing) tvbuff [Long] Jaap Keuter (Dec 14)
- Re: Simplifying (and fixing) tvbuff [Long] Chris Maynard (Dec 14)
- Re: Simplifying (and fixing) tvbuff [Long] Bill Meier (Dec 21)
- Re: Simplifying (and fixing) tvbuff [Long] Bill Meier (Dec 21)
- Re: Simplifying (and fixing) tvbuff [Long] Jaap Keuter (Dec 24)
- Re: Simplifying (and fixing) tvbuff [Long] Bill Meier (Dec 21)