18#include "ws_symbol_export.h"
24#define STAT_TREE_ROOT "root"
25#define STATS_TREE_MENU_SEPARATOR "//"
27#define ST_FLG_AVERAGE 0x10000000
28#define ST_FLG_ROOTCHILD 0x20000000
29#define ST_FLG_DEF_NOEXPAND 0x01000000
30#define ST_FLG_SORT_DESC 0x00800000
31#define ST_FLG_SORT_TOP 0x00400000
32#define ST_FLG_SRTCOL_MASK 0x000F0000
33#define ST_FLG_SRTCOL_SHIFT 16
35#define ST_FLG_MASK (ST_FLG_AVERAGE|ST_FLG_ROOTCHILD|ST_FLG_DEF_NOEXPAND| \
36 ST_FLG_SORT_TOP|ST_FLG_SORT_DESC|ST_FLG_SRTCOL_MASK)
38#define ST_SORT_COL_NAME 1
39#define ST_SORT_COL_COUNT 2
40#define ST_SORT_COL_AVG 3
41#define ST_SORT_COL_MIN 4
42#define ST_SORT_COL_MAX 5
43#define ST_SORT_COL_BURSTRATE 6
56typedef void (*stat_tree_init_cb)(
stats_tree *);
59typedef void (*stat_tree_cleanup_cb)(
stats_tree *);
61typedef enum _stat_node_datatype {
82 stat_tree_packet_cb
packet,
83 stat_tree_init_cb init,
84 stat_tree_cleanup_cb cleanup);
100 stat_tree_packet_cb
packet,
101 stat_tree_init_cb init,
102 stat_tree_cleanup_cb cleanup);
118WS_DLL_PUBLIC
int stats_tree_parent_id_by_name(
stats_tree *st,
const char *parent_name);
127WS_DLL_PUBLIC
int stats_tree_create_node(
stats_tree *st,
134WS_DLL_PUBLIC
int stats_tree_create_node_by_pname(
stats_tree *st,
136 const char *parent_name,
145WS_DLL_PUBLIC
int stats_tree_create_range_node(
stats_tree *st,
150WS_DLL_PUBLIC
int stats_tree_create_range_node_string(
stats_tree *st,
156WS_DLL_PUBLIC
int stats_tree_range_node_with_pname(
stats_tree *st,
158 const char *parent_name,
162WS_DLL_PUBLIC
int stats_tree_tick_range(
stats_tree *st,
167#define stats_tree_tick_range_by_pname(st,name,parent_name,value_in_range) \
168 stats_tree_tick_range((st),(name),stats_tree_parent_id_by_name((st),(parent_name),(value_in_range)))
171WS_DLL_PUBLIC
int stats_tree_create_pivot(
stats_tree *st,
175WS_DLL_PUBLIC
int stats_tree_create_pivot_by_pname(
stats_tree *st,
177 const char *parent_name);
179WS_DLL_PUBLIC
int stats_tree_tick_pivot(
stats_tree *st,
181 const char *pivot_value);
183extern void stats_tree_cleanup(
void);
192typedef enum _manip_node_mode {
200WS_DLL_PUBLIC
int stats_tree_manip_node_int(manip_node_mode mode,
207WS_DLL_PUBLIC
int stats_tree_manip_node_float(manip_node_mode mode,
214#define increase_stat_node(st,name,parent_id,with_children,value) \
215 (stats_tree_manip_node_int(MN_INCREASE,(st),(name),(parent_id),(with_children),(value)))
217#define tick_stat_node(st,name,parent_id,with_children) \
218 (stats_tree_manip_node_int(MN_INCREASE,(st),(name),(parent_id),(with_children),1))
220#define set_stat_node(st,name,parent_id,with_children,value) \
221 (stats_tree_manip_node_int(MN_SET,(st),(name),(parent_id),(with_children),value))
223#define zero_stat_node(st,name,parent_id,with_children) \
224 (stats_tree_manip_node_int(MN_SET,(st),(name),(parent_id),(with_children),0))
233#define avg_stat_node_add_value_notick(st,name,parent_id,with_children,value) \
234 (stats_tree_manip_node_int(MN_AVERAGE_NOTICK,(st),(name),(parent_id),(with_children),value))
237#define avg_stat_node_add_value_int(st,name,parent_id,with_children,value) \
238 (stats_tree_manip_node_int(MN_AVERAGE,(st),(name),(parent_id),(with_children),value))
240#define avg_stat_node_add_value_float(st,name,parent_id,with_children,value) \
241 (stats_tree_manip_node_float(MN_AVERAGE,(st),(name),(parent_id),(with_children),value))
244#define stat_node_set_flags(st,name,parent_id,with_children,flags) \
245 (stats_tree_manip_node_int(MN_SET_FLAGS,(st),(name),(parent_id),(with_children),flags))
248#define stat_node_clear_flags(st,name,parent_id,with_children,flags) \
249 (stats_tree_manip_node_int(MN_CLEAR_FLAGS,(st),(name),(parent_id),(with_children),flags))
enum register_stat_group_e register_stat_group_t
WS_DLL_PUBLIC void stats_tree_set_first_column_name(stats_tree_cfg *st_config, const char *column_name)
Definition stats_tree.c:338
WS_DLL_PUBLIC void stats_tree_set_group(stats_tree_cfg *st_config, register_stat_group_t stat_group)
Definition stats_tree.c:331
WS_DLL_PUBLIC stats_tree_cfg * stats_tree_register(const char *tapname, const char *abbr, const char *path, unsigned flags, stat_tree_packet_cb packet, stat_tree_init_cb init, stat_tree_cleanup_cb cleanup)
Definition stats_tree.c:277
WS_DLL_PUBLIC stats_tree_cfg * stats_tree_register_plugin(const char *tapname, const char *abbr, const char *path, unsigned flags, stat_tree_packet_cb packet, stat_tree_init_cb init, stat_tree_cleanup_cb cleanup)
Definition stats_tree.c:318
Definition packet_info.h:43
Definition stats_tree_priv.h:136
unsigned flags
Definition stats_tree_priv.h:152
stat_tree_packet_cb packet
Definition stats_tree_priv.h:147
Definition stats_tree_priv.h:102
Definition packet-epl-profile-parser.c:83
Definition epan_dissect.h:28
tap_packet_status
Definition tap.h:25