diff options
author | Guy Harris <guy@alum.mit.edu> | 2014-11-14 10:31:04 -0800 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2014-11-14 18:31:34 +0000 |
commit | 7390516f61e64568e8cbdee64dbb6b908bbc2676 (patch) | |
tree | fe3df59e8bbc67667af55349680d610176e2fddf /ui/cli | |
parent | 09f0d2c6c4ac65f6e05c0943c4fb1ede42b1b633 (diff) | |
download | wireshark-7390516f61e64568e8cbdee64dbb6b908bbc2676.tar.gz |
For tap UIs, register a list of parameters and some menu information.
The intent here is to centralize more UI information so that we can move
more tap UI stuff to common code. This is a beginning.
Change-Id: Ic35ac0c01bc7b942aab88177db4065847a5e6c30
Reviewed-on: https://code.wireshark.org/review/5301
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/cli')
38 files changed, 414 insertions, 41 deletions
diff --git a/ui/cli/tap-afpstat.c b/ui/cli/tap-afpstat.c index 0682c0c8af..e9d1b4d0fa 100644 --- a/ui/cli/tap-afpstat.c +++ b/ui/cli/tap-afpstat.c @@ -152,10 +152,20 @@ afpstat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui afpstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "afp,srt", + afpstat_init, + -1, + 0, + NULL +}; + void register_tap_listener_afpstat(void) { - register_stat_cmd_arg("afp,srt", afpstat_init, NULL); + register_tap_ui(&afpstat_ui, NULL); } /* diff --git a/ui/cli/tap-ansi_astat.c b/ui/cli/tap-ansi_astat.c index 89e80a0e8e..0f00d3fa63 100644 --- a/ui/cli/tap-ansi_astat.c +++ b/ui/cli/tap-ansi_astat.c @@ -153,10 +153,20 @@ ansi_a_stat_init(const char *opt_arg _U_, void *userdata _U_) } +static tap_ui ansi_a_stat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "ansi_a,", + ansi_a_stat_init, + -1, + 0, + NULL +}; + void register_tap_listener_ansi_astat(void) { - register_stat_cmd_arg("ansi_a,", ansi_a_stat_init, NULL); + register_tap_ui(&ansi_a_stat_ui, NULL); } /* diff --git a/ui/cli/tap-bootpstat.c b/ui/cli/tap-bootpstat.c index 6ec66b399d..7dc578ff95 100644 --- a/ui/cli/tap-bootpstat.c +++ b/ui/cli/tap-bootpstat.c @@ -174,12 +174,20 @@ dhcpstat_init(const char *opt_arg, void *userdata _U_) } } - +static tap_ui dhcpstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "bootp,stat,", + dhcpstat_init, + -1, + 0, + NULL +}; void register_tap_listener_gtkdhcpstat(void) { - register_stat_cmd_arg("bootp,stat,", dhcpstat_init, NULL); + register_tap_ui(&dhcpstat_ui, NULL); } /* diff --git a/ui/cli/tap-camelcounter.c b/ui/cli/tap-camelcounter.c index 440b24ee4f..85fe7a05af 100644 --- a/ui/cli/tap-camelcounter.c +++ b/ui/cli/tap-camelcounter.c @@ -118,11 +118,20 @@ static void camelcounter_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui camelcounter_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "camel,counter", + camelcounter_init, + -1, + 0, + NULL +}; void /* Next line mandatory */ register_tap_listener_camelcounter(void) { - register_stat_cmd_arg("camel,counter", camelcounter_init, NULL); + register_tap_ui(&camelcounter_ui, NULL); } /* diff --git a/ui/cli/tap-camelsrt.c b/ui/cli/tap-camelsrt.c index 83e6d2b963..71a005bef4 100644 --- a/ui/cli/tap-camelsrt.c +++ b/ui/cli/tap-camelsrt.c @@ -240,11 +240,20 @@ static void camelsrt_init(const char *opt_arg, void *userdata _U_) gcamel_StatSRT = TRUE; } +static tap_ui camelsrt_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "camel,srt", + camelsrt_init, + -1, + 0, + NULL +}; void /* Next line mandatory */ register_tap_listener_camelsrt(void) { - register_stat_cmd_arg("camel,srt", camelsrt_init, NULL); + register_tap_ui(&camelsrt_ui, NULL); } /* diff --git a/ui/cli/tap-comparestat.c b/ui/cli/tap-comparestat.c index 00e5104d4c..63dfb18cf4 100644 --- a/ui/cli/tap-comparestat.c +++ b/ui/cli/tap-comparestat.c @@ -562,11 +562,20 @@ comparestat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui comparestat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "compare,", + comparestat_init, + -1, + 0, + NULL +}; void register_tap_listener_comparestat(void) { - register_stat_cmd_arg("compare,", comparestat_init, NULL); + register_tap_ui(&comparestat_ui, NULL); } /* diff --git a/ui/cli/tap-dcerpcstat.c b/ui/cli/tap-dcerpcstat.c index 80c973fa27..450de0b829 100644 --- a/ui/cli/tap-dcerpcstat.c +++ b/ui/cli/tap-dcerpcstat.c @@ -288,10 +288,20 @@ dcerpcstat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui dcerpcstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "dcerpc,srt,", + dcerpcstat_init, + -1, + 0, + NULL +}; + void register_tap_listener_dcerpcstat(void) { - register_stat_cmd_arg("dcerpc,srt,", dcerpcstat_init, NULL); + register_tap_ui(&dcerpcstat_ui, NULL); } /* diff --git a/ui/cli/tap-diameter-avp.c b/ui/cli/tap-diameter-avp.c index 7acc40922b..0fe4aa54d2 100644 --- a/ui/cli/tap-diameter-avp.c +++ b/ui/cli/tap-diameter-avp.c @@ -267,11 +267,20 @@ diameteravp_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui diameteravp_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "diameter,avp", + diameteravp_init, + -1, + 0, + NULL +}; void register_tap_listener_diameteravp(void) { - register_stat_cmd_arg("diameter,avp", diameteravp_init, NULL); + register_tap_ui(&diameteravp_ui, NULL); } diff --git a/ui/cli/tap-expert.c b/ui/cli/tap-expert.c index ff3006f7eb..15dafcac77 100644 --- a/ui/cli/tap-expert.c +++ b/ui/cli/tap-expert.c @@ -262,12 +262,21 @@ static void expert_stat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui expert_stat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "expert", + expert_stat_init, + -1, + 0, + NULL +}; /* Register this tap listener (need void on own so line register function found) */ void register_tap_listener_expert_info(void) { - register_stat_cmd_arg("expert", expert_stat_init, NULL); + register_tap_ui(&expert_stat_ui, NULL); } /* diff --git a/ui/cli/tap-follow.c b/ui/cli/tap-follow.c index c811132853..9b48695666 100644 --- a/ui/cli/tap-follow.c +++ b/ui/cli/tap-follow.c @@ -984,12 +984,42 @@ followSsl( } } +static tap_ui followTcp_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + STR_FOLLOW_TCP, + followTcp, + -1, + 0, + NULL +}; + +static tap_ui followUdp_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + STR_FOLLOW_UDP, + followUdp, + -1, + 0, + NULL +}; + +static tap_ui followSsl_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + STR_FOLLOW_SSL, + followSsl, + -1, + 0, + NULL +}; + void register_tap_listener_follow(void) { - register_stat_cmd_arg(STR_FOLLOW_TCP, followTcp, NULL); - register_stat_cmd_arg(STR_FOLLOW_UDP, followUdp, NULL); - register_stat_cmd_arg(STR_FOLLOW_SSL, followSsl, NULL); + register_tap_ui(&followTcp_ui, NULL); + register_tap_ui(&followUdp_ui, NULL); + register_tap_ui(&followSsl_ui, NULL); } /* diff --git a/ui/cli/tap-funnel.c b/ui/cli/tap-funnel.c index bf13223d5b..d12902561b 100644 --- a/ui/cli/tap-funnel.c +++ b/ui/cli/tap-funnel.c @@ -170,6 +170,7 @@ static void register_menu_cb(const char *name, gpointer callback_data, gboolean retap _U_) { menu_cb_t *mcb = g_malloc(sizeof(menu_cb_t)); + tap_ui ui_info; mcb->callback = callback; mcb->callback_data = callback_data; @@ -179,7 +180,14 @@ static void register_menu_cb(const char *name, g_hash_table_insert(menus, g_strdup(name), mcb); - register_stat_cmd_arg(name, init_funnel_cmd, mcb); + ui_info.group = REGISTER_STAT_GROUP_GENERIC; + ui_info.title = NULL; + ui_info.cli_string = name; + ui_info.tap_init_cb = init_funnel_cmd; + ui_info.index = -1; + ui_info.nparams = 0; + ui_info.params = NULL; + register_tap_ui(&ui_info, mcb); } void initialize_funnel_ops(void) { diff --git a/ui/cli/tap-gsm_astat.c b/ui/cli/tap-gsm_astat.c index 94cfae5c64..5798d67d71 100644 --- a/ui/cli/tap-gsm_astat.c +++ b/ui/cli/tap-gsm_astat.c @@ -339,11 +339,20 @@ gsm_a_stat_init(const char *opt_arg _U_, void *userdata _U_) } } +static tap_ui gsm_a_stat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "gsm_a,", + gsm_a_stat_init, + -1, + 0, + NULL +}; void register_tap_listener_gsm_astat(void) { - register_stat_cmd_arg("gsm_a,", gsm_a_stat_init, NULL); + register_tap_ui(&gsm_a_stat_ui, NULL); } /* diff --git a/ui/cli/tap-h225counter.c b/ui/cli/tap-h225counter.c index 447a865e73..1310eac1a2 100644 --- a/ui/cli/tap-h225counter.c +++ b/ui/cli/tap-h225counter.c @@ -370,11 +370,20 @@ h225counter_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui h225counter_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "h225,counter", + h225counter_init, + -1, + 0, + NULL +}; void register_tap_listener_h225counter(void) { - register_stat_cmd_arg("h225,counter", h225counter_init, NULL); + register_tap_ui(&h225counter_ui, NULL); } /* diff --git a/ui/cli/tap-h225rassrt.c b/ui/cli/tap-h225rassrt.c index 360e9e7aad..0b39c3a00b 100644 --- a/ui/cli/tap-h225rassrt.c +++ b/ui/cli/tap-h225rassrt.c @@ -233,11 +233,20 @@ h225rassrt_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui h225rassrt_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "h225,srt", + h225rassrt_init, + -1, + 0, + NULL +}; void register_tap_listener_h225rassrt(void) { - register_stat_cmd_arg("h225,srt", h225rassrt_init, NULL); + register_tap_ui(&h225rassrt_ui, NULL); } /* diff --git a/ui/cli/tap-hosts.c b/ui/cli/tap-hosts.c index da2b323da6..20963b119d 100644 --- a/ui/cli/tap-hosts.c +++ b/ui/cli/tap-hosts.c @@ -137,10 +137,20 @@ hosts_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui hosts_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + TAP_NAME, + hosts_init, + -1, + 0, + NULL +}; + void register_tap_listener_hosts(void) { - register_stat_cmd_arg(TAP_NAME, hosts_init, NULL); + register_tap_ui(&hosts_ui, NULL); } diff --git a/ui/cli/tap-httpstat.c b/ui/cli/tap-httpstat.c index 073d04178a..ee45c6bb06 100644 --- a/ui/cli/tap-httpstat.c +++ b/ui/cli/tap-httpstat.c @@ -320,10 +320,20 @@ gtk_httpstat_init(const char *opt_arg, void *userdata _U_) http_init_hash(sp); } +static tap_ui httpstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "http,stat,", + gtk_httpstat_init, + -1, + 0, + NULL +}; + void register_tap_listener_gtkhttpstat(void) { - register_stat_cmd_arg("http,stat,", gtk_httpstat_init, NULL); + register_tap_ui(&httpstat_ui, NULL); } /* diff --git a/ui/cli/tap-icmpstat.c b/ui/cli/tap-icmpstat.c index bbfb87407b..d18dc61439 100644 --- a/ui/cli/tap-icmpstat.c +++ b/ui/cli/tap-icmpstat.c @@ -309,11 +309,20 @@ icmpstat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui icmpstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "icmp,srt", + icmpstat_init, + -1, + 0, + NULL +}; void register_tap_listener_icmpstat(void) { - register_stat_cmd_arg("icmp,srt", icmpstat_init, NULL); + register_tap_ui(&icmpstat_ui, NULL); } /* diff --git a/ui/cli/tap-icmpv6stat.c b/ui/cli/tap-icmpv6stat.c index c0d1a88dde..826d4fdc65 100644 --- a/ui/cli/tap-icmpv6stat.c +++ b/ui/cli/tap-icmpv6stat.c @@ -310,11 +310,20 @@ icmpv6stat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui icmpv6stat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "icmpv6,srt", + icmpv6stat_init, + -1, + 0, + NULL +}; void register_tap_listener_icmpv6stat(void) { - register_stat_cmd_arg("icmpv6,srt", icmpv6stat_init, NULL); + register_tap_ui(&icmpv6stat_ui, NULL); } /* diff --git a/ui/cli/tap-iostat.c b/ui/cli/tap-iostat.c index e9560d69a5..dd03132727 100644 --- a/ui/cli/tap-iostat.c +++ b/ui/cli/tap-iostat.c @@ -1496,10 +1496,20 @@ iostat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui iostat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "io,stat,", + iostat_init, + -1, + 0, + NULL +}; + void register_tap_listener_iostat(void) { - register_stat_cmd_arg("io,stat,", iostat_init, NULL); + register_tap_ui(&iostat_ui, NULL); } /* diff --git a/ui/cli/tap-macltestat.c b/ui/cli/tap-macltestat.c index 253fd4f2c8..ae170b8e59 100644 --- a/ui/cli/tap-macltestat.c +++ b/ui/cli/tap-macltestat.c @@ -541,12 +541,21 @@ static void mac_lte_stat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui mac_lte_stat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "mac-lte,stat", + mac_lte_stat_init, + -1, + 0, + NULL +}; /* Register this tap listener (need void on own so line register function found) */ void register_tap_listener_mac_lte_stat(void) { - register_stat_cmd_arg("mac-lte,stat", mac_lte_stat_init, NULL); + register_tap_ui(&mac_lte_stat_ui, NULL); } /* diff --git a/ui/cli/tap-megacostat.c b/ui/cli/tap-megacostat.c index 0a232d972a..4f843d0e25 100644 --- a/ui/cli/tap-megacostat.c +++ b/ui/cli/tap-megacostat.c @@ -129,13 +129,22 @@ megacostat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui megacostat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "megaco,rtd", + megacostat_init, + -1, + 0, + NULL +}; void register_tap_listener_megacostat(void) { /* We don't register this tap, if we don't have the megaco plugin loaded.*/ if (find_tap_id("megaco")) { - register_stat_cmd_arg("megaco,rtd", megacostat_init, NULL); + register_tap_ui(&megacostat_ui, NULL); } } diff --git a/ui/cli/tap-mgcpstat.c b/ui/cli/tap-mgcpstat.c index 939a037ec5..413c60acef 100644 --- a/ui/cli/tap-mgcpstat.c +++ b/ui/cli/tap-mgcpstat.c @@ -213,13 +213,22 @@ mgcpstat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui mgcpstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "mgcp,rtd", + mgcpstat_init, + -1, + 0, + NULL +}; void register_tap_listener_mgcpstat(void) { /* We don't register this tap, if we don't have the mgcp plugin loaded.*/ if (find_tap_id("mgcp")) { - register_stat_cmd_arg("mgcp,rtd", mgcpstat_init, NULL); + register_tap_ui(&mgcpstat_ui, NULL); } } diff --git a/ui/cli/tap-protocolinfo.c b/ui/cli/tap-protocolinfo.c index a2b640a162..819da41fda 100644 --- a/ui/cli/tap-protocolinfo.c +++ b/ui/cli/tap-protocolinfo.c @@ -130,11 +130,20 @@ protocolinfo_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui protocolinfo_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "proto,colinfo,", + protocolinfo_init, + -1, + 0, + NULL +}; void register_tap_listener_protocolinfo(void) { - register_stat_cmd_arg("proto,colinfo,", protocolinfo_init, NULL); + register_tap_ui(&protocolinfo_ui, NULL); } /* diff --git a/ui/cli/tap-protohierstat.c b/ui/cli/tap-protohierstat.c index 8014eebd0d..77696138ea 100644 --- a/ui/cli/tap-protohierstat.c +++ b/ui/cli/tap-protohierstat.c @@ -206,11 +206,20 @@ protohierstat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui protohierstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "io,phs", + protohierstat_init, + -1, + 0, + NULL +}; void register_tap_listener_protohierstat(void) { - register_stat_cmd_arg("io,phs", protohierstat_init, NULL); + register_tap_ui(&protohierstat_ui, NULL); } /* diff --git a/ui/cli/tap-radiusstat.c b/ui/cli/tap-radiusstat.c index 6360fb6dbc..168c14f136 100644 --- a/ui/cli/tap-radiusstat.c +++ b/ui/cli/tap-radiusstat.c @@ -229,11 +229,20 @@ radiusstat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui radiusstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "radius,rtd", + radiusstat_init, + -1, + 0, + NULL +}; void register_tap_listener_radiusstat(void) { - register_stat_cmd_arg("radius,rtd", radiusstat_init, NULL); + register_tap_ui(&radiusstat_ui, NULL); } /* diff --git a/ui/cli/tap-rlcltestat.c b/ui/cli/tap-rlcltestat.c index 40996bb4cd..c5b44073e0 100644 --- a/ui/cli/tap-rlcltestat.c +++ b/ui/cli/tap-rlcltestat.c @@ -402,10 +402,20 @@ static void rlc_lte_stat_init(const char *opt_arg, void *userdata _U_) /* Register this tap listener (need void on own so line register function found) */ +static tap_ui rlc_lte_stat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "rlc-lte,stat", + rlc_lte_stat_init, + -1, + 0, + NULL +}; + void register_tap_listener_rlc_lte_stat(void) { - register_stat_cmd_arg("rlc-lte,stat", rlc_lte_stat_init, NULL); + register_tap_ui(&rlc_lte_stat_ui, NULL); } /* diff --git a/ui/cli/tap-rpcprogs.c b/ui/cli/tap-rpcprogs.c index ba496de500..0033a95ba5 100644 --- a/ui/cli/tap-rpcprogs.c +++ b/ui/cli/tap-rpcprogs.c @@ -225,11 +225,20 @@ rpcprogs_init(const char *opt_arg _U_, void *userdata _U_) } } +static tap_ui rpcprogs_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "rpc,programs", + rpcprogs_init, + -1, + 0, + NULL +}; void register_tap_listener_rpcprogs(void) { - register_stat_cmd_arg("rpc,programs", rpcprogs_init, NULL); + register_tap_ui(&rpcprogs_ui, NULL); } /* diff --git a/ui/cli/tap-rpcstat.c b/ui/cli/tap-rpcstat.c index 67733b2a98..7126a00593 100644 --- a/ui/cli/tap-rpcstat.c +++ b/ui/cli/tap-rpcstat.c @@ -342,11 +342,20 @@ rpcstat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui rpcstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "rpc,srt,", + rpcstat_init, + -1, + 0, + NULL +}; void register_tap_listener_rpcstat(void) { - register_stat_cmd_arg("rpc,srt,", rpcstat_init, NULL); + register_tap_ui(&rpcstat_ui, NULL); } /* diff --git a/ui/cli/tap-rtp.c b/ui/cli/tap-rtp.c index 765bc47bbb..dd26ff543e 100644 --- a/ui/cli/tap-rtp.c +++ b/ui/cli/tap-rtp.c @@ -152,11 +152,20 @@ rtp_streams_stat_init(const char *opt_arg _U_, void *userdata _U_) } } +static tap_ui rtp_streams_stat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "rtp,streams", + rtp_streams_stat_init, + -1, + 0, + NULL +}; void register_tap_listener_rtp_streams(void) { - register_stat_cmd_arg("rtp,streams", rtp_streams_stat_init, NULL); + register_tap_ui(&rtp_streams_stat_ui, NULL); } /* diff --git a/ui/cli/tap-rtspstat.c b/ui/cli/tap-rtspstat.c index 34cf9047a6..b7972c733a 100644 --- a/ui/cli/tap-rtspstat.c +++ b/ui/cli/tap-rtspstat.c @@ -273,10 +273,20 @@ gtk_rtspstat_init(const char *opt_arg, void *userdata _U_) rtsp_init_hash(sp); } +static tap_ui rtspstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "rtsp,stat,", + gtk_rtspstat_init, + -1, + 0, + NULL +}; + void register_tap_listener_gtkrtspstat(void) { - register_stat_cmd_arg("rtsp,stat,", gtk_rtspstat_init, NULL); + register_tap_ui(&rtspstat_ui, NULL); } /* diff --git a/ui/cli/tap-scsistat.c b/ui/cli/tap-scsistat.c index 4d8a2477b6..408be8373e 100644 --- a/ui/cli/tap-scsistat.c +++ b/ui/cli/tap-scsistat.c @@ -251,10 +251,20 @@ scsistat_init(const char *opt_arg, void* userdata _U_) } } +static tap_ui scsistat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "scsi,srt,", + scsistat_init, + -1, + 0, + NULL +}; + void register_tap_listener_scsistat(void) { - register_stat_cmd_arg("scsi,srt,", scsistat_init, NULL); + register_tap_ui(&scsistat_ui, NULL); } /* diff --git a/ui/cli/tap-sctpchunkstat.c b/ui/cli/tap-sctpchunkstat.c index a19e5efb25..3c3843db93 100644 --- a/ui/cli/tap-sctpchunkstat.c +++ b/ui/cli/tap-sctpchunkstat.c @@ -241,11 +241,20 @@ sctpstat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui sctpstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "sctp,stat", + sctpstat_init, + -1, + 0, + NULL +}; void register_tap_listener_sctpstat(void) { - register_stat_cmd_arg("sctp,stat", sctpstat_init, NULL); + register_tap_ui(&sctpstat_ui, NULL); } /* diff --git a/ui/cli/tap-sipstat.c b/ui/cli/tap-sipstat.c index 06450130b7..be3349d728 100644 --- a/ui/cli/tap-sipstat.c +++ b/ui/cli/tap-sipstat.c @@ -432,10 +432,20 @@ sipstat_init(const char *opt_arg, void *userdata _U_) sip_init_hash(sp); } +static tap_ui sipstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "sip,stat", + sipstat_init, + -1, + 0, + NULL +}; + void register_tap_listener_sipstat(void) { - register_stat_cmd_arg("sip,stat", sipstat_init, NULL); + register_tap_ui(&sipstat_ui, NULL); } /* diff --git a/ui/cli/tap-smbsids.c b/ui/cli/tap-smbsids.c index 289d5a9b98..e5fdc0174a 100644 --- a/ui/cli/tap-smbsids.c +++ b/ui/cli/tap-smbsids.c @@ -85,11 +85,20 @@ smbsids_init(const char *opt_arg _U_, void *userdata _U_) } } +static tap_ui smbsids_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "smb,sids", + smbsids_init, + -1, + 0, + NULL +}; void register_tap_listener_smbsids(void) { - register_stat_cmd_arg("smb,sids", smbsids_init, NULL); + register_tap_ui(&smbsids_ui, NULL); } /* diff --git a/ui/cli/tap-smbstat.c b/ui/cli/tap-smbstat.c index 8efff64a63..3b6ac34305 100644 --- a/ui/cli/tap-smbstat.c +++ b/ui/cli/tap-smbstat.c @@ -246,11 +246,20 @@ smbstat_init(const char *opt_arg, void *userdata _U_) } } +static tap_ui smbstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "smb,srt", + smbstat_init, + -1, + 0, + NULL +}; void register_tap_listener_smbstat(void) { - register_stat_cmd_arg("smb,srt", smbstat_init, NULL); + register_tap_ui(&smbstat_ui, NULL); } /* diff --git a/ui/cli/tap-stats_tree.c b/ui/cli/tap-stats_tree.c index 9bc82702fc..62637504f6 100644 --- a/ui/cli/tap-stats_tree.c +++ b/ui/cli/tap-stats_tree.c @@ -111,11 +111,19 @@ static void register_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p _U_) { stats_tree_cfg *cfg = (stats_tree_cfg *)v; + tap_ui ui_info; cfg->pr = (tree_cfg_pres *)g_malloc(sizeof(tree_cfg_pres)); cfg->pr->init_string = g_strdup_printf("%s,tree", cfg->abbr); - register_stat_cmd_arg(cfg->pr->init_string, init_stats_tree, NULL); + ui_info.group = REGISTER_STAT_GROUP_GENERIC; + ui_info.title = NULL; + ui_info.cli_string = cfg->pr->init_string; + ui_info.tap_init_cb = init_stats_tree; + ui_info.index = -1; + ui_info.nparams = 0; + ui_info.params = NULL; + register_tap_ui(&ui_info, NULL); } diff --git a/ui/cli/tap-sv.c b/ui/cli/tap-sv.c index 70ab3b68cd..694089da29 100644 --- a/ui/cli/tap-sv.c +++ b/ui/cli/tap-sv.c @@ -73,10 +73,20 @@ svstat_init(const char *opt_arg _U_, void *userdata _U_) } } +static tap_ui svstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "sv", + svstat_init, + -1, + 0, + NULL +}; + void register_tap_listener_sv(void) { - register_stat_cmd_arg("sv", svstat_init, NULL); + register_tap_ui(&svstat_ui, NULL); } /* diff --git a/ui/cli/tap-wspstat.c b/ui/cli/tap-wspstat.c index d7e9e66f39..aae6736f1f 100644 --- a/ui/cli/tap-wspstat.c +++ b/ui/cli/tap-wspstat.c @@ -275,10 +275,21 @@ wspstat_init(const char *opt_arg, void *userdata _U_) exit(1); } } + +static tap_ui wspstat_ui = { + REGISTER_STAT_GROUP_GENERIC, + NULL, + "wsp,stat,", + wspstat_init, + -1, + 0, + NULL +}; + void register_tap_listener_wspstat(void) { - register_stat_cmd_arg("wsp,stat,", wspstat_init, NULL); + register_tap_ui(&wspstat_ui, NULL); } /* |