capchild: use SPDX identifiers.
[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+
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 /* close the info - close wtap, destroy dialog */
56 extern void capture_info_close(info_data_t* cap_info);
57
58 /** Create the capture info dialog */
59 extern void
60 capture_info_ui_create(capture_info *cinfo, capture_session *cap_session);
61
62 /** Update the capture info counters in the dialog */
63 extern void capture_info_ui_update(
64 capture_info    *cinfo);
65
66 /** Destroy the capture info dialog again */
67 extern void capture_info_ui_destroy(
68 capture_info    *cinfo);
69
70 #ifdef __cplusplus
71 }
72 #endif /* __cplusplus */
73
74 #endif /* capture_info.h */
75
76 /*
77  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
78  *
79  * Local variables:
80  * c-basic-offset: 4
81  * tab-width: 8
82  * indent-tabs-mode: nil
83  * End:
84  *
85  * vi: set shiftwidth=4 tabstop=8 expandtab:
86  * :indentSize=4:tabSize=8:noTabs=true:
87  */