14#ifndef __IO_GRAPH_ITEM_H__
15#define __IO_GRAPH_ITEM_H__
95reset_io_graph_items(
io_graph_item_t *items,
size_t count,
int hf_index _U_) {
99 for (i = 0; i < count; i++) {
234 if (edt && hf_index >= 0) {
245 for (i=0; i < gp->len; i++) {
257 new_uint64 = fvalue_get_uinteger(((
field_info *)gp->pdata[i])->value);
263 if ((new_uint64 < item->uint_min) || (item->
fields == 0)) {
274 new_int64 = fvalue_get_sinteger(((
field_info *)gp->pdata[i])->value);
279 if ((new_int64 < item->int_min) || (item->
fields == 0)) {
290 new_uint64 = fvalue_get_uinteger64(((
field_info *)gp->pdata[i])->value);
295 if ((new_uint64 < item->uint_min) || (item->
fields == 0)) {
306 new_int64 = fvalue_get_sinteger64(((
field_info *)gp->pdata[i])->value);
311 if ((new_int64 < item->int_min) || (item->
fields == 0)) {
319 new_float = (float)fvalue_get_floating(((
field_info *)gp->pdata[i])->value);
324 if ((new_float < item->double_min) || (item->
fields == 0)) {
332 new_double = fvalue_get_floating(((
field_info *)gp->pdata[i])->value);
337 if ((new_double < item->double_min) || (item->
fields == 0)) {
345 new_time = fvalue_get_time(((
field_info *)gp->pdata[i])->value);
358 const nstime_t time_zero = NSTIME_INIT_ZERO;
359 if (nstime_cmp(new_time, &time_zero) < 0) {
363 t = t * 1000000 + new_time->nsecs / 1000;
370 pt = pinfo->
rel_ts.secs * 1000000 + pinfo->
rel_ts.nsecs / 1000;
378 load_item = &items[j];
379 load_item->
time_tot.nsecs += (int) (pt * 1000);
380 if (load_item->
time_tot.nsecs > 1000000000) {
382 load_item->
time_tot.nsecs -= 1000000000;
391 if (t > (uint64_t) interval) {
392 pt = (uint64_t) interval;
400 if ( (nstime_cmp(new_time, &item->
time_max) > 0)
405 if ( (nstime_cmp(new_time, &item->
time_min) < 0)
438 item->
bytes += pinfo->
fd->pkt_len;
@ FT_INT64
Definition ftypes.h:46
@ FT_FLOAT
Definition ftypes.h:49
@ FT_INT16
Definition ftypes.h:40
@ FT_RELATIVE_TIME
Definition ftypes.h:52
@ FT_UINT64
Definition ftypes.h:38
@ FT_INT32
Definition ftypes.h:42
@ FT_INT8
Definition ftypes.h:39
@ FT_INT40
Definition ftypes.h:43
@ FT_UINT24
Definition ftypes.h:33
@ FT_INT24
Definition ftypes.h:41
@ FT_UINT8
Definition ftypes.h:31
@ FT_INT48
Definition ftypes.h:44
@ FT_DOUBLE
Definition ftypes.h:50
@ FT_INT56
Definition ftypes.h:45
@ FT_UINT48
Definition ftypes.h:36
@ FT_UINT16
Definition ftypes.h:32
@ FT_UINT32
Definition ftypes.h:34
@ FT_UINT56
Definition ftypes.h:37
@ FT_UINT40
Definition ftypes.h:35
enum ftenum proto_registrar_get_ftype(const int n)
Definition proto.c:11546
GPtrArray * proto_get_finfo_ptr_array(const proto_tree *tree, const int id)
Definition proto.c:11634
GString * check_field_unit(const char *field_name, int *hf_index, io_graph_item_unit_t item_unit, const char *type_unit_name)
Definition io_graph_item.c:43
struct _io_graph_item_t io_graph_item_t
Accumulated statistics for all frames falling within a single I/O graph time interval.
int64_t get_io_graph_index(packet_info *pinfo, int interval)
Definition io_graph_item.c:24
double get_io_graph_item(const io_graph_item_t *items, io_graph_item_unit_t val_units, int idx, int hf_index, const capture_file *cap_file, int interval, int cur_idx, bool asAOT)
Definition io_graph_item.c:141
io_graph_item_unit_t
Selects the Y-axis value unit or aggregate calculation mode for an I/O graph plot.
Definition io_graph_item.h:29
@ IOG_ITEM_UNIT_CALC_FIELDS
Definition io_graph_item.h:36
@ IOG_ITEM_UNIT_BITS
Definition io_graph_item.h:33
@ IOG_ITEM_UNIT_CALC_SUM
Definition io_graph_item.h:34
@ IOG_ITEM_UNIT_CALC_MIN
Definition io_graph_item.h:38
@ IOG_ITEM_UNIT_CALC_THROUGHPUT
Definition io_graph_item.h:40
@ IOG_ITEM_UNIT_BYTES
Definition io_graph_item.h:32
@ IOG_ITEM_UNIT_CALC_FRAMES
Definition io_graph_item.h:35
@ IOG_ITEM_UNIT_PACKETS
Definition io_graph_item.h:31
@ IOG_ITEM_UNIT_CALC_LOAD
Definition io_graph_item.h:41
@ IOG_ITEM_UNIT_LAST
Definition io_graph_item.h:42
@ NUM_IOG_ITEM_UNITS
Definition io_graph_item.h:43
@ IOG_ITEM_UNIT_CALC_MAX
Definition io_graph_item.h:37
@ IOG_ITEM_UNIT_CALC_AVERAGE
Definition io_graph_item.h:39
@ IOG_ITEM_UNIT_FIRST
Definition io_graph_item.h:30
#define nstime_add(sum, a)
Adds a time value to an existing sum.
Definition nstime.h:208
Represents a capture file and its associated metadata.
Definition cfile.h:84
Accumulated statistics for all frames falling within a single I/O graph time interval.
Definition io_graph_item.h:56
int64_t int_max
Definition io_graph_item.h:65
uint32_t max_frame_in_invl
Definition io_graph_item.h:85
nstime_t time_tot
Definition io_graph_item.h:79
double double_min
Definition io_graph_item.h:72
double double_tot
Definition io_graph_item.h:80
uint32_t frames
Definition io_graph_item.h:57
uint64_t uint_min
Definition io_graph_item.h:74
uint32_t min_frame_in_invl
Definition io_graph_item.h:84
nstime_t time_max
Definition io_graph_item.h:63
uint64_t fields
Definition io_graph_item.h:59
nstime_t time_min
Definition io_graph_item.h:71
uint64_t uint_max
Definition io_graph_item.h:66
int64_t int_min
Definition io_graph_item.h:73
double double_max
Definition io_graph_item.h:64
uint32_t first_frame_in_invl
Definition io_graph_item.h:83
uint64_t bytes
Definition io_graph_item.h:58
uint32_t last_frame_in_invl
Definition io_graph_item.h:86
Represents the metadata and indexing information for a single captured frame.
Definition packet_info.h:43
frame_data * fd
Definition packet_info.h:53
uint32_t num
Definition packet_info.h:47
nstime_t rel_ts
Definition packet_info.h:49
Holds all state for the dissection of a single byte array, including session, buffer,...
Definition epan_dissect.h:28
proto_tree * tree
Definition epan_dissect.h:31
#define ws_assert_not_reached()
Unconditionally abort execution if reached; always indicates a programming error.
Definition ws_assert.h:166