Wireshark-dev: [Wireshark-dev] Protocol Hierarchy display of sub items

From: LARRY DEATON <LARRY.DEATON@xxxxxxxxxx>
Date: Wed, 29 May 2013 15:14:25 +0000

Hello All,

                I have a custom plugin I am writing that decodes packets based on a certain Ethernet type and decodes two fields following this ( protocol ID and control ID ).

                Ethernet Header

                EtherType ( 2 bytes )  == Foo Protocol

                Protocol ID  -- custom values

                                0x10 = Protocol A

                                0x20 = Protocol B

                Control ID – custom values

                               

 

 

I have the decode portion functional and it seems to display all the fields properly in the frame window.  However, I want to create sub-statistics for each protocol ID when viewing in the protocol hierarchy window.  Right now, it just displays the total number of “Foo Protocol” packets.


I have added the statistics tree interface to my plugin and have added stat nodes for each protocol ID type, but I do not see anything new in the protocol hierarchy window.

 

Here’s my stat interface tree init:

 

   st_node_packets   = stats_tree_create_node(st, st_str_packets, 0, TRUE);

    st_node_protocol_A      = stats_tree_create_node(st, st_str_amcp, st_node_packets, TRUE);

    st_node_protocol_B     = stats_tree_create_node(st, st_str_amhk, st_node_packets, TRUE);

    st_node_protocol C  = stats_tree_create_node(st, st_str_discovery, st_node_packets, TRUE);

 

I’m also incrementing the per protocol stats in the stats packet callback function using the tick_stat_node() function.

 

Can you tell me what needs to be done to control the protocol hierarchy window?

 

Right now, all I see are totoal packets for the “Foo Protocol”.  What I want is this in the protocol hierarchy window:

 

                Foo Protocol                      <total packets>

                                Protocol A           <total packets>

                                Protocol B          <total packets>

                                Protocol C           <total packets>

 

 

I am using version 1.11.0 custom built from the svn repository.

 

Thanks,

 

Larry Deaton

Larry.deaton@xxxxxxxxxx