18#include "ws_symbol_export.h"
24#define STAT_TREE_ROOT "root"
25#define STATS_TREE_MENU_SEPARATOR "//"
35#define ST_FLG_AVERAGE 0x10000000
36#define ST_FLG_ROOTCHILD 0x20000000
39#define ST_FLG_DEF_NOEXPAND 0x01000000
40#define ST_FLG_SORT_TOP 0x00400000
43#define ST_FLG_SORT_DESC 0x00800000
44#define ST_FLG_SRTCOL_MASK 0x000F0000
45#define ST_FLG_SRTCOL_SHIFT 16
47#define ST_FLG_MASK (ST_FLG_AVERAGE|ST_FLG_ROOTCHILD|ST_FLG_DEF_NOEXPAND| \
48 ST_FLG_SORT_TOP|ST_FLG_SORT_DESC|ST_FLG_SRTCOL_MASK)
50#define ST_SORT_COL_NAME 1
51#define ST_SORT_COL_COUNT 2
52#define ST_SORT_COL_AVG 3
53#define ST_SORT_COL_MIN 4
54#define ST_SORT_COL_MAX 5
55#define ST_SORT_COL_BURSTRATE 6
68typedef void (*stat_tree_init_cb)(
stats_tree *);
71typedef void (*stat_tree_cleanup_cb)(
stats_tree *);
73typedef enum _stat_node_datatype {
98 stat_tree_packet_cb
packet,
99 stat_tree_init_cb init,
100 stat_tree_cleanup_cb cleanup);
116 stat_tree_packet_cb
packet,
117 stat_tree_init_cb init,
118 stat_tree_cleanup_cb cleanup);
134WS_DLL_PUBLIC
int stats_tree_parent_id_by_name(
stats_tree *st,
const char *parent_name);
143WS_DLL_PUBLIC
int stats_tree_create_node(
stats_tree *st,
150WS_DLL_PUBLIC
int stats_tree_create_node_by_pname(
stats_tree *st,
152 const char *parent_name,
161WS_DLL_PUBLIC
int stats_tree_create_range_node(
stats_tree *st,
166WS_DLL_PUBLIC
int stats_tree_create_range_node_string(
stats_tree *st,
172WS_DLL_PUBLIC
int stats_tree_range_node_with_pname(
stats_tree *st,
174 const char *parent_name,
178WS_DLL_PUBLIC
int stats_tree_tick_range(
stats_tree *st,
183#define stats_tree_tick_range_by_pname(st,name,parent_name,value_in_range) \
184 stats_tree_tick_range((st),(name),stats_tree_parent_id_by_name((st),(parent_name),(value_in_range)))
187WS_DLL_PUBLIC
int stats_tree_create_pivot(
stats_tree *st,
191WS_DLL_PUBLIC
int stats_tree_create_pivot_by_pname(
stats_tree *st,
193 const char *parent_name);
195WS_DLL_PUBLIC
int stats_tree_tick_pivot(
stats_tree *st,
197 const char *pivot_value);
199extern void stats_tree_cleanup(
void);
208typedef enum _manip_node_mode {
216WS_DLL_PUBLIC
int stats_tree_manip_node_int(manip_node_mode mode,
223WS_DLL_PUBLIC
int stats_tree_manip_node_float(manip_node_mode mode,
230#define increase_stat_node(st,name,parent_id,with_children,value) \
231 (stats_tree_manip_node_int(MN_INCREASE,(st),(name),(parent_id),(with_children),(value)))
233#define tick_stat_node(st,name,parent_id,with_children) \
234 (stats_tree_manip_node_int(MN_INCREASE,(st),(name),(parent_id),(with_children),1))
236#define set_stat_node(st,name,parent_id,with_children,value) \
237 (stats_tree_manip_node_int(MN_SET,(st),(name),(parent_id),(with_children),value))
239#define zero_stat_node(st,name,parent_id,with_children) \
240 (stats_tree_manip_node_int(MN_SET,(st),(name),(parent_id),(with_children),0))
249#define avg_stat_node_add_value_notick(st,name,parent_id,with_children,value) \
250 (stats_tree_manip_node_int(MN_AVERAGE_NOTICK,(st),(name),(parent_id),(with_children),value))
253#define avg_stat_node_add_value_int(st,name,parent_id,with_children,value) \
254 (stats_tree_manip_node_int(MN_AVERAGE,(st),(name),(parent_id),(with_children),value))
256#define avg_stat_node_add_value_float(st,name,parent_id,with_children,value) \
257 (stats_tree_manip_node_float(MN_AVERAGE,(st),(name),(parent_id),(with_children),value))
260#define stat_node_set_flags(st,name,parent_id,with_children,flags) \
261 (stats_tree_manip_node_int(MN_SET_FLAGS,(st),(name),(parent_id),(with_children),flags))
264#define stat_node_clear_flags(st,name,parent_id,with_children,flags) \
265 (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:352
void stats_tree_init(void)
Definition stats_tree.c:284
WS_DLL_PUBLIC void stats_tree_set_group(stats_tree_cfg *st_config, register_stat_group_t stat_group)
Definition stats_tree.c:345
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:291
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:332
Definition packet_info.h:43
Definition stats_tree_priv.h:145
unsigned flags
Definition stats_tree_priv.h:161
stat_tree_packet_cb packet
Definition stats_tree_priv.h:156
Definition stats_tree_priv.h:111
Definition packet-epl-profile-parser.c:80
Definition epan_dissect.h:28
tap_packet_status
Definition tap.h:25