Ethereal-dev: Re: [ethereal-dev] Question

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

From: guy@xxxxxxxxxx (Guy Harris)
Date: Thu, 18 Feb 1999 22:27:54 -0800 (PST)
> Why do we need a separate numeric value for each tree we create?
> Specifically, I am writing an extension for RSVP where a message may
> have a number of objects in it. I defined a "ETT_RSVP_OBJECT" constant
> and made all the trees of that type; it worked. So I was wondering why,
> for example, all the different OSPF trees have different constants?

Unless I've missed something, the only thing you get by giving different
trees different ETT_ values is that Ethereal has, for each ETT_ value, a
Boolean flag (the "tree_type" array in "add_subtree()") which indicates
whether that tree should be displayed expanded or collapsed.  For
example, if, when looking at one packet, you expand a particular item,
then, if you look at another packet, it will be displayed with all trees
of that type expanded.

This is similar to what, for example, Microsoft's Network Monitor does.

Given that, the reason to give different tree types different ETT_
values is to arrange that opening one kind of tree doesn't cause trees
of another type to be opened if you then go to another packet.