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: Richard Sharpe <sharpe@xxxxxxxxxx>
Date: Sat, 23 Oct 1999 23:25:04 +0900
At 07:01 PM 10/23/99 -0700, Guy Harris <gharris@xxxxxxxxxxxx> wrote:
>> 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)?

Yes, this is what I was thinking of.  I will still need to have a hash
table, because there could be multiple MIDs etc available, but if we can
centralize this stuff, and add routines that record names of what ever with
it, it could be a useful set of info for later.

>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.

Perhaps so. I am only thinking out aloud at the moment, and I should be
writing (the next chapter on the next Samba book) so I am not too clear on
this at the moment.



Regards
-------
Richard Sharpe, sharpe@xxxxxxxxxx, Master Linux Administrator :-),
Samba (Team member, www.samba.org), Ethereal (Team member, www.zing.org)
Co-author, SAMS Teach Yourself Samba in 24 Hours
Author: First Australian 5-day, intensive, hands-on Linux SysAdmin course