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] tvb in a conversation

From: "Stratemeier, Frank" <FStratemeier@xxxxxxxxx>
Date: Fri, 27 Jul 2007 12:07:48 +0200
You can achieve this by defining your own data struct which contains information that you want to pass. You can allocate memory for this using se_alloc or using g_mem_chunk..

Then you attach this struct to the conversation using conversation_add_proto_data and when you want to retrieve this data you just conversation_get_proto_data.

Maybe useful for you would be to attach the conversation data to the frame using p_add_proto_data so you don't have to look for conversations every time you access the packet.

It seems you are just doing all the steps I had to do... Any questions, don't hesitate to ask :).

Frank

-----Ursprüngliche Nachricht-----
Von: wireshark-dev-bounces@xxxxxxxxxxxxx [mailto:wireshark-dev-bounces@xxxxxxxxxxxxx] Im Auftrag von Gilbert Ramirez
Gesendet: Freitag, 27. Juli 2007 11:55
An: Developer support list for Wireshark
Betreff: Re: [Wireshark-dev] tvb in a conversation

You can use conversations to share data between packets. However, it knows nothing about tvbuffs. Tvbuffs will be "garbage collected" once they're not referenced anymore. I suppose you could increment the usage count on the tvbuff so that it won't be garbage-collected until the conversation itself is deleted (and you decrease the reference count on the tvbuff). However, if you can share your own private struct rather than a tvbuff, it might be easier for you.

--gilbert

On 7/27/07, Manuel Jung <klaus84@xxxxxxx> wrote:
> Is there another possibilty to use some bytes from one packet later in another one.
> --
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail 
> _______________________________________________
> Wireshark-dev mailing list
> Wireshark-dev@xxxxxxxxxxxxx
> http://www.wireshark.org/mailman/listinfo/wireshark-dev
>
_______________________________________________
Wireshark-dev mailing list
Wireshark-dev@xxxxxxxxxxxxx
http://www.wireshark.org/mailman/listinfo/wireshark-dev