Ethereal-dev: Re: [Ethereal-dev] A dynamic number of subtrees

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Sun, 02 Jan 2005 17:25:15 -0800
Stefano Pettini wrote:

Ok, if I have 2 IP addresses in each packet, I could use 2 different etts to keep their subtrees separated.

The only thing that would keep separated would be the memory of whether subtrees of that type should be open or closed. It would not affect any other aspect of the display.

But if I have N IP addresses, with N different from packet to packet, how can (or should) I implement etts and subtrees logic?

Use one ett for all IP address items.

If I register a common set of etts, the state of the subtrees will be kept from packet to packet, for subtrees present in both. Am I right?

The ett variable's value is an index into an array of Booleans storing an indication of whether trees with that ett value should be open or closed, so that's what an ett value specifies - and that's *all* it specifies. There's no reason whatsoever why more than one subtree can't have the same ett value.