Wireshark-dev: Re: [Wireshark-dev] fragment_add_..(), pinfo->src/dst, IP vs. TCP Session
From: Guy Harris <[email protected]>
Date: Sun, 11 Jul 2010 10:49:05 -0700
On Jul 11, 2010, at 9:56 AM, David Aggeler wrote:

> I'll probably will create a unique ID for this dissector, but is there 
> any desire to handle this in reassemble.c, so other TCP based dissectors 
> don't need to reinvent this?

There's no guarantee that the protocol in question is running atop TCP, so there won't be anything TCP-specific.

The DICOM dissector is already using the conversation mechanism to save state information.  A conversation_t has, as one of its members, a 32-bit integral field named "index", which is a "unique ID for conversation".  That could be used as the unique ID.

Alternatively, you could do as the IAX2 dissector does, and have separate fragment and reassembly tables for each conversation, attaching them as private data to the conversation.