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 {
94 stat_tree_packet_cb
packet,
95 stat_tree_init_cb init,
96 stat_tree_cleanup_cb cleanup);
112 stat_tree_packet_cb
packet,
113 stat_tree_init_cb init,
114 stat_tree_cleanup_cb cleanup);
130WS_DLL_PUBLIC
int stats_tree_parent_id_by_name(
stats_tree *st,
const char *parent_name);
139WS_DLL_PUBLIC
int stats_tree_create_node(
stats_tree *st,
146WS_DLL_PUBLIC
int stats_tree_create_node_by_pname(
stats_tree *st,
148 const char *parent_name,
157WS_DLL_PUBLIC
int stats_tree_create_range_node(
stats_tree *st,
162WS_DLL_PUBLIC
int stats_tree_create_range_node_string(
stats_tree *st,
168WS_DLL_PUBLIC
int stats_tree_range_node_with_pname(
stats_tree *st,
170 const char *parent_name,
174WS_DLL_PUBLIC
int stats_tree_tick_range(
stats_tree *st,
179#define stats_tree_tick_range_by_pname(st,name,parent_name,value_in_range) \
180 stats_tree_tick_range((st),(name),stats_tree_parent_id_by_name((st),(parent_name),(value_in_range)))
183WS_DLL_PUBLIC
int stats_tree_create_pivot(
stats_tree *st,
187WS_DLL_PUBLIC
int stats_tree_create_pivot_by_pname(
stats_tree *st,
189 const char *parent_name);
191WS_DLL_PUBLIC
int stats_tree_tick_pivot(
stats_tree *st,
193 const char *pivot_value);
195extern void stats_tree_cleanup(
void);
204typedef enum _manip_node_mode {
212WS_DLL_PUBLIC
int stats_tree_manip_node_int(manip_node_mode mode,
219WS_DLL_PUBLIC
int stats_tree_manip_node_float(manip_node_mode mode,
226#define increase_stat_node(st,name,parent_id,with_children,value) \
227 (stats_tree_manip_node_int(MN_INCREASE,(st),(name),(parent_id),(with_children),(value)))
229#define tick_stat_node(st,name,parent_id,with_children) \
230 (stats_tree_manip_node_int(MN_INCREASE,(st),(name),(parent_id),(with_children),1))
232#define set_stat_node(st,name,parent_id,with_children,value) \
233 (stats_tree_manip_node_int(MN_SET,(st),(name),(parent_id),(with_children),value))
235#define zero_stat_node(st,name,parent_id,with_children) \
236 (stats_tree_manip_node_int(MN_SET,(st),(name),(parent_id),(with_children),0))
245#define avg_stat_node_add_value_notick(st,name,parent_id,with_children,value) \
246 (stats_tree_manip_node_int(MN_AVERAGE_NOTICK,(st),(name),(parent_id),(with_children),value))
249#define avg_stat_node_add_value_int(st,name,parent_id,with_children,value) \
250 (stats_tree_manip_node_int(MN_AVERAGE,(st),(name),(parent_id),(with_children),value))
252#define avg_stat_node_add_value_float(st,name,parent_id,with_children,value) \
253 (stats_tree_manip_node_float(MN_AVERAGE,(st),(name),(parent_id),(with_children),value))
256#define stat_node_set_flags(st,name,parent_id,with_children,flags) \
257 (stats_tree_manip_node_int(MN_SET_FLAGS,(st),(name),(parent_id),(with_children),flags))
260#define stat_node_clear_flags(st,name,parent_id,with_children,flags) \
261 (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:346
WS_DLL_PUBLIC void stats_tree_set_group(stats_tree_cfg *st_config, register_stat_group_t stat_group)
Definition stats_tree.c:339
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:285
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:326
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