Update documentatin for the qt build to reflect the cmake work.
[obnox/wireshark/wip.git] / doc / README.stats_tree
index 612ae47d324217b9d01c03959503ab9141748e32..0d6d6f507d3f35bd95631faada6643e90396b406 100644 (file)
@@ -4,9 +4,9 @@ tapping with stats_tree
 Let's suppose that you want to write a tap only to keep counters, and you
 don't want to get involved with GUI programming or maybe you'd like to make
 it a plugin. A stats_tree might be the way to go. The stats_tree module takes
-care of the representation (GUI for ethereal and text for tethereal) of the
+care of the representation (GUI for wireshark and text for tshark) of the
 tap data. So there's very little code to write to make a tap listener usable
-from both ethereal and tethereal.
+from both wireshark and tshark.
 
 First, you should add the TAP to the dissector in question as described in
 README.tapping .
@@ -31,7 +31,7 @@ Other than that the stats_tree should be registered.
 
 If you want to make it a plugin, stats_tree_register() should be called by
 plugin_register_tap_listener() read README.plugin for other information
-regarding ethereal plugins.
+regarding wireshark plugins.
 
 If you want it as part of the dissector stats_tree_register() can be called
 either by proto_register_xxx() or if you prefer by proto_reg_handoff_xxx().
@@ -46,11 +46,10 @@ A small example of a very basic stats_tree plugin follows.
  *
  * $ ~Id:  $
  *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.org>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
- *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
@@ -90,7 +89,7 @@ extern void udp_term_stats_tree_init(stats_tree* st) {
 
 /* this one will be called with every udp packet */
 extern int udp_term_stats_tree_packet(stats_tree *st, /* st as it was passed to us */ 
-                                      packet_info *pinfo,  /* we'll fetch the addreses from here */
+                                      packet_info *pinfo,  /* we'll fetch the addresses from here */
                                       epan_dissect_t *edt _U_, /* unused */ 
                                       const void *p) /* we'll use this to fetch the ports */
 {
@@ -120,8 +119,8 @@ G_MODULE_EXPORT void plugin_register_tap_listener(void) {
     stats_tree_register("udp", /* the proto we are going to "tap" */
                         "udp_terms", /* the abbreviation for this tree (to be used as -z udp_terms,tree) */
                         st_str_udp_term, /* the name of the menu and window (use "/" for sub menus)*/
+                        udp_term_stats_tree_packet, /* the per packet callback */
                         udp_term_stats_tree_init, /* the init callback */
-                        ip_hosts_stats_tree_init, /* the per packet callback */
                         NULL ); /* the cleanup callback (in this case there isn't) */
 
 }
@@ -144,18 +143,18 @@ stats_tree_parent_id_by_name( st, parent_name)
 Node functions
 ==============
 
-All the functions that opearate on nodes return a parent_id
+All the functions that operate on nodes return a parent_id
 
 stats_tree_create_node(st, name, parent_id, with_children)
   Creates a node in the tree (to be used in the in init_cb)
     name: the name of the new node
     parent_id: the id of the parent_node (NULL for root)
     with_children: TRUE if this node will have "dynamically created" children
-                   (i.e. it will be a candidate parrent)
+                   (i.e. it will be a candidate parent)
 
 
 stats_tree_create_node_by_pname(st, name, parent_name, with_children);
-  As before but creates a node using it's parent's name
+  As before but creates a node using its parent's name
 
 
 stats_tree_create_range_node(st, name, parent_id, ...)