Update to the FreeRADIUS version.
[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  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22
23
24 /** @file
25  *
26  * Capture info functions.
27  *
28  */
29
30 /*
31  * GTK+ only.
32  * If we add this to the Qt UI we should modernize the statistics we show.
33  * At the very least we should remove or hide IPX and VINES.
34  */
35
36 #ifndef __CAPTURE_INFO_H__
37 #define __CAPTURE_INFO_H__
38
39 #include "capture_opts.h"
40 #include <capchild/capture_session.h>
41 #include <epan/capture_dissectors.h>
42
43 #ifdef __cplusplus
44 extern "C" {
45 #endif /* __cplusplus */
46
47 /** Current Capture info. */
48 typedef struct {
49     /* handle */
50     gpointer        ui;             /**< user interface handle */
51
52     /* capture info */
53     packet_counts   *counts;        /**< protocol specific counters */
54     time_t          running_time;   /**< running time since last update */
55     gint            new_packets;    /**< packets since last update */
56 } capture_info;
57
58 typedef struct _info_data {
59     packet_counts     counts;     /* Packet counting */
60     struct wtap*      wtap;       /* current wtap file */
61     capture_info      ui;         /* user interface data */
62 } info_data_t;
63
64 /* open the info - init values (wtap, counts), create dialog */
65 extern void capture_info_open(capture_session *cap_session, info_data_t* cap_info);
66
67 /* new file arrived - (eventually close old wtap), open wtap */
68 extern gboolean capture_info_new_file(const char *new_filename, info_data_t* cap_info);
69
70 /* new packets arrived - read from wtap, count */
71 extern void capture_info_new_packets(int to_read, info_data_t* cap_info);
72
73 /* close the info - close wtap, destroy dialog */
74 extern void capture_info_close(info_data_t* cap_info);
75
76 /** Create the capture info dialog */
77 extern void
78 capture_info_ui_create(capture_info *cinfo, capture_session *cap_session);
79
80 /** Update the capture info counters in the dialog */
81 extern void capture_info_ui_update(
82 capture_info    *cinfo);
83
84 /** Destroy the capture info dialog again */
85 extern void capture_info_ui_destroy(
86 capture_info    *cinfo);
87
88 #ifdef __cplusplus
89 }
90 #endif /* __cplusplus */
91
92 #endif /* capture_info.h */
93
94 /*
95  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
96  *
97  * Local variables:
98  * c-basic-offset: 4
99  * tab-width: 8
100  * indent-tabs-mode: nil
101  * End:
102  *
103  * vi: set shiftwidth=4 tabstop=8 expandtab:
104  * :indentSize=4:tabSize=8:noTabs=true:
105  */