Ethereal-dev: Re: [ethereal-dev] conversations and keeping state

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Sun, 24 Oct 1999 00:26:30 -0700
> >E.g., add a "void *" to the conversation structure, so that a client of
> >the conversation code can hang arbitrary stuff off of it, and hang, in
> >the case of SMB (and AFS, and ONC RPC), a hash table off of the
> >conversation structure, the hash key for which is just the multiplexor
> >ID (or the service and call number, for AFS, or the program number,
> >version number, and procedure number for ONC RPC)?
> 
> Yes, this is what I was thinking of.

Done.

I split "add_to_conversation()" into a "conversation_new()" routine to
create a new conversation given source and destination addresses and
ports, and a "find_conversation()" routine that tries to find a
conversation given source and destination addresses and ports.

Both return a pointer to the conversation structure;
"find_conversation()" returns NULL if not found.

"conversation_new()" takes an additional "void *" argument, which
becomes the "data" member of the structure to which it returns a
pointer; that's for use by the client of the conversation code.