aboutsummaryrefslogtreecommitdiffstats
path: root/ui/cli
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-07-20 17:07:19 -0700
committerGuy Harris <guy@alum.mit.edu>2018-07-21 00:51:13 +0000
commit9b731e2b320ca936499bf7840a7b2ac5c2b64e05 (patch)
treeb8ab320176662c385a6d544e505eee173e18ffc1 /ui/cli
parent66935d8baadfe7dd62b4e8d4412a47f311ead7f5 (diff)
Add a tap "finish" callback, called when a listener is removed.
Change-Id: Ic6c23dbd39d1adf8f730f1c866e409f731947475 Reviewed-on: https://code.wireshark.org/review/28786 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/cli')
-rw-r--r--ui/cli/tap-camelsrt.c3
-rw-r--r--ui/cli/tap-comparestat.c2
-rw-r--r--ui/cli/tap-diameter-avp.c2
-rw-r--r--ui/cli/tap-endpoints.c2
-rw-r--r--ui/cli/tap-expert.c3
-rw-r--r--ui/cli/tap-exportobject.c2
-rw-r--r--ui/cli/tap-flow.c2
-rw-r--r--ui/cli/tap-follow.c2
-rw-r--r--ui/cli/tap-gsm_astat.c3
-rw-r--r--ui/cli/tap-hosts.c2
-rw-r--r--ui/cli/tap-httpstat.c3
-rw-r--r--ui/cli/tap-icmpstat.c3
-rw-r--r--ui/cli/tap-icmpv6stat.c2
-rw-r--r--ui/cli/tap-iostat.c2
-rw-r--r--ui/cli/tap-iousers.c2
-rw-r--r--ui/cli/tap-macltestat.c3
-rw-r--r--ui/cli/tap-protocolinfo.c2
-rw-r--r--ui/cli/tap-protohierstat.c2
-rw-r--r--ui/cli/tap-rlcltestat.c3
-rw-r--r--ui/cli/tap-rpcprogs.c2
-rw-r--r--ui/cli/tap-rtd.c2
-rw-r--r--ui/cli/tap-rtspstat.c3
-rw-r--r--ui/cli/tap-sctpchunkstat.c2
-rw-r--r--ui/cli/tap-simple_stattable.c2
-rw-r--r--ui/cli/tap-sipstat.c3
-rw-r--r--ui/cli/tap-smbsids.c2
-rw-r--r--ui/cli/tap-srt.c2
-rw-r--r--ui/cli/tap-stats_tree.c3
-rw-r--r--ui/cli/tap-sv.c1
-rw-r--r--ui/cli/tap-wspstat.c3
30 files changed, 41 insertions, 29 deletions
diff --git a/ui/cli/tap-camelsrt.c b/ui/cli/tap-camelsrt.c
index 51c4785719..4f463a48fe 100644
--- a/ui/cli/tap-camelsrt.c
+++ b/ui/cli/tap-camelsrt.c
@@ -214,7 +214,8 @@ static void camelsrt_init(const char *opt_arg, void *userdata _U_)
0,
NULL,
camelsrt_packet,
- camelsrt_draw);
+ camelsrt_draw,
+ NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
diff --git a/ui/cli/tap-comparestat.c b/ui/cli/tap-comparestat.c
index 7a6c8acf89..2fb27aab88 100644
--- a/ui/cli/tap-comparestat.c
+++ b/ui/cli/tap-comparestat.c
@@ -561,7 +561,7 @@ comparestat_init(const char *opt_arg, void *userdata _U_)
/* create a Hash to count the packets with the same ip.id */
cs->packet_set = g_hash_table_new_full(NULL, NULL, NULL, frame_info_free);
- error_string = register_tap_listener("ip", cs, filter, 0, comparestat_reset, comparestat_packet, comparestat_draw);
+ error_string = register_tap_listener("ip", cs, filter, 0, comparestat_reset, comparestat_packet, comparestat_draw, NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
g_free(cs->filter);
diff --git a/ui/cli/tap-diameter-avp.c b/ui/cli/tap-diameter-avp.c
index ec336c40c3..e9896a3fcd 100644
--- a/ui/cli/tap-diameter-avp.c
+++ b/ui/cli/tap-diameter-avp.c
@@ -255,7 +255,7 @@ diameteravp_init(const char *opt_arg, void *userdata _U_)
g_strfreev(tokens);
ds->filter = g_string_free(filter, FALSE);
- error_string = register_tap_listener("diameter", ds, ds->filter, 0, NULL, diameteravp_packet, diameteravp_draw);
+ error_string = register_tap_listener("diameter", ds, ds->filter, 0, NULL, diameteravp_packet, diameteravp_draw, NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
g_free(ds);
diff --git a/ui/cli/tap-endpoints.c b/ui/cli/tap-endpoints.c
index 44e0ca0c18..ef2f9cf94e 100644
--- a/ui/cli/tap-endpoints.c
+++ b/ui/cli/tap-endpoints.c
@@ -108,7 +108,7 @@ void init_hostlists(struct register_ct *ct, const char *filter)
iu->filter = g_strdup(filter);
iu->hash.user_data = iu;
- error_string = register_tap_listener(proto_get_protocol_filter_name(get_conversation_proto_id(ct)), &iu->hash, filter, 0, NULL, get_hostlist_packet_func(ct), endpoints_draw);
+ error_string = register_tap_listener(proto_get_protocol_filter_name(get_conversation_proto_id(ct)), &iu->hash, filter, 0, NULL, get_hostlist_packet_func(ct), endpoints_draw, NULL);
if (error_string) {
g_free(iu);
fprintf(stderr, "tshark: Couldn't register endpoint tap: %s\n",
diff --git a/ui/cli/tap-expert.c b/ui/cli/tap-expert.c
index b7eaf5e479..eda05e8f3f 100644
--- a/ui/cli/tap-expert.c
+++ b/ui/cli/tap-expert.c
@@ -241,7 +241,8 @@ static void expert_stat_init(const char *opt_arg, void *userdata _U_)
filter, 0,
expert_stat_reset,
expert_stat_packet,
- expert_stat_draw);
+ expert_stat_draw,
+ NULL);
if (error_string) {
printf("Expert tap error (%s)!\n", error_string->str);
g_string_free(error_string, TRUE);
diff --git a/ui/cli/tap-exportobject.c b/ui/cli/tap-exportobject.c
index 454bdd6d2d..2512298611 100644
--- a/ui/cli/tap-exportobject.c
+++ b/ui/cli/tap-exportobject.c
@@ -235,7 +235,7 @@ exportobject_handler(gpointer key, gpointer value _U_, gpointer user_data _U_)
/* Data will be gathered via a tap callback */
error_msg = register_tap_listener(get_eo_tap_listener_name(eo), tap_data, NULL, 0,
- NULL, get_eo_packet_func(eo), eo_draw);
+ NULL, get_eo_packet_func(eo), eo_draw, NULL);
if (error_msg) {
fprintf(stderr, "tshark: Can't register %s tap: %s\n", (const char*)key, error_msg->str);
diff --git a/ui/cli/tap-flow.c b/ui/cli/tap-flow.c
index 0d9a994ba4..56810e0f9a 100644
--- a/ui/cli/tap-flow.c
+++ b/ui/cli/tap-flow.c
@@ -94,7 +94,7 @@ flow_init(const char *opt_argp, void *userdata)
sequence_analysis_list_free(flow_info);
errp = register_tap_listener(sequence_analysis_get_tap_listener_name(analysis), flow_info, filter, sequence_analysis_get_tap_flags(analysis),
- NULL, sequence_analysis_get_packet_func(analysis), flow_draw);
+ NULL, sequence_analysis_get_packet_func(analysis), flow_draw, NULL);
if (errp != NULL)
{
diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c
index f1a574224d..2c2fa74ce0 100644
--- a/ui/cli/tap-follow.c
+++ b/ui/cli/tap-follow.c
@@ -472,7 +472,7 @@ static void follow_stream(const char *opt_argp, void *userdata)
}
errp = register_tap_listener(get_follow_tap_string(follower), follow_info, follow_info->filter_out_filter, 0,
- NULL, get_follow_tap_handler(follower), follow_draw);
+ NULL, get_follow_tap_handler(follower), follow_draw, NULL);
if (errp != NULL)
{
diff --git a/ui/cli/tap-gsm_astat.c b/ui/cli/tap-gsm_astat.c
index 497c1acc5d..18ab2b1cb3 100644
--- a/ui/cli/tap-gsm_astat.c
+++ b/ui/cli/tap-gsm_astat.c
@@ -318,7 +318,8 @@ gsm_a_stat_init(const char *opt_arg _U_, void *userdata _U_)
register_tap_listener("gsm_a", stat_p, NULL, 0,
NULL,
gsm_a_stat_packet,
- gsm_a_stat_draw);
+ gsm_a_stat_draw,
+ NULL);
if (err_p != NULL)
{
diff --git a/ui/cli/tap-hosts.c b/ui/cli/tap-hosts.c
index 398ecf9029..6b30b08bcf 100644
--- a/ui/cli/tap-hosts.c
+++ b/ui/cli/tap-hosts.c
@@ -113,7 +113,7 @@ hosts_init(const char *opt_arg, void *userdata _U_)
}
error_string = register_tap_listener("frame", NULL, NULL, TL_REQUIRES_PROTO_TREE,
- NULL, NULL, hosts_draw);
+ NULL, NULL, hosts_draw, NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
fprintf(stderr, "tshark: Couldn't register " TAP_NAME " tap: %s\n",
diff --git a/ui/cli/tap-httpstat.c b/ui/cli/tap-httpstat.c
index 1359a253a7..14061f9566 100644
--- a/ui/cli/tap-httpstat.c
+++ b/ui/cli/tap-httpstat.c
@@ -312,7 +312,8 @@ httpstat_init(const char *opt_arg, void *userdata _U_)
0,
httpstat_reset,
httpstat_packet,
- httpstat_draw);
+ httpstat_draw,
+ NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
g_free(sp->filter);
diff --git a/ui/cli/tap-icmpstat.c b/ui/cli/tap-icmpstat.c
index 315bab3193..7be80cc95f 100644
--- a/ui/cli/tap-icmpstat.c
+++ b/ui/cli/tap-icmpstat.c
@@ -284,7 +284,8 @@ icmpstat_init(const char *opt_arg, void *userdata _U_)
*/
error_string = register_tap_listener("icmp", icmpstat, icmpstat->filter,
- TL_REQUIRES_NOTHING, icmpstat_reset, icmpstat_packet, icmpstat_draw);
+ TL_REQUIRES_NOTHING, icmpstat_reset, icmpstat_packet, icmpstat_draw,
+ NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
g_free(icmpstat->filter);
diff --git a/ui/cli/tap-icmpv6stat.c b/ui/cli/tap-icmpv6stat.c
index 49d90a553e..8cd5b13a93 100644
--- a/ui/cli/tap-icmpv6stat.c
+++ b/ui/cli/tap-icmpv6stat.c
@@ -285,7 +285,7 @@ icmpv6stat_init(const char *opt_arg, void *userdata _U_)
*/
error_string = register_tap_listener("icmpv6", icmpv6stat, icmpv6stat->filter,
- TL_REQUIRES_NOTHING, icmpv6stat_reset, icmpv6stat_packet, icmpv6stat_draw);
+ TL_REQUIRES_NOTHING, icmpv6stat_reset, icmpv6stat_packet, icmpv6stat_draw, NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
g_free(icmpv6stat->filter);
diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c
index fd82f74bf7..1928f97e68 100644
--- a/ui/cli/tap-iostat.c
+++ b/ui/cli/tap-iostat.c
@@ -1372,7 +1372,7 @@ register_io_tap(io_stat_t *io, int i, const char *filter)
g_free(field);
error_string = register_tap_listener("frame", &io->items[i], flt, TL_REQUIRES_PROTO_TREE, NULL,
- iostat_packet, i ? NULL : iostat_draw);
+ iostat_packet, i ? NULL : iostat_draw, NULL);
if (error_string) {
g_free(io->items);
g_free(io);
diff --git a/ui/cli/tap-iousers.c b/ui/cli/tap-iousers.c
index 80f1dde0d6..7227dbb6e0 100644
--- a/ui/cli/tap-iousers.c
+++ b/ui/cli/tap-iousers.c
@@ -222,7 +222,7 @@ void init_iousers(struct register_ct *ct, const char *filter)
iu->filter = g_strdup(filter);
iu->hash.user_data = iu;
- error_string = register_tap_listener(proto_get_protocol_filter_name(get_conversation_proto_id(ct)), &iu->hash, filter, 0, NULL, get_conversation_packet_func(ct), iousers_draw);
+ error_string = register_tap_listener(proto_get_protocol_filter_name(get_conversation_proto_id(ct)), &iu->hash, filter, 0, NULL, get_conversation_packet_func(ct), iousers_draw, NULL);
if (error_string) {
g_free(iu);
fprintf(stderr, "tshark: Couldn't register conversations tap: %s\n",
diff --git a/ui/cli/tap-macltestat.c b/ui/cli/tap-macltestat.c
index de35425d2d..cb35ce89e0 100644
--- a/ui/cli/tap-macltestat.c
+++ b/ui/cli/tap-macltestat.c
@@ -525,7 +525,8 @@ static void mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
filter, 0,
mac_lte_stat_reset,
mac_lte_stat_packet,
- mac_lte_stat_draw);
+ mac_lte_stat_draw,
+ NULL);
if (error_string) {
g_string_free(error_string, TRUE);
g_free(hs);
diff --git a/ui/cli/tap-protocolinfo.c b/ui/cli/tap-protocolinfo.c
index b82e2069e1..9cd887d770 100644
--- a/ui/cli/tap-protocolinfo.c
+++ b/ui/cli/tap-protocolinfo.c
@@ -104,7 +104,7 @@ protocolinfo_init(const char *opt_arg, void *userdata _U_)
rs->filter = NULL;
}
- error_string = register_tap_listener("frame", rs, rs->filter, TL_REQUIRES_PROTO_TREE, NULL, protocolinfo_packet, NULL);
+ error_string = register_tap_listener("frame", rs, rs->filter, TL_REQUIRES_PROTO_TREE, NULL, protocolinfo_packet, NULL, NULL);
if (error_string) {
/* error, we failed to attach to the tap. complain and clean up */
fprintf(stderr, "tshark: Couldn't register proto,colinfo tap: %s\n",
diff --git a/ui/cli/tap-protohierstat.c b/ui/cli/tap-protohierstat.c
index 7445510b7f..75ec6ebe56 100644
--- a/ui/cli/tap-protohierstat.c
+++ b/ui/cli/tap-protohierstat.c
@@ -174,7 +174,7 @@ protohierstat_init(const char *opt_arg, void *userdata _U_)
rs = new_phs_t(NULL);
rs->filter = g_strdup(filter);
- error_string = register_tap_listener("frame", rs, filter, TL_REQUIRES_PROTO_TREE, NULL, protohierstat_packet, protohierstat_draw);
+ error_string = register_tap_listener("frame", rs, filter, TL_REQUIRES_PROTO_TREE, NULL, protohierstat_packet, protohierstat_draw, NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
g_free(rs->filter);
diff --git a/ui/cli/tap-rlcltestat.c b/ui/cli/tap-rlcltestat.c
index 02967dc4e0..b46345d5a9 100644
--- a/ui/cli/tap-rlcltestat.c
+++ b/ui/cli/tap-rlcltestat.c
@@ -378,7 +378,8 @@ static void rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
filter, 0,
rlc_lte_stat_reset,
rlc_lte_stat_packet,
- rlc_lte_stat_draw);
+ rlc_lte_stat_draw,
+ NULL);
if (error_string) {
g_string_free(error_string, TRUE);
g_free(hs);
diff --git a/ui/cli/tap-rpcprogs.c b/ui/cli/tap-rpcprogs.c
index 53bac76d1f..513e2492b6 100644
--- a/ui/cli/tap-rpcprogs.c
+++ b/ui/cli/tap-rpcprogs.c
@@ -206,7 +206,7 @@ rpcprogs_init(const char *opt_arg _U_, void *userdata _U_)
}
already_enabled = 1;
- error_string = register_tap_listener("rpc", NULL, NULL, 0, NULL, rpcprogs_packet, rpcprogs_draw);
+ error_string = register_tap_listener("rpc", NULL, NULL, 0, NULL, rpcprogs_packet, rpcprogs_draw, NULL);
if (error_string) {
fprintf(stderr, "tshark: Couldn't register rpc,programs tap: %s\n",
error_string->str);
diff --git a/ui/cli/tap-rtd.c b/ui/cli/tap-rtd.c
index 0ec1ac2e03..5898cd30f2 100644
--- a/ui/cli/tap-rtd.c
+++ b/ui/cli/tap-rtd.c
@@ -101,7 +101,7 @@ init_rtd_tables(register_rtd_t* rtd, const char *filter)
rtd_table_dissector_init(rtd, &ui->rtd.stat_table, NULL, NULL);
- error_string = register_tap_listener(get_rtd_tap_listener_name(rtd), &ui->rtd, filter, 0, NULL, get_rtd_packet_func(rtd), rtd_draw);
+ error_string = register_tap_listener(get_rtd_tap_listener_name(rtd), &ui->rtd, filter, 0, NULL, get_rtd_packet_func(rtd), rtd_draw, NULL);
if (error_string) {
free_rtd_table(&ui->rtd.stat_table);
fprintf(stderr, "tshark: Couldn't register srt tap: %s\n", error_string->str);
diff --git a/ui/cli/tap-rtspstat.c b/ui/cli/tap-rtspstat.c
index 4026ae9801..b5f602abed 100644
--- a/ui/cli/tap-rtspstat.c
+++ b/ui/cli/tap-rtspstat.c
@@ -241,7 +241,8 @@ rtspstat_init(const char *opt_arg, void *userdata _U_)
0,
rtspstat_reset,
rtspstat_packet,
- rtspstat_draw);
+ rtspstat_draw,
+ NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
g_free(sp->filter);
diff --git a/ui/cli/tap-sctpchunkstat.c b/ui/cli/tap-sctpchunkstat.c
index bd198e8ac9..203a67a67b 100644
--- a/ui/cli/tap-sctpchunkstat.c
+++ b/ui/cli/tap-sctpchunkstat.c
@@ -199,7 +199,7 @@ sctpstat_init(const char *opt_arg, void *userdata _U_)
sctpstat_reset(hs);
- error_string = register_tap_listener("sctp", hs, hs->filter, 0, NULL, sctpstat_packet, sctpstat_draw);
+ error_string = register_tap_listener("sctp", hs, hs->filter, 0, NULL, sctpstat_packet, sctpstat_draw, NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
g_free(hs->filter);
diff --git a/ui/cli/tap-simple_stattable.c b/ui/cli/tap-simple_stattable.c
index eb059fca97..7a62288c1d 100644
--- a/ui/cli/tap-simple_stattable.c
+++ b/ui/cli/tap-simple_stattable.c
@@ -101,7 +101,7 @@ init_stat_table(stat_tap_table_ui *stat_tap, const char *filter)
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);
+ error_string = register_tap_listener(stat_tap->tap_name, &ui->stats, filter, 0, NULL, stat_tap->packet_func, simple_draw, NULL);
if (error_string) {
/* free_rtd_table(&ui->rtd.stat_table); */
fprintf(stderr, "tshark: Couldn't register tap: %s\n", error_string->str);
diff --git a/ui/cli/tap-sipstat.c b/ui/cli/tap-sipstat.c
index 6248e2d96d..49519116c7 100644
--- a/ui/cli/tap-sipstat.c
+++ b/ui/cli/tap-sipstat.c
@@ -421,7 +421,8 @@ sipstat_init(const char *opt_arg, void *userdata _U_)
0,
sipstat_reset,
sipstat_packet,
- sipstat_draw);
+ sipstat_draw,
+ NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
g_free(sp->filter);
diff --git a/ui/cli/tap-smbsids.c b/ui/cli/tap-smbsids.c
index 369c828434..9f5c4ce8c6 100644
--- a/ui/cli/tap-smbsids.c
+++ b/ui/cli/tap-smbsids.c
@@ -66,7 +66,7 @@ smbsids_init(const char *opt_arg _U_, void *userdata _U_)
}
- error_string = register_tap_listener("smb", NULL, NULL, 0, NULL, smbsids_packet, smbsids_draw);
+ error_string = register_tap_listener("smb", NULL, NULL, 0, NULL, smbsids_packet, smbsids_draw, NULL);
if (error_string) {
fprintf(stderr, "tshark: Couldn't register smb,sids tap:%s\n",
error_string->str);
diff --git a/ui/cli/tap-srt.c b/ui/cli/tap-srt.c
index 09dce2b643..680688d02d 100644
--- a/ui/cli/tap-srt.c
+++ b/ui/cli/tap-srt.c
@@ -114,7 +114,7 @@ init_srt_tables(register_srt_t* srt, const char *filter)
ui->data.srt_array = global_srt_array;
ui->data.user_data = ui;
- error_string = register_tap_listener(get_srt_tap_listener_name(srt), &ui->data, filter, 0, NULL, get_srt_packet_func(srt), srt_draw);
+ error_string = register_tap_listener(get_srt_tap_listener_name(srt), &ui->data, filter, 0, NULL, get_srt_packet_func(srt), srt_draw, NULL);
if (error_string) {
free_srt_table(srt, global_srt_array);
g_free(ui);
diff --git a/ui/cli/tap-stats_tree.c b/ui/cli/tap-stats_tree.c
index 9fa7e69e03..73ed7d6e34 100644
--- a/ui/cli/tap-stats_tree.c
+++ b/ui/cli/tap-stats_tree.c
@@ -84,7 +84,8 @@ init_stats_tree(const char *opt_arg, void *userdata _U_)
st->cfg->flags,
stats_tree_reset,
stats_tree_packet,
- draw_stats_tree);
+ draw_stats_tree,
+ NULL);
if (error_string) {
report_failure("stats_tree for: %s failed to attach to the tap: %s", cfg->name, error_string->str);
diff --git a/ui/cli/tap-sv.c b/ui/cli/tap-sv.c
index d07ec24005..10b5a4613d 100644
--- a/ui/cli/tap-sv.c
+++ b/ui/cli/tap-sv.c
@@ -53,6 +53,7 @@ svstat_init(const char *opt_arg _U_, void *userdata _U_)
0,
NULL,
sv_packet,
+ NULL,
NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
diff --git a/ui/cli/tap-wspstat.c b/ui/cli/tap-wspstat.c
index ba43de9c89..22862cdaf8 100644
--- a/ui/cli/tap-wspstat.c
+++ b/ui/cli/tap-wspstat.c
@@ -246,7 +246,8 @@ wspstat_init(const char *opt_arg, void *userdata _U_)
0,
wspstat_reset,
wspstat_packet,
- wspstat_draw);
+ wspstat_draw,
+ NULL);
if (error_string) {
/* error, we failed to attach to the tap. clean up */
g_free(sp->pdu_stats);