Ethereal-dev: Re: [Ethereal-dev] Cleanup function for each frame

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

From: Stig Bjørlykke <stig@xxxxxxxxxxxxx>
Date: Tue, 29 Nov 2005 00:01:20 +0100
On 28. nov. 2005, at 22.13, Ulf Lamping wrote:

Stig Bjørlykke wrote:
I need something like this in COTP in the situation where the first COTP segment in a frame is the last of a fragmented block (the rest received in previous frames), and the second COTP segment is a non- fragmented block. The COTP length is 2, which means dst_ref is always 0 (used as "id" in the fragment functions), and the last COTP segment is messing up with the fragment reassembly (because the frame is dissected twice).

Is the frame dissected twice, or is the dissector called twice because of the two appearances in this frame?

It looks like the frame is dissected twice, because the dissector is called four times when I have two COTP segments in the frame. I'm using the latest svn on Mac OS X.

If I can reset a counter after dissecting this frame this counter can be used as "id".

Wouldn't this mess up the reassembling of the following frames?

When I use the attached patch (where I have patched packet-frame.c to do what I want) it appears to work correctly, also for following frames, but I don't know if this is "correct coding"?

BTW: do you have an example capture?

I will make a public releasable capture available tomorrow, but I can see the same thing happening in p772-transfer-success.pcap from http://wiki.ethereal.com/S4406 - look at frame 20.


--
Stig Bjørlykke

Attachment: packet-clnp.patch
Description: Binary data