[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ethereal-dev
Subject:    Re: [ethereal-dev] conversations and keeping state
From:       Guy Harris <gharris () flashcom ! net>
Date:       1999-10-24 7:26:30
[Download RAW message or body]

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic