16#include "ws_symbol_export.h"
22#define STAT_TREE_ROOT "root"
23#define STATS_TREE_MENU_SEPARATOR "//"
33#define ST_FLG_AVERAGE 0x10000000
34#define ST_FLG_ROOTCHILD 0x20000000
37#define ST_FLG_DEF_NOEXPAND 0x01000000
38#define ST_FLG_SORT_TOP 0x00400000
41#define ST_FLG_SORT_DESC 0x00800000
42#define ST_FLG_SRTCOL_MASK 0x000F0000
43#define ST_FLG_SRTCOL_SHIFT 16
45#define ST_FLG_MASK (ST_FLG_AVERAGE|ST_FLG_ROOTCHILD|ST_FLG_DEF_NOEXPAND| \
46 ST_FLG_SORT_TOP|ST_FLG_SORT_DESC|ST_FLG_SRTCOL_MASK)
48#define ST_SORT_COL_NAME 1
49#define ST_SORT_COL_COUNT 2
50#define ST_SORT_COL_AVG 3
51#define ST_SORT_COL_MIN 4
52#define ST_SORT_COL_MAX 5
53#define ST_SORT_COL_BURSTRATE 6
66typedef void (*stat_tree_init_cb)(
stats_tree *);
69typedef void (*stat_tree_cleanup_cb)(
stats_tree *);
71typedef enum _stat_node_datatype {
96 stat_tree_packet_cb
packet,
97 stat_tree_init_cb init,
98 stat_tree_cleanup_cb cleanup);
114 stat_tree_packet_cb
packet,
115 stat_tree_init_cb init,
116 stat_tree_cleanup_cb cleanup);
148WS_DLL_PUBLIC
int stats_tree_create_node(
stats_tree *st,
164 const char *parent_name,
212 const char *parent_name,
230#define stats_tree_tick_range_by_pname(st,name,parent_name,value_in_range) \
231 stats_tree_tick_range((st),(name),stats_tree_parent_id_by_name((st),(parent_name),(value_in_range)))
255 const char *parent_name);
269 const char *pivot_value);
285typedef enum _manip_node_mode {
330#define increase_stat_node(st,name,parent_id,with_children,value) \
331 (stats_tree_manip_node_int(MN_INCREASE,(st),(name),(parent_id),(with_children),(value)))
333#define tick_stat_node(st,name,parent_id,with_children) \
334 (stats_tree_manip_node_int(MN_INCREASE,(st),(name),(parent_id),(with_children),1))
336#define set_stat_node(st,name,parent_id,with_children,value) \
337 (stats_tree_manip_node_int(MN_SET,(st),(name),(parent_id),(with_children),value))
339#define zero_stat_node(st,name,parent_id,with_children) \
340 (stats_tree_manip_node_int(MN_SET,(st),(name),(parent_id),(with_children),0))
349#define avg_stat_node_add_value_notick(st,name,parent_id,with_children,value) \
350 (stats_tree_manip_node_int(MN_AVERAGE_NOTICK,(st),(name),(parent_id),(with_children),value))
353#define avg_stat_node_add_value_int(st,name,parent_id,with_children,value) \
354 (stats_tree_manip_node_int(MN_AVERAGE,(st),(name),(parent_id),(with_children),value))
356#define avg_stat_node_add_value_float(st,name,parent_id,with_children,value) \
357 (stats_tree_manip_node_float(MN_AVERAGE,(st),(name),(parent_id),(with_children),value))
360#define stat_node_set_flags(st,name,parent_id,with_children,flags) \
361 (stats_tree_manip_node_int(MN_SET_FLAGS,(st),(name),(parent_id),(with_children),flags))
364#define stat_node_clear_flags(st,name,parent_id,with_children,flags) \
365 (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
WS_DLL_PUBLIC int stats_tree_range_node_with_pname(stats_tree *st, const char *name, const char *parent_name,...)
Increases by one the ranged node and the sub node to whose range the value belongs.
Definition stats_tree.c:925
void stats_tree_init(void)
Definition stats_tree.c:284
WS_DLL_PUBLIC int stats_tree_create_pivot_by_pname(stats_tree *st, const char *name, const char *parent_name)
Creates a pivot node in the statistics tree by name.
Definition stats_tree.c:1014
WS_DLL_PUBLIC int stats_tree_parent_id_by_name(stats_tree *st, const char *parent_name)
Retrieves the parent ID of a node in the stats tree by its name.
Definition stats_tree.c:913
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 int stats_tree_create_node_by_pname(stats_tree *st, const char *name, const char *parent_name, stat_node_datatype datatype, bool with_children)
Creates a node in the statistics tree.
Definition stats_tree.c:583
WS_DLL_PUBLIC int stats_tree_create_range_node(stats_tree *st, const char *name, int parent_id,...)
Creates a node in the stats tree that will contain a ranges list.
Definition stats_tree.c:872
void stats_tree_cleanup(void)
Cleans up the statistics tree registry.
Definition stats_tree.c:1523
WS_DLL_PUBLIC int stats_tree_manip_node_float(manip_node_mode mode, stats_tree *st, const char *name, int parent_id, bool with_children, float value)
Manipulates a node in the statistics tree with a float value.
Definition stats_tree.c:745
WS_DLL_PUBLIC int stats_tree_tick_pivot(stats_tree *st, int pivot_id, const char *pivot_value)
Ticks a pivot node in the statistics tree.
Definition stats_tree.c:1029
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 int stats_tree_create_range_node_string(stats_tree *st, const char *name, int parent_id, int num_str_ranges, char **str_ranges)
Creates a range node in the statistics tree with string ranges.
Definition stats_tree.c:890
WS_DLL_PUBLIC int stats_tree_tick_range(stats_tree *st, const char *name, int parent_id, int value_in_range)
Increment a statistic in a stats tree within a specified range.
Definition stats_tree.c:946
WS_DLL_PUBLIC int stats_tree_manip_node_int(manip_node_mode mode, stats_tree *st, const char *name, int parent_id, bool with_children, int value)
Manipulates a node in a statistics tree by increasing its integer value.
Definition stats_tree.c:683
WS_DLL_PUBLIC int stats_tree_create_pivot(stats_tree *st, const char *name, int parent_id)
Creates a new pivot node in the statistics tree.
Definition stats_tree.c:1003
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:40
Definition stats_tree_priv.h:142
unsigned flags
Definition stats_tree_priv.h:158
stat_tree_packet_cb packet
Definition stats_tree_priv.h:153
Definition stats_tree_priv.h:108
Definition packet-epl-profile-parser.c:79
Definition epan_dissect.h:25
tap_packet_status
Definition tap.h:22