Ethereal-dev: Re: [ethereal-dev] SIGSEGV while "Match Selected"

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

From: "Gilbert Ramirez Jr." <gram@xxxxxxxxxx>
Date: Mon, 25 Oct 1999 17:22:01 -0400
On Mon, Oct 25, 1999 at 09:16:23PM +0200, Kojak wrote:
> > > ** ERROR **: file ../ethereal/packet-sna.c: line 709 (dissect_fid4): assert
> ion failed: (offset+8 == 26)
> > > aborting...
> > Actually, this is great news. I had to write that section of the SNA
> > decoder blind. That is, I had no trace data against which to test. I put
> > in that assert just to check my own coding. Can you please send me a trace
> > file that causes that crash?
> 
> Hmm, that's the funny thing. There is no SNA traffic in there...

Well, for some reason, the datalink layer (ethernet?) called dissect_llc(),
which called dissect_sna(), which called dissect_fid4(). Either you have
SNA traffic, or there's some other random packet that happens to look
like SNA to ethereal.
   
> Which leads me to think I made a typo somewhere. Dunno why the code
> ends up in the SNA code, but ok. The ETT_* constants used to create a
> subtree, to what level should these be uniquely used?
> 
> Example:
> 
> ti = proto_item_add_text( tree, ... );
> subtree = proto_item_add_subtree(ti, ETT_SUBS);
> 
> ti2 = proto_item_add_text ( subtree, ... );
> subsubtree = proto_item_add_subtree(ti2, ETT_SUBS);
> 
> should this work, or is this blatently stupid?

It works. The ETT value is used only to give an ID to the type of
subtree it is, so that Ethereal can remember if the GUI representation
of the subtree is "open"/"expanded" or "closed".

> Can I use a certain ETT_* constant at any place if I feel like it? Or
> am I missing something?

yes.

--gilbert