aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c4
-rw-r--r--epan/dissectors/asn1/camel/packet-camel-template.c4
-rw-r--r--epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c4
-rw-r--r--epan/dissectors/asn1/h225/packet-h225-template.c4
-rw-r--r--epan/dissectors/packet-ansi_a.c8
-rw-r--r--epan/dissectors/packet-ansi_map.c4
-rw-r--r--epan/dissectors/packet-bootp.c4
-rw-r--r--epan/dissectors/packet-camel.c4
-rw-r--r--epan/dissectors/packet-gsm_a_common.c44
-rw-r--r--epan/dissectors/packet-gsm_map.c4
-rw-r--r--epan/dissectors/packet-h225.c4
-rw-r--r--epan/dissectors/packet-mtp3.c4
-rw-r--r--epan/dissectors/packet-rpc.c4
-rw-r--r--epan/dissectors/packet-sip.c6
-rw-r--r--epan/dissectors/packet-wsp.c6
-rw-r--r--epan/stat_tap_ui.c17
-rw-r--r--epan/stat_tap_ui.h15
-rw-r--r--sharkd_session.c4
-rw-r--r--ui/cli/tap-simple_stattable.c2
-rw-r--r--ui/qt/simple_statistics_dialog.cpp8
20 files changed, 68 insertions, 86 deletions
diff --git a/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c b/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c
index 41133cf4fc..ea2919ed30 100644
--- a/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c
+++ b/epan/dissectors/asn1/ansi_map/packet-ansi_map-template.c
@@ -4445,10 +4445,10 @@ static stat_tap_table_item stat_fields[] = {{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "
{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Count", " %d "}, {TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Total Bytes", " %d "},
{TABLE_ITEM_FLOAT, TAP_ALIGN_RIGHT, "Avg Bytes", " %8.2f "}};
-static void ansi_map_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void ansi_map_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table* table = stat_tap_init_table("ANSI MAP Operation Statistics", num_fields, 0, "ansi_map.op_code", gui_callback, gui_data);
+ stat_tap_table* table = stat_tap_init_table("ANSI MAP Operation Statistics", num_fields, 0, "ansi_map.op_code");
int i = 0;
stat_tap_table_item_type items[sizeof(stat_fields)/sizeof(stat_tap_table_item)];
diff --git a/epan/dissectors/asn1/camel/packet-camel-template.c b/epan/dissectors/asn1/camel/packet-camel-template.c
index c42babf3b2..8423e90364 100644
--- a/epan/dissectors/asn1/camel/packet-camel-template.c
+++ b/epan/dissectors/asn1/camel/packet-camel-template.c
@@ -1202,10 +1202,10 @@ typedef enum
static stat_tap_table_item camel_stat_fields[] = {{TABLE_ITEM_STRING, TAP_ALIGN_LEFT, "Message Type or Reason", "%-25s"}, {TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Count", "%d"}};
-static void camel_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void camel_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(camel_stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table* table = stat_tap_init_table("CAMEL Message Counters", num_fields, 0, NULL, gui_callback, gui_data);
+ stat_tap_table* table = stat_tap_init_table("CAMEL Message Counters", num_fields, 0, NULL);
int i;
stat_tap_table_item_type items[sizeof(camel_stat_fields)/sizeof(stat_tap_table_item)];
diff --git a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c
index 92ca6e963a..d7fed1efb2 100644
--- a/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c
+++ b/epan/dissectors/asn1/gsm_map/packet-gsm_map-template.c
@@ -2763,7 +2763,7 @@ static stat_tap_table_item gsm_map_stat_fields[] = {
{TABLE_ITEM_FLOAT, TAP_ALIGN_RIGHT, "Avg Bytes", "%d"},
};
-static void gsm_map_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_map_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(gsm_map_stat_fields)/sizeof(stat_tap_table_item);
stat_tap_table* table;
@@ -2783,7 +2783,7 @@ static void gsm_map_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb
items[TOT_BYTES_COLUMN].type = TABLE_ITEM_UINT;
items[AVG_BYTES_COLUMN].type = TABLE_ITEM_FLOAT;
- table = stat_tap_init_table("GSM MAP Operation Statistics", num_fields, 0, NULL, gui_callback, gui_data);
+ table = stat_tap_init_table("GSM MAP Operation Statistics", num_fields, 0, NULL);
stat_tap_add_table(new_stat, table);
/* Add a row for each value type */
diff --git a/epan/dissectors/asn1/h225/packet-h225-template.c b/epan/dissectors/asn1/h225/packet-h225-template.c
index 0bebdc7c8d..38ee412f21 100644
--- a/epan/dissectors/asn1/h225/packet-h225-template.c
+++ b/epan/dissectors/asn1/h225/packet-h225-template.c
@@ -442,10 +442,10 @@ static guint facility_reason_idx[FACILITY_REASONS];
static guint other_idx;
-static void h225_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void h225_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(h225_stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table* table = stat_tap_init_table("H.225 Messages and Message Reasons", num_fields, 0, NULL, gui_callback, gui_data);
+ stat_tap_table* table = stat_tap_init_table("H.225 Messages and Message Reasons", num_fields, 0, NULL);
int row_idx = 0, msg_idx;
stat_tap_table_item_type items[sizeof(h225_stat_fields)/sizeof(stat_tap_table_item)];
diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c
index b56f96cff9..4d791d351c 100644
--- a/epan/dissectors/packet-ansi_a.c
+++ b/epan/dissectors/packet-ansi_a.c
@@ -10573,10 +10573,10 @@ typedef enum
static stat_tap_table_item dtap_stat_fields[] = {{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "IEI", "0x%02x "}, {TABLE_ITEM_STRING, TAP_ALIGN_LEFT, "Message Name", "%-50s"},
{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Count", "%d"}};
-static void ansi_a_dtap_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void ansi_a_dtap_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(dtap_stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table* table = stat_tap_init_table("ANSI A-I/F DTAP Statistics", num_fields, 0, NULL, gui_callback, gui_data);
+ stat_tap_table* table = stat_tap_init_table("ANSI A-I/F DTAP Statistics", num_fields, 0, NULL);
int i = 0;
stat_tap_table_item_type items[sizeof(dtap_stat_fields)/sizeof(stat_tap_table_item)];
@@ -10641,10 +10641,10 @@ ansi_a_stat_reset(stat_tap_table* table)
static stat_tap_table_item bsmap_stat_fields[] = {{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "IEI", "0x%02x "}, {TABLE_ITEM_STRING, TAP_ALIGN_LEFT, "Message Name", "%-50s"},
{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Count", "%d"}};
-static void ansi_a_bsmap_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void ansi_a_bsmap_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(bsmap_stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table* table = stat_tap_init_table("ANSI A-I/F BSMAP Statistics", num_fields, 0, NULL, gui_callback, gui_data);
+ stat_tap_table* table = stat_tap_init_table("ANSI A-I/F BSMAP Statistics", num_fields, 0, NULL);
int i = 0;
stat_tap_table_item_type items[sizeof(bsmap_stat_fields)/sizeof(stat_tap_table_item)];
diff --git a/epan/dissectors/packet-ansi_map.c b/epan/dissectors/packet-ansi_map.c
index 7f5aaa261d..3065554ba4 100644
--- a/epan/dissectors/packet-ansi_map.c
+++ b/epan/dissectors/packet-ansi_map.c
@@ -16094,10 +16094,10 @@ static stat_tap_table_item stat_fields[] = {{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "
{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Count", " %d "}, {TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Total Bytes", " %d "},
{TABLE_ITEM_FLOAT, TAP_ALIGN_RIGHT, "Avg Bytes", " %8.2f "}};
-static void ansi_map_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void ansi_map_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table* table = stat_tap_init_table("ANSI MAP Operation Statistics", num_fields, 0, "ansi_map.op_code", gui_callback, gui_data);
+ stat_tap_table* table = stat_tap_init_table("ANSI MAP Operation Statistics", num_fields, 0, "ansi_map.op_code");
int i = 0;
stat_tap_table_item_type items[sizeof(stat_fields)/sizeof(stat_tap_table_item)];
diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c
index b31b044e7f..e7068db273 100644
--- a/epan/dissectors/packet-bootp.c
+++ b/epan/dissectors/packet-bootp.c
@@ -6629,10 +6629,10 @@ typedef enum
static stat_tap_table_item bootp_stat_fields[] = {{TABLE_ITEM_STRING, TAP_ALIGN_LEFT, "DHCP Message Type", "%-25s"}, {TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Packets", "%d"}};
-static void bootp_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void bootp_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(bootp_stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table* table = stat_tap_init_table("DHCP Statistics", num_fields, 0, NULL, gui_callback, gui_data);
+ stat_tap_table* table = stat_tap_init_table("DHCP Statistics", num_fields, 0, NULL);
int i = 0;
stat_tap_table_item_type items[sizeof(bootp_stat_fields)/sizeof(stat_tap_table_item)];
diff --git a/epan/dissectors/packet-camel.c b/epan/dissectors/packet-camel.c
index aea7ef6ff7..92f41a8939 100644
--- a/epan/dissectors/packet-camel.c
+++ b/epan/dissectors/packet-camel.c
@@ -8167,10 +8167,10 @@ typedef enum
static stat_tap_table_item camel_stat_fields[] = {{TABLE_ITEM_STRING, TAP_ALIGN_LEFT, "Message Type or Reason", "%-25s"}, {TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Count", "%d"}};
-static void camel_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void camel_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(camel_stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table* table = stat_tap_init_table("CAMEL Message Counters", num_fields, 0, NULL, gui_callback, gui_data);
+ stat_tap_table* table = stat_tap_init_table("CAMEL Message Counters", num_fields, 0, NULL);
int i;
stat_tap_table_item_type items[sizeof(camel_stat_fields)/sizeof(stat_tap_table_item)];
diff --git a/epan/dissectors/packet-gsm_a_common.c b/epan/dissectors/packet-gsm_a_common.c
index 5821b1e711..a90bfef093 100644
--- a/epan/dissectors/packet-gsm_a_common.c
+++ b/epan/dissectors/packet-gsm_a_common.c
@@ -3548,7 +3548,7 @@ static stat_tap_table_item gsm_a_stat_fields[] = {
{TABLE_ITEM_UINT, TAP_ALIGN_RIGHT, "Count", "%d"}
};
-static void gsm_a_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data, const char *table_title, const value_string *msg_strings)
+static void gsm_a_stat_init(stat_tap_table_ui* new_stat, const char *table_title, const value_string *msg_strings)
{
int num_fields = sizeof(gsm_a_stat_fields)/sizeof(stat_tap_table_item);
stat_tap_table* table;
@@ -3560,7 +3560,7 @@ static void gsm_a_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gu
items[COUNT_COLUMN].type = TABLE_ITEM_UINT;
items[COUNT_COLUMN].value.uint_value = 0;
- table = stat_tap_init_table(table_title, num_fields, 0, NULL, gui_callback, gui_data);
+ table = stat_tap_init_table(table_title, num_fields, 0, NULL);
stat_tap_add_table(new_stat, table);
/* Add a row for each value type */
@@ -3580,63 +3580,63 @@ static void gsm_a_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gu
}
}
-static void gsm_a_bssmap_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_a_bssmap_stat_init(stat_tap_table_ui* new_stat)
{
- gsm_a_stat_init(new_stat, gui_callback, gui_data,
+ gsm_a_stat_init(new_stat,
"GSM A-I/F BSSMAP Statistics", gsm_a_bssmap_msg_strings);
}
-static void gsm_a_dtap_mm_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_a_dtap_mm_stat_init(stat_tap_table_ui* new_stat)
{
- gsm_a_stat_init(new_stat, gui_callback, gui_data,
+ gsm_a_stat_init(new_stat,
"GSM A-I/F DTAP Mobility Management Statistics", gsm_a_dtap_msg_mm_strings);
}
-static void gsm_a_dtap_rr_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_a_dtap_rr_stat_init(stat_tap_table_ui* new_stat)
{
- gsm_a_stat_init(new_stat, gui_callback, gui_data,
+ gsm_a_stat_init(new_stat,
"GSM A-I/F DTAP Radio Resource Management Statistics", gsm_a_dtap_msg_rr_strings);
}
-static void gsm_a_dtap_cc_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_a_dtap_cc_stat_init(stat_tap_table_ui* new_stat)
{
- gsm_a_stat_init(new_stat, gui_callback, gui_data,
+ gsm_a_stat_init(new_stat,
"GSM A-I/F DTAP Call Control Statistics", gsm_a_dtap_msg_cc_strings);
}
-static void gsm_a_dtap_gmm_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_a_dtap_gmm_stat_init(stat_tap_table_ui* new_stat)
{
- gsm_a_stat_init(new_stat, gui_callback, gui_data,
+ gsm_a_stat_init(new_stat,
"GSM A-I/F DTAP GPRS Mobility Management Statistics", gsm_a_dtap_msg_gmm_strings);
}
-static void gsm_a_dtap_sm_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_a_dtap_sm_stat_init(stat_tap_table_ui* new_stat)
{
- gsm_a_stat_init(new_stat, gui_callback, gui_data,
+ gsm_a_stat_init(new_stat,
"GSM A-I/F DTAP GPRS Session Management Statistics", gsm_a_dtap_msg_sm_strings);
}
-static void gsm_a_dtap_sms_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_a_dtap_sms_stat_init(stat_tap_table_ui* new_stat)
{
- gsm_a_stat_init(new_stat, gui_callback, gui_data,
+ gsm_a_stat_init(new_stat,
"GSM A-I/F DTAP Short Message Service Statistics", gsm_a_dtap_msg_sms_strings);
}
-static void gsm_a_dtap_tp_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_a_dtap_tp_stat_init(stat_tap_table_ui* new_stat)
{
- gsm_a_stat_init(new_stat, gui_callback, gui_data,
+ gsm_a_stat_init(new_stat,
"GSM A-I/F DTAP Special Conformance Testing Functions", gsm_a_dtap_msg_tp_strings);
}
-static void gsm_a_dtap_ss_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_a_dtap_ss_stat_init(stat_tap_table_ui* new_stat)
{
- gsm_a_stat_init(new_stat, gui_callback, gui_data,
+ gsm_a_stat_init(new_stat,
"GSM A-I/F DTAP Supplementary Services Statistics", gsm_a_dtap_msg_ss_strings);
}
-static void gsm_a_sacch_rr_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_a_sacch_rr_stat_init(stat_tap_table_ui* new_stat)
{
- gsm_a_stat_init(new_stat, gui_callback, gui_data,
+ gsm_a_stat_init(new_stat,
"GSM A-I/F SACCH Statistics", gsm_a_rr_short_pd_msg_strings);
}
diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c
index 36b320477b..bb79ac6b03 100644
--- a/epan/dissectors/packet-gsm_map.c
+++ b/epan/dissectors/packet-gsm_map.c
@@ -23455,7 +23455,7 @@ static stat_tap_table_item gsm_map_stat_fields[] = {
{TABLE_ITEM_FLOAT, TAP_ALIGN_RIGHT, "Avg Bytes", "%d"},
};
-static void gsm_map_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void gsm_map_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(gsm_map_stat_fields)/sizeof(stat_tap_table_item);
stat_tap_table* table;
@@ -23475,7 +23475,7 @@ static void gsm_map_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb
items[TOT_BYTES_COLUMN].type = TABLE_ITEM_UINT;
items[AVG_BYTES_COLUMN].type = TABLE_ITEM_FLOAT;
- table = stat_tap_init_table("GSM MAP Operation Statistics", num_fields, 0, NULL, gui_callback, gui_data);
+ table = stat_tap_init_table("GSM MAP Operation Statistics", num_fields, 0, NULL);
stat_tap_add_table(new_stat, table);
/* Add a row for each value type */
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c
index 9ed0cfb872..2a724c7228 100644
--- a/epan/dissectors/packet-h225.c
+++ b/epan/dissectors/packet-h225.c
@@ -8021,10 +8021,10 @@ static guint facility_reason_idx[FACILITY_REASONS];
static guint other_idx;
-static void h225_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void h225_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(h225_stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table* table = stat_tap_init_table("H.225 Messages and Message Reasons", num_fields, 0, NULL, gui_callback, gui_data);
+ stat_tap_table* table = stat_tap_init_table("H.225 Messages and Message Reasons", num_fields, 0, NULL);
int row_idx = 0, msg_idx;
stat_tap_table_item_type items[sizeof(h225_stat_fields)/sizeof(stat_tap_table_item)];
diff --git a/epan/dissectors/packet-mtp3.c b/epan/dissectors/packet-mtp3.c
index 4cdbdfcb0d..390aa12ae1 100644
--- a/epan/dissectors/packet-mtp3.c
+++ b/epan/dissectors/packet-mtp3.c
@@ -824,12 +824,12 @@ static stat_tap_table_item mtp3_stat_fields[] = {
{TABLE_ITEM_FLOAT, TAP_ALIGN_RIGHT, "Avg Bytes", "%f"},
};
-static void mtp3_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void mtp3_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(mtp3_stat_fields)/sizeof(stat_tap_table_item);
stat_tap_table* table;
- table = stat_tap_init_table("MTP3 Statistics", num_fields, 0, NULL, gui_callback, gui_data);
+ table = stat_tap_init_table("MTP3 Statistics", num_fields, 0, NULL);
stat_tap_add_table(new_stat, table);
}
diff --git a/epan/dissectors/packet-rpc.c b/epan/dissectors/packet-rpc.c
index 4192de220a..705fc2dafe 100644
--- a/epan/dissectors/packet-rpc.c
+++ b/epan/dissectors/packet-rpc.c
@@ -3883,12 +3883,12 @@ static stat_tap_table_item rpc_prog_stat_fields[] = {
{TABLE_ITEM_FLOAT, TAP_ALIGN_RIGHT, "Avg SRT (s)", "%.2f"}
};
-static void rpc_prog_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void rpc_prog_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(rpc_prog_stat_fields)/sizeof(stat_tap_table_item);
stat_tap_table* table;
- table = stat_tap_init_table("ONC-RPC Program Statistics", num_fields, 0, NULL, gui_callback, gui_data);
+ table = stat_tap_init_table("ONC-RPC Program Statistics", num_fields, 0, NULL);
stat_tap_add_table(new_stat, table);
}
diff --git a/epan/dissectors/packet-sip.c b/epan/dissectors/packet-sip.c
index 9870626a35..4b90e334ca 100644
--- a/epan/dissectors/packet-sip.c
+++ b/epan/dissectors/packet-sip.c
@@ -5697,12 +5697,12 @@ static stat_tap_table_item sip_stat_fields[] = {
{TABLE_ITEM_FLOAT, TAP_ALIGN_RIGHT, "Max Setup (s)", "%8.2f"},
};
-static void sip_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void sip_stat_init(stat_tap_table_ui* new_stat)
{
/* XXX Should we have a single request + response table instead? */
int num_fields = sizeof(sip_stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table *req_table = stat_tap_init_table("SIP Requests", num_fields, 0, NULL, gui_callback, gui_data);
- stat_tap_table *resp_table = stat_tap_init_table("SIP Responses", num_fields, 0, NULL, gui_callback, gui_data);
+ stat_tap_table *req_table = stat_tap_init_table("SIP Requests", num_fields, 0, NULL);
+ stat_tap_table *resp_table = stat_tap_init_table("SIP Responses", num_fields, 0, NULL);
stat_tap_table_item_type items[sizeof(sip_stat_fields)/sizeof(stat_tap_table_item)];
guint i;
diff --git a/epan/dissectors/packet-wsp.c b/epan/dissectors/packet-wsp.c
index 0f1080504c..3a9f670393 100644
--- a/epan/dissectors/packet-wsp.c
+++ b/epan/dissectors/packet-wsp.c
@@ -5599,12 +5599,12 @@ static stat_tap_table_item wsp_stat_fields[] = {
static int unknown_pt_idx;
static int unknown_sc_idx;
-static void wsp_stat_init(stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data)
+static void wsp_stat_init(stat_tap_table_ui* new_stat)
{
int num_fields = sizeof(wsp_stat_fields)/sizeof(stat_tap_table_item);
- stat_tap_table* pt_table = stat_tap_init_table("PDU Types", num_fields, 0, NULL, gui_callback, gui_data);
+ stat_tap_table* pt_table = stat_tap_init_table("PDU Types", num_fields, 0, NULL);
stat_tap_table_item_type pt_items[sizeof(wsp_stat_fields)/sizeof(stat_tap_table_item)];
- stat_tap_table* sc_table = stat_tap_init_table("Status Codes", num_fields, 0, NULL, gui_callback, gui_data);
+ stat_tap_table* sc_table = stat_tap_init_table("Status Codes", num_fields, 0, NULL);
stat_tap_table_item_type sc_items[sizeof(wsp_stat_fields)/sizeof(stat_tap_table_item)];
int table_idx;
diff --git a/epan/stat_tap_ui.c b/epan/stat_tap_ui.c
index d4627c1582..a7141335bd 100644
--- a/epan/stat_tap_ui.c
+++ b/epan/stat_tap_ui.c
@@ -172,7 +172,7 @@ void stat_tap_get_filter(stat_tap_table_ui* new_stat, const char *opt_arg, const
}
stat_tap_table* stat_tap_init_table(const char *name, int num_fields, int num_elements,
- const char *filter_string, stat_tap_gui_init_cb gui_callback, void* gui_data)
+ const char *filter_string)
{
stat_tap_table* new_table = g_new0(stat_tap_table, 1);
@@ -182,9 +182,6 @@ stat_tap_table* stat_tap_init_table(const char *name, int num_fields, int num_el
new_table->filter_string = filter_string;
new_table->elements = g_new0(stat_tap_table_item_type*, num_elements);
- if (gui_callback)
- gui_callback(new_table, gui_data);
-
return new_table;
}
@@ -237,7 +234,7 @@ void stat_tap_set_field_data(stat_tap_table *stat_table, guint table_index, guin
field_value[field_index] = *field_data;
}
-void reset_stat_table(stat_tap_table_ui* new_stat, stat_tap_gui_reset_cb gui_callback, void *callback_data)
+void reset_stat_table(stat_tap_table_ui* new_stat)
{
guint i = 0;
stat_tap_table *stat_table;
@@ -246,16 +243,12 @@ void reset_stat_table(stat_tap_table_ui* new_stat, stat_tap_gui_reset_cb gui_cal
{
stat_table = g_array_index(new_stat->tables, stat_tap_table*, i);
- /* Give GUI the first crack at it before we clean up */
- if (gui_callback)
- gui_callback(stat_table, callback_data);
-
if (new_stat->stat_tap_reset_table_cb)
new_stat->stat_tap_reset_table_cb(stat_table);
}
}
-void free_stat_tables(stat_tap_table_ui* new_stat, stat_tap_gui_free_cb gui_callback, void *callback_data)
+void free_stat_tables(stat_tap_table_ui* new_stat)
{
guint i = 0, element, field_index;
stat_tap_table *stat_table;
@@ -265,10 +258,6 @@ void free_stat_tables(stat_tap_table_ui* new_stat, stat_tap_gui_free_cb gui_call
{
stat_table = g_array_index(new_stat->tables, stat_tap_table*, i);
- /* Give GUI the first crack at it before we clean up */
- if (gui_callback)
- gui_callback(stat_table, callback_data);
-
for (element = 0; element < stat_table->num_elements; element++)
{
for (field_index = 0; field_index < stat_table->num_fields; field_index++)
diff --git a/epan/stat_tap_ui.h b/epan/stat_tap_ui.h
index 20eb590d7d..dc670c3c36 100644
--- a/epan/stat_tap_ui.h
+++ b/epan/stat_tap_ui.h
@@ -116,10 +116,6 @@ typedef struct _stat_tap_table
} stat_tap_table;
-typedef void (*stat_tap_gui_init_cb)(stat_tap_table* stat_table, void* gui_data); /* GTK+ only? */
-typedef void (*stat_tap_gui_reset_cb)(stat_tap_table* stat_table, void* gui_data); /* GTK+ only? */
-typedef void (*stat_tap_gui_free_cb)(stat_tap_table* stat_table, void* gui_data); /* GTK+ only? */
-
/*
* UI information for a tap with a table-based UI.
*/
@@ -128,7 +124,7 @@ typedef struct _stat_tap_table_ui {
const char *title; /* title of statistic */
const char *tap_name;
const char *cli_string; /* initial part of the "-z" argument for statistic */
- void (* stat_tap_init_cb)(struct _stat_tap_table_ui* new_stat, stat_tap_gui_init_cb gui_callback, void* gui_data);
+ void (* stat_tap_init_cb)(struct _stat_tap_table_ui* new_stat);
tap_packet_cb packet_func;
void (* stat_tap_reset_table_cb)(stat_tap_table* table);
void (* stat_tap_free_table_item_cb)(stat_tap_table* table, guint row, guint column, stat_tap_table_item_type* field_data);
@@ -161,13 +157,13 @@ WS_DLL_PUBLIC void register_stat_tap_table_ui(stat_tap_table_ui *ui);
WS_DLL_PUBLIC void stat_tap_iterate_tables(wmem_foreach_func func, gpointer user_data);
WS_DLL_PUBLIC void stat_tap_get_filter(stat_tap_table_ui* new_stat, const char *opt_arg, const char **filter, char** err);
WS_DLL_PUBLIC stat_tap_table* stat_tap_init_table(const char *name, int num_fields, int num_elements,
- const char *filter_string, stat_tap_gui_init_cb gui_callback, void* gui_data);
+ const char *filter_string);
WS_DLL_PUBLIC void stat_tap_add_table(stat_tap_table_ui* new_stat, stat_tap_table* table);
WS_DLL_PUBLIC void stat_tap_init_table_row(stat_tap_table *stat_table, guint table_index, guint num_fields, const stat_tap_table_item_type* fields);
WS_DLL_PUBLIC stat_tap_table_item_type* stat_tap_get_field_data(const stat_tap_table *stat_table, guint table_index, guint field_index);
WS_DLL_PUBLIC void stat_tap_set_field_data(stat_tap_table *stat_table, guint table_index, guint field_index, stat_tap_table_item_type* field_data);
-WS_DLL_PUBLIC void reset_stat_table(stat_tap_table_ui* new_stat, stat_tap_gui_reset_cb gui_callback, void *callback_data);
+WS_DLL_PUBLIC void reset_stat_table(stat_tap_table_ui* new_stat);
WS_DLL_PUBLIC stat_tap_table_ui *stat_tap_by_name(const char *name);
@@ -178,11 +174,8 @@ WS_DLL_PUBLIC stat_tap_table_ui *stat_tap_by_name(const char *name);
* row.
*
* @param new_stat Parent stat_tap_table_ui struct, provided by the dissector.
- * @param gui_callback Per-table callback, run before rows are removed.
- * Provided by the UI.
- * @param callback_data Data for the per-table callback.
*/
-WS_DLL_PUBLIC void free_stat_tables(stat_tap_table_ui* new_stat, stat_tap_gui_free_cb gui_callback, void *callback_data);
+WS_DLL_PUBLIC void free_stat_tables(stat_tap_table_ui* new_stat);
WS_DLL_PUBLIC gboolean process_stat_cmd_arg(char *optstr);
diff --git a/sharkd_session.c b/sharkd_session.c
index 4c2491aebb..55622688ca 100644
--- a/sharkd_session.c
+++ b/sharkd_session.c
@@ -1751,7 +1751,7 @@ sharkd_session_free_tap_nstat_cb(void *arg)
{
stat_data_t *stat_data = (stat_data_t *) arg;
- free_stat_tables(stat_data->stat_tap_data, NULL, NULL);
+ free_stat_tables(stat_data->stat_tap_data);
}
/**
@@ -2317,7 +2317,7 @@ sharkd_session_process_tap(char *buf, const jsmntok_t *tokens, int count)
continue;
}
- stat_tap->stat_tap_init_cb(stat_tap, NULL, NULL);
+ stat_tap->stat_tap_init_cb(stat_tap);
stat_data = g_new0(stat_data_t, 1);
stat_data->stat_tap_data = stat_tap;
diff --git a/ui/cli/tap-simple_stattable.c b/ui/cli/tap-simple_stattable.c
index 2e9015a164..eb059fca97 100644
--- a/ui/cli/tap-simple_stattable.c
+++ b/ui/cli/tap-simple_stattable.c
@@ -99,7 +99,7 @@ init_stat_table(stat_tap_table_ui *stat_tap, const char *filter)
ui->stats.stat_tap_data = stat_tap;
ui->stats.user_data = ui;
- stat_tap->stat_tap_init_cb(stat_tap, NULL, NULL);
+ stat_tap->stat_tap_init_cb(stat_tap);
error_string = register_tap_listener(stat_tap->tap_name, &ui->stats, filter, 0, NULL, stat_tap->packet_func, simple_draw);
if (error_string) {
diff --git a/ui/qt/simple_statistics_dialog.cpp b/ui/qt/simple_statistics_dialog.cpp
index 13cdd259cb..8ecad6f1b6 100644
--- a/ui/qt/simple_statistics_dialog.cpp
+++ b/ui/qt/simple_statistics_dialog.cpp
@@ -220,7 +220,7 @@ void SimpleStatisticsDialog::tapReset(void *sd_ptr)
SimpleStatisticsDialog *ss_dlg = static_cast<SimpleStatisticsDialog *>(sd->user_data);
if (!ss_dlg) return;
- reset_stat_table(sd->stat_tap_data, NULL, NULL);
+ reset_stat_table(sd->stat_tap_data);
ss_dlg->statsTreeWidget()->clear();
}
@@ -252,7 +252,7 @@ void SimpleStatisticsDialog::fillTree()
stat_data.stat_tap_data = stu_;
stat_data.user_data = this;
- stu_->stat_tap_init_cb(stu_, NULL, NULL);
+ stu_->stat_tap_init_cb(stu_);
QString display_filter = displayFilter();
if (!registerTapListener(stu_->tap_name,
@@ -262,7 +262,7 @@ void SimpleStatisticsDialog::fillTree()
tapReset,
stu_->packet_func,
tapDraw)) {
- free_stat_tables(stu_, NULL, NULL);
+ free_stat_tables(stu_);
reject(); // XXX Stay open instead?
return;
}
@@ -298,7 +298,7 @@ SimpleStatisticsDialog::~SimpleStatisticsDialog()
stu_->refcount--;
if (stu_->refcount == 0) {
if (stu_->tables)
- free_stat_tables(stu_, NULL, NULL);
+ free_stat_tables(stu_);
}
}