11 #ifndef __STATS_TREE_H 12 #define __STATS_TREE_H 15 #include <epan/epan.h> 20 #include "ws_symbol_export.h" 26 #define STAT_TREE_ROOT "root" 28 #define ST_FLG_AVERAGE 0x10000000 29 #define ST_FLG_ROOTCHILD 0x20000000 30 #define ST_FLG_DEF_NOEXPAND 0x01000000 31 #define ST_FLG_SORT_DESC 0x00800000 32 #define ST_FLG_SORT_TOP 0x00400000 33 #define ST_FLG_SRTCOL_MASK 0x000F0000 34 #define ST_FLG_SRTCOL_SHIFT 16 36 #define ST_FLG_MASK (ST_FLG_AVERAGE|ST_FLG_ROOTCHILD|ST_FLG_DEF_NOEXPAND| \ 37 ST_FLG_SORT_TOP|ST_FLG_SORT_DESC|ST_FLG_SRTCOL_MASK) 39 #define ST_SORT_COL_NAME 1 40 #define ST_SORT_COL_COUNT 2 41 #define ST_SORT_COL_AVG 3 42 #define ST_SORT_COL_MIN 4 43 #define ST_SORT_COL_MAX 5 44 #define ST_SORT_COL_BURSTRATE 6 50 typedef int (*stat_tree_packet_cb)(
stats_tree*,
56 typedef void (*stat_tree_init_cb)(stats_tree *);
59 typedef void (*stat_tree_cleanup_cb)(stats_tree *);
69 WS_DLL_PUBLIC
void stats_tree_register(
const gchar *tapname,
73 stat_tree_packet_cb packet,
74 stat_tree_init_cb init,
75 stat_tree_cleanup_cb cleanup);
85 WS_DLL_PUBLIC
void stats_tree_register_plugin(
const gchar *tapname,
89 stat_tree_packet_cb packet,
90 stat_tree_init_cb init,
91 stat_tree_cleanup_cb cleanup);
102 WS_DLL_PUBLIC
void stats_tree_register_with_group(
const gchar *tapname,
106 stat_tree_packet_cb packet,
107 stat_tree_init_cb init,
108 stat_tree_cleanup_cb cleanup,
111 WS_DLL_PUBLIC
int stats_tree_parent_id_by_name(stats_tree *st,
const gchar *parent_name);
119 WS_DLL_PUBLIC
int stats_tree_create_node(stats_tree *st,
122 gboolean with_children);
125 WS_DLL_PUBLIC
int stats_tree_create_node_by_pname(stats_tree *st,
127 const gchar *parent_name,
128 gboolean with_children);
135 WS_DLL_PUBLIC
int stats_tree_create_range_node(stats_tree *st,
140 WS_DLL_PUBLIC
int stats_tree_create_range_node_string(stats_tree *st,
146 WS_DLL_PUBLIC
int stats_tree_range_node_with_pname(stats_tree *st,
148 const gchar *parent_name,
152 WS_DLL_PUBLIC
int stats_tree_tick_range(stats_tree *st,
157 #define stats_tree_tick_range_by_pname(st,name,parent_name,value_in_range) \ 158 stats_tree_tick_range((st),(name),stats_tree_parent_id_by_name((st),(parent_name),(value_in_range))) 161 WS_DLL_PUBLIC
int stats_tree_create_pivot(stats_tree *st,
165 WS_DLL_PUBLIC
int stats_tree_create_pivot_by_pname(stats_tree *st,
167 const gchar *parent_name);
169 WS_DLL_PUBLIC
int stats_tree_tick_pivot(stats_tree *st,
171 const gchar *pivot_value);
173 extern void stats_tree_cleanup(
void);
182 typedef enum _manip_node_mode {
190 WS_DLL_PUBLIC
int stats_tree_manip_node(manip_node_mode mode,
194 gboolean with_children,
197 #define increase_stat_node(st,name,parent_id,with_children,value) \ 198 (stats_tree_manip_node(MN_INCREASE,(st),(name),(parent_id),(with_children),(value))) 200 #define tick_stat_node(st,name,parent_id,with_children) \ 201 (stats_tree_manip_node(MN_INCREASE,(st),(name),(parent_id),(with_children),1)) 203 #define set_stat_node(st,name,parent_id,with_children,value) \ 204 (stats_tree_manip_node(MN_SET,(st),(name),(parent_id),(with_children),value)) 206 #define zero_stat_node(st,name,parent_id,with_children) \ 207 (stats_tree_manip_node(MN_SET,(st),(name),(parent_id),(with_children),0)) 216 #define avg_stat_node_add_value_notick(st,name,parent_id,with_children,value) \ 217 (stats_tree_manip_node(MN_AVERAGE_NOTICK,(st),(name),(parent_id),(with_children),value)) 220 #define avg_stat_node_add_value(st,name,parent_id,with_children,value) \ 221 (stats_tree_manip_node(MN_AVERAGE,(st),(name),(parent_id),(with_children),value)) 224 #define stat_node_set_flags(st,name,parent_id,with_children,flags) \ 225 (stats_tree_manip_node(MN_SET_FLAGS,(st),(name),(parent_id),(with_children),flags)) 228 #define stat_node_clear_flags(st,name,parent_id,with_children,flags) \ 229 (stats_tree_manip_node(MN_CLEAR_FLAGS,(st),(name),(parent_id),(with_children),flags)) Definition: packet_info.h:44
register_stat_group_t
Definition: stat_groups.h:45
Definition: epan_dissect.h:28
Definition: stats_tree_priv.h:91