Ethereal-dev: Re: [Ethereal-dev] [PATCH] fix for multiple dcerpc connections over single socke

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

From: Tim Potter <tpot@xxxxxxxxx>
Date: Tue, 20 Nov 2001 10:51:35 +1100
On Mon, Nov 19, 2001 at 06:38:21PM -0500, Todd Sabin wrote:

> > There is no provision in the conversation code for more than the source
> > and destination port numbers being used...
> 
> I think this is the crux of the problem.  It would seem better to base
> conversations on aggregated properties from each protocol in the
> stack.  Each one would add in the 'multiplexing' parts it knows about.
> IP would add addresses and proto_type, TCP and UDP would add ports,
> SMB would add in TID, FID, or whatever.  The same approach would work
> with IPX, etc.  Probably a lot of work to retrofit at this point,
> though.

How about having a linked list of protocol specific conversation keys?

struct private_conv {
	struct private_conv *prev, *next;
	void *data;
	gboolean (*compare_fn)(void *d1, void *d2);
};

So the smb dissector would attach a fid and a function to compare fids.
The compare_conversation() function would call the given compare function
for each element in the list.


Tim.