Ethereal-users: Re: [Ethereal-users] protocol tree

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

From: amit shanbhag <ashanbag@xxxxxxxxxxxxxx>
Date: Thu, 22 Feb 2001 20:33:22 +0530
amit shanbhag wrote:
Hi

  ill go step wise...
1.) I have registered a protcol using index ett_A
2.) I use it to create an item
         item=proto_tree_add_item(tree,proto_A,NullTVB,offset,END_OF_FRAME,FALSE);
3.) I then register a subtree in the main tree;
    A_tree=proto_item_add_subtree(item,ett_A);

                later  on in another C file i do the following
                    /*************************************************************************************
                    *
                    ************************************************************************************/
                4.)    ti = proto_tree_add_item(A_tree,NullTVB,offset,0,"B Data"   );
                5.)   B_tree = proto_item_add_subtree(ti, ett_B;

in the main C file i have acccess only to ett_B
now i want to add some items to the B_treein the main file, But i only have ett_B
with me, How do i get B_tree provided that i have with me A_tree and ett_B

tree
|
--A_tree with index ett_a
      |
       --B_tree  with index  ett_b