Ethereal-dev: [Ethereal-dev] Re: 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: ronnie sahlberg <ronniesahlberg@xxxxxxxxx>
Date: Mon, 28 Nov 2005 23:11:16 +0000
the frames will sometimes be dissected multiple times, for example if
you use filters etc.


If a frame is dissected multiple times
pinfo->fd->flags.visited    will be 0 the first time
and 1 all other times the frame is dissected.




On 11/28/05, Stig Bjørlykke <stig@xxxxxxxxxxxxx> wrote:
> 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
>
>
>