From f2b8504740f3fd145a5504682c3788947e151606 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Sat, 19 Dec 2015 10:11:40 -0500 Subject: Don't limit capture packet counts to a fixed set of protocols. Kept backwards compatibility with GTK+ capture info dialog by keeping the protocols tracked hardcoded, but Qt should have more freedom. Change-Id: I497be71ec761d53f312e14858daa7152d01b8c72 Reviewed-on: https://code.wireshark.org/review/12724 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman --- capture_info.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'capture_info.h') diff --git a/capture_info.h b/capture_info.h index abc0b2e91f..8e2e7b6bed 100644 --- a/capture_info.h +++ b/capture_info.h @@ -39,13 +39,17 @@ #include "capture_opts.h" #include -/* XXX - Should be temporary until packet_counts is removed */ -#include - #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ +typedef struct { + GHashTable* counts_hash; /* packet counters keyed by proto */ + gint other; /* Packets not counted in the hash total */ + gint total; /* Cache of total packets */ + +} packet_counts; + /** Current Capture info. */ typedef struct { /* handle */ @@ -58,7 +62,7 @@ typedef struct { } capture_info; typedef struct _info_data { - packet_counts counts; /* several packet type counters */ + packet_counts counts; /* Packet counting */ struct wtap* wtap; /* current wtap file */ capture_info ui; /* user interface data */ } info_data_t; -- cgit v1.2.1