2 * capture info functions
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
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.
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.
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.
26 * Capture info functions.
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.
36 #ifndef __CAPTURE_INFO_H__
37 #define __CAPTURE_INFO_H__
39 #include "capture_opts.h"
40 #include <capchild/capture_session.h>
41 #include <epan/capture_dissectors.h>
45 #endif /* __cplusplus */
47 /** Current Capture info. */
50 gpointer ui; /**< user interface handle */
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 */
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 */
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);
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);
70 /* new packets arrived - read from wtap, count */
71 extern void capture_info_new_packets(int to_read, info_data_t* cap_info);
73 /* close the info - close wtap, destroy dialog */
74 extern void capture_info_close(info_data_t* cap_info);
76 /** Create the capture info dialog */
78 capture_info_ui_create(capture_info *cinfo, capture_session *cap_session);
80 /** Update the capture info counters in the dialog */
81 extern void capture_info_ui_update(
84 /** Destroy the capture info dialog again */
85 extern void capture_info_ui_destroy(
90 #endif /* __cplusplus */
92 #endif /* capture_info.h */
95 * Editor modelines - http://www.wireshark.org/tools/modelines.html
100 * indent-tabs-mode: nil
103 * vi: set shiftwidth=4 tabstop=8 expandtab:
104 * :indentSize=4:tabSize=8:noTabs=true: