On Sun, Apr 22, 2001 at 08:15:34PM -0600, PC Drew wrote:
> In line with the summary functionality that I described earlier, is there
> any way to have a variable be in the global for a conversation? As an
> example, the latency of an RTP packet depends on the latency of the
> previous packet. Is there a way for me to save a variable in the
> conversation space (i.e. a conversation between machines a and b on ports
> 2000 and 1000 has one latency, while a conversation between machines a and
> b on ports 2002 and 1002 has another latency)?
Assuming no *other* dissector associates any data with the conversation,
you could store, in the "data" member of a "conversation_t" structure, a
pointer to a data structure containing variables to be associated with
that conversation.
> The next question is what is the best way to check to see if the packet
> that is currently being run through the dissector has already run before?
Check the "flags.visited" flag of the "frame_data" structure pointed to
by the "fd" member of the "packet_info" structure pointed to by the
"pinfo" argument to the dissector. It's false (0) if the frame hasn't
yet been processed by the first pass through the packets, true (1) if it
has.