Ethereal-dev: Re: [Ethereal-dev] support for X11 replies and events

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

From: Michael Shuldman <michaels@xxxxxxx>
Date: Tue, 6 Jan 2004 10:44:49 +0100
Guy Harris wrote,
> On Wed, Dec 24, 2003 at 08:22:19PM +0100, Michael Shuldman wrote:
> >  - use hashtable and sequencenumber for matching reply to request.
> 
> That works only if the capture has all the requests in it (for example:
> 
> 	if the capture starts in the middle of an X session;
> 
> 	if packets were dropped;
> 
> 	if you capture with a snapshot length that cuts packets off);
> 
> otherwise, you don't know the sequence numbers of the requests, as you
> haven't seen all the requests.

Ah yes.  This is what happens when you get hung up on a spec I
guess, for my project that was always the case.  In the rest of the
world, that is of course not so.

Before the code assumed that a reply was always to the previous
request (not necessarily the previously unreplied to request, but
that wouldn't work either), that worked for me on i386/XFree, but
not on Solaris when they started testing on that platform.
I don't remember exactly what it was, but I think the problem was
that replies occurred out-of-order, so we had to match them against
the sequencenumber instead.

Now, for the the real-world, perhaps one could add code that tries
to get (back) in sync, i.e. cache a request and try to match the
reply to an request in order to get the sequencenumber.
Since, if I remember correctly, the reply to request A does not
need to occur before the reply to request B, the code would need
to make some guesses to see which of the replies was to request A.

Regards,

-- 
  _ // 
  \X/ -- Michael Shuldman <michaels@xxxxxxx>