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: Sat, 23 Oct 1999 19:01:43 -0700
> conversations seem to be a way of keeping state, and they look good.
>
> So, why can't I hang my state stuff off of the conversation structure
> rather than doing it all again and addin in the conversation ID to the MID
> etc in my hashes?

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)?

Sounds reasonable.

"add_to_conversation()" would presumably just return a pointer to the
conversation structure, then, so that you could hang stuff off of it.