Ethereal-dev: Re: [Ethereal-dev] A elementary question about the dissector

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

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Thu, 08 Dec 2005 10:56:08 +0100
Kelvin You wrote:

Hi, All,
I 'm a freshman to ethereal development.
now I have some question about the dissector creation
static gint ett_xxx = -1; static gint *ett[] =
    {
        &ett_xxx,
    };
In my dissector, I create many trees and use the same ett_xxx:
proto_item_add_subtree(sub_ti, ett_xxx);
It seems that everything is OK.

It seems but try to use your dissector.

It's all about the state of the subtrees. If you "open" one subtree and then switch to another packet, *all* subtrees of the protocol will be opened, not only the one you had opened in the first packet.

Regards, ULFL