[Wireshark-dev] what is the meaning of function proto_register_subtree_array?

2014-02-16 Thread ??????????
when you register a protocol,you should do the following three 
steps,1.proto_register_protocol();
2.proto_register_field_array();
3.proto_register_subtree_array()



what does the third function proto_register_subtree_array do?why ?and do it for 
what reason?___
Sent via:Wireshark-dev mailing list wireshark-dev@wireshark.org
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Re: [Wireshark-dev] what is the meaning of function proto_register_subtree_array?

2014-02-16 Thread Bill Meier

On 2/16/2014 7:44 AM, 我想不无聊 wrote:

when you register a protocol,you should do the following three steps,
1.proto_register_protocol();
2.proto_register_field_array();
3.proto_register_subtree_array()

what does the third function proto_register_subtree_array do?why ?and do
it for what reason?




Essentially: proto_register_subtree() registers variables (usually named 
ett_...) which are used to store state as to whether a particular 
sub-tree is expanded or not in the packet-details pane in the GUI.



See proto_item_add_subtree(...) in the code for pretty much any dissector.


___
Sent via:Wireshark-dev mailing list wireshark-dev@wireshark.org
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Re: [Wireshark-dev] what is the meaning of function proto_register_subtree_array?

2014-02-16 Thread Guy Harris

On Feb 16, 2014, at 7:55 AM, Bill Meier wme...@newsguy.com wrote:

 Essentially: proto_register_subtree() registers variables (usually named 
 ett_...) which are used to store state as to whether a particular sub-tree is 
 expanded or not in the packet-details pane in the GUI.

...so that, if you've opened up a particular subtree (such as, for example, the 
top-level subtree for IPv4) in one packet, if you click on another packet, that 
particular subtree will be automatically opened.

___
Sent via:Wireshark-dev mailing list wireshark-dev@wireshark.org
Archives:http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
 mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe