Ethereal-dev: Re: [Ethereal-dev] SPX Dissection problem.

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

From: "Greg Morris" <GMORRIS@xxxxxxxxxx>
Date: Wed, 09 Apr 2003 14:57:34 -0600
In calling the subdissector for retransmitted packets... I guess it could just be displayed as a retransmit. The way that it currently works is the subdissector must process the retransmission itself. In the NDPS dissector I still decode the frame but I needed to know if the retransmission was part of a desegmented stream. I guess if I would have just not processed the packet then I would not have had to worry about it in the NDPS code. Either way works for me. I was looking at the desegmentation code of other dissectors when I ran into this. I didn't really think about not passing to the subdissector if retransmitted. Is this how the TCP dissector works?
 
Greg

>>> Guy Harris <guy@xxxxxxxxxx> 4/9/2003 2:47:48 PM >>>
On Wed, Apr 09, 2003 at 09:52:49AM -0600, Greg Morris wrote:
> You made some changes to the SPX dissection but now after the forst run
> when you click on an SPX packet Ethereal crashes because spx_hash_keys
> in function spx_hash_insert is 0 value. Attached is a trace containing
> SPX traffic.

> spx_info*
> spx_hash_insert(conversation_t *conversation, guint32 spx_src)
> {
>  spx_hash_key  *key;
>  spx_info  *value;

>  /* Now remember the packet, so we can find it if we later. */
>  key = g_mem_chunk_alloc(spx_hash_keys);

> I suspect that the spx_hash_key structure was released from memory?

Yes - and the hash table was destroyed as well.

I've checked in a change not to use the hash table after the first pass;
instead, on the first pass, we attach to frames that are retransmissions
a data structure that contains the frame number of the original frame,
and a pointer to that structure is what gets passed to subdissectors
(or, if there is no such structure, a null pointer gets passed).

That means we can safely get rid of the hash table after the first pass
- including getting rid of the hash values.

BTW, as per my earlier mail, is there any reason to call subdissectors
of the SPX dissector for retransmissions?  That way, the NDPS
subdissector wouldn't have to care whether the frame was a
retransmission; it could assume that it isn't.