ws_pipe: Zero an array.
[metze/wireshark/wip.git] / capture_info.h
1 /* capture_info.h
2  * capture info functions
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * SPDX-License-Identifier: GPL-2.0-or-later
9  */
10
11
12 /** @file
13  *
14  * Capture info functions.
15  *
16  */
17
18 /*
19  * GTK+ only.
20  * If we add this to the Qt UI we should modernize the statistics we show.
21  * At the very least we should remove or hide IPX and VINES.
22  */
23
24 #ifndef __CAPTURE_INFO_H__
25 #define __CAPTURE_INFO_H__
26
27 #include "capture_opts.h"
28 #include <capchild/capture_session.h>
29 #include <epan/capture_dissectors.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34
35 /** Current Capture info. */
36 typedef struct {
37     /* handle */
38     gpointer        ui;             /**< user interface handle */
39
40     /* capture info */
41     packet_counts   *counts;        /**< protocol specific counters */
42     time_t          running_time;   /**< running time since last update */
43     gint            new_packets;    /**< packets since last update */
44 } capture_info;
45
46 typedef struct _info_data {
47     packet_counts     counts;     /* Packet counting */
48     struct wtap*      wtap;       /* current wtap file */
49     capture_info      ui;         /* user interface data */
50 } info_data_t;
51
52 /* new packets arrived - read from wtap, count */
53 extern void capture_info_new_packets(int to_read, info_data_t* cap_info);
54
55 /** Create the capture info dialog */
56 extern void
57 capture_info_ui_create(capture_info *cinfo, capture_session *cap_session);
58
59 /** Update the capture info counters in the dialog */
60 extern void capture_info_ui_update(
61 capture_info    *cinfo);
62
63 /** Destroy the capture info dialog again */
64 extern void capture_info_ui_destroy(
65 capture_info    *cinfo);
66
67 #ifdef __cplusplus
68 }
69 #endif /* __cplusplus */
70
71 #endif /* capture_info.h */
72
73 /*
74  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
75  *
76  * Local variables:
77  * c-basic-offset: 4
78  * tab-width: 8
79  * indent-tabs-mode: nil
80  * End:
81  *
82  * vi: set shiftwidth=4 tabstop=8 expandtab:
83  * :indentSize=4:tabSize=8:noTabs=true:
84  */