Ethereal-dev: Re: [Ethereal-dev] Re: 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: Kelvin You <kelvin.sdc@xxxxxxxxx>
Date: Thu, 8 Dec 2005 18:49:18 +0800
Yes, I see :-)
 
Very Thanks!!!

 
On 12/8/05, ronnie sahlberg <ronniesahlberg@xxxxxxxxx> wrote:
using multile ett allows the dissector to "remember" which expansions
are open and which ones are closed when you jump between packets.

Open only some of the expansions and change to a different packet and
back and you will see what i mean.




On 12/8/05, Kelvin You <kelvin.sdc@xxxxxxxxx > 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.
>
> But I find some dissector use more ett_???
> such as, they define
>    static gint *ett[] =
>     {
>         &ett_xxx0,
>         &ett_xxx1,
>         ...
>         &ett_xxxn
>     };
>
> and use them respectively when create the protocol trees,
> My question is why not use one ett_xxx and why use multiple ett ? what's the
> difference ?
>
> Thanks for your help.
>
>

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev