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 *);
99 stat_tree_packet_cb
packet,
100 stat_tree_init_cb
init,
117 stat_tree_packet_cb
packet,
118 stat_tree_init_cb
init,
169 const char *parent_name,
217 const char *parent_name,
235#define stats_tree_tick_range_by_pname(st,name,parent_name,value_in_range) \
236 stats_tree_tick_range((st),(name),stats_tree_parent_id_by_name((st),(parent_name),(value_in_range)))
260 const char *parent_name);
274 const char *pivot_value);
336#define increase_stat_node(st,name,parent_id,with_children,value) \
337 (stats_tree_manip_node_int(MN_INCREASE,(st),(name),(parent_id),(with_children),(value)))
339#define tick_stat_node(st,name,parent_id,with_children) \
340 (stats_tree_manip_node_int(MN_INCREASE,(st),(name),(parent_id),(with_children),1))
342#define set_stat_node(st,name,parent_id,with_children,value) \
343 (stats_tree_manip_node_int(MN_SET,(st),(name),(parent_id),(with_children),value))
345#define zero_stat_node(st,name,parent_id,with_children) \
346 (stats_tree_manip_node_int(MN_SET,(st),(name),(parent_id),(with_children),0))
355#define avg_stat_node_add_value_notick(st,name,parent_id,with_children,value) \
356 (stats_tree_manip_node_int(MN_AVERAGE_NOTICK,(st),(name),(parent_id),(with_children),value))
359#define avg_stat_node_add_value_int(st,name,parent_id,with_children,value) \
360 (stats_tree_manip_node_int(MN_AVERAGE,(st),(name),(parent_id),(with_children),value))
362#define avg_stat_node_add_value_float(st,name,parent_id,with_children,value) \
363 (stats_tree_manip_node_float(MN_AVERAGE,(st),(name),(parent_id),(with_children),value))
366#define stat_node_set_flags(st,name,parent_id,with_children,flags) \
367 (stats_tree_manip_node_int(MN_SET_FLAGS,(st),(name),(parent_id),(with_children),flags))
370#define stat_node_clear_flags(st,name,parent_id,with_children,flags) \
371 (stats_tree_manip_node_int(MN_CLEAR_FLAGS,(st),(name),(parent_id),(with_children),flags))
enum register_stat_group_e register_stat_group_t
_manip_node_mode
Operation applied to a statistics tree node's value when it is manipulated.
Definition stats_tree.h:291
@ MN_AVERAGE_NOTICK
Definition stats_tree.h:295
@ MN_CLEAR_FLAGS
Definition stats_tree.h:297
@ MN_SET_FLAGS
Definition stats_tree.h:296
@ MN_SET
Definition stats_tree.h:293
@ MN_AVERAGE
Definition stats_tree.h:294
@ MN_INCREASE
Definition stats_tree.h:292
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 using its parent's tree name.
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
enum _stat_node_datatype stat_node_datatype
Numeric data type stored in a statistics tree node's accumulator.
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
enum _manip_node_mode manip_node_mode
Operation applied to a statistics tree node's value when it is manipulated.
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 int stats_tree_create_node(stats_tree *st, const char *name, int parent_id, stat_node_datatype datatype, bool with_children)
Creates a node in the tree (to be used in the in init_cb)
Definition stats_tree.c:571
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
_stat_node_datatype
Numeric data type stored in a statistics tree node's accumulator.
Definition stats_tree.h:74
@ STAT_DT_FLOAT
Definition stats_tree.h:76
@ STAT_DT_INT
Definition stats_tree.h:75
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
Defines the static configuration and callbacks for a statistics tree type, shared across all instance...
Definition stats_tree_priv.h:142
unsigned flags
Definition stats_tree_priv.h:157
stat_tree_init_cb init
Definition stats_tree_priv.h:154
char * tapname
Definition stats_tree_priv.h:146
stat_tree_packet_cb packet
Definition stats_tree_priv.h:153
char * path
Definition stats_tree_priv.h:144
register_stat_group_t stat_group
Definition stats_tree_priv.h:148
stat_tree_cleanup_cb cleanup
Definition stats_tree_priv.h:155
char * abbr
Definition stats_tree_priv.h:143
Represents a live statistics tree instance, holding runtime state for accumulating and displaying tap...
Definition stats_tree_priv.h:117
Definition packet-epl-profile-parser.c:79
Holds all state for the dissection of a single byte array, including session, buffer,...
Definition epan_dissect.h:28
tap_packet_status
Definition tap.h:22