tests: add regression tests for Follow TCP Stream
[metze/wireshark/wip.git] / ui / proto_hier_stats.h
1 /* proto_hier_stats.h
2  *
3  * Wireshark - Network traffic analyzer
4  * By Gerald Combs <gerald@wireshark.org>
5  * Copyright 1998 Gerald Combs
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9
10 #ifndef __UI_PROTO_HIER_STATS_H__
11 #define __UI_PROTO_HIER_STATS_H__
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif /* __cplusplus */
16
17 /** @file
18  * Protocol Hierarchy Statistics
19  */
20
21 #include <epan/proto.h>
22 #include "cfile.h"
23
24 typedef struct {
25     header_field_info   *hfinfo;
26     guint               num_pkts_total;
27     guint               num_pkts_last;
28     guint               num_bytes_total;
29     guint               num_bytes_last;
30 } ph_stats_node_t;
31
32
33 typedef struct {
34     guint       tot_packets;
35     guint       tot_bytes;
36     GNode       *stats_tree;
37     double      first_time;     /* seconds (msec resolution) of first packet */
38     double      last_time;      /* seconds (msec resolution) of last packet  */
39 } ph_stats_t;
40
41 ph_stats_t *ph_stats_new(capture_file *cf);
42
43 void ph_stats_free(ph_stats_t *ps);
44
45 #ifdef __cplusplus
46 }
47 #endif /* __cplusplus */
48
49 #endif /* __UI_PROTO_HIER_STATS_H__ */
50
51 /*
52  * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
53  *
54  * Local Variables:
55  * c-basic-offset: 4
56  * tab-width: 8
57  * indent-tabs-mode: nil
58  * End:
59  *
60  * ex: set shiftwidth=4 tabstop=8 expandtab:
61  * :indentSize=4:tabSize=8:noTabs=true:
62  */