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>
44 #endif /* __cplusplus */
47 GHashTable* counts_hash; /* packet counters keyed by proto */
48 gint other; /* Packets not counted in the hash total */
49 gint total; /* Cache of total packets */
53 /** Current Capture info. */
56 gpointer ui; /**< user interface handle */
59 packet_counts *counts; /**< protocol specific counters */
60 time_t running_time; /**< running time since last update */
61 gint new_packets; /**< packets since last update */
64 typedef struct _info_data {
65 packet_counts counts; /* Packet counting */
66 struct wtap* wtap; /* current wtap file */
67 capture_info ui; /* user interface data */
70 /* open the info - init values (wtap, counts), create dialog */
71 extern void capture_info_open(capture_session *cap_session, info_data_t* cap_info);
73 /* new file arrived - (eventually close old wtap), open wtap */
74 extern gboolean capture_info_new_file(const char *new_filename, info_data_t* cap_info);
76 /* new packets arrived - read from wtap, count */
77 extern void capture_info_new_packets(int to_read, info_data_t* cap_info);
79 /* close the info - close wtap, destroy dialog */
80 extern void capture_info_close(info_data_t* cap_info);
82 /** Create the capture info dialog */
84 capture_info_ui_create(capture_info *cinfo, capture_session *cap_session);
86 /** Update the capture info counters in the dialog */
87 extern void capture_info_ui_update(
90 /** Destroy the capture info dialog again */
91 extern void capture_info_ui_destroy(
96 #endif /* __cplusplus */
98 #endif /* capture_info.h */
101 * Editor modelines - http://www.wireshark.org/tools/modelines.html
106 * indent-tabs-mode: nil
109 * vi: set shiftwidth=4 tabstop=8 expandtab:
110 * :indentSize=4:tabSize=8:noTabs=true: