forked from osmocom/wireshark
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>
This commit is contained in:
parent
09f0d2c6c4
commit
7390516f61
|
@ -148,6 +148,7 @@ register_conversation_table(const int proto_id, gboolean hide_ports, tap_packet_
|
|||
register_ct_t *table;
|
||||
GString *conv_cmd_str = g_string_new("conv,");
|
||||
GString *host_cmd_str = g_string_new("");
|
||||
tap_ui ui_info;
|
||||
|
||||
table = g_new(register_ct_t,1);
|
||||
|
||||
|
@ -163,12 +164,26 @@ register_conversation_table(const int proto_id, gboolean hide_ports, tap_packet_
|
|||
|
||||
g_string_append(conv_cmd_str, proto_get_protocol_filter_name(table->proto_id));
|
||||
cmd_string_list_ = g_list_append(cmd_string_list_, conv_cmd_str->str);
|
||||
register_stat_cmd_arg(conv_cmd_str->str, dissector_conversation_init, table);
|
||||
ui_info.group = REGISTER_STAT_GROUP_CONVERSATION_LIST;
|
||||
ui_info.title = NULL; /* construct this from the protocol info? */
|
||||
ui_info.cli_string = conv_cmd_str->str;
|
||||
ui_info.tap_init_cb = dissector_conversation_init;
|
||||
ui_info.index = -1;
|
||||
ui_info.nparams = 0;
|
||||
ui_info.params = NULL;
|
||||
register_tap_ui(&ui_info, table);
|
||||
g_string_free(conv_cmd_str, FALSE);
|
||||
|
||||
g_string_printf(host_cmd_str, "%s,%s", (get_hostlist_prefix_func(table) != NULL) ? get_hostlist_prefix_func(table)() : "host",
|
||||
proto_get_protocol_filter_name(table->proto_id));
|
||||
register_stat_cmd_arg(host_cmd_str->str, dissector_hostlist_init, table);
|
||||
ui_info.group = REGISTER_STAT_GROUP_ENDPOINT_LIST;
|
||||
ui_info.title = NULL; /* construct this from the protocol info? */
|
||||
ui_info.cli_string = host_cmd_str->str;
|
||||
ui_info.tap_init_cb = dissector_hostlist_init;
|
||||
ui_info.index = -1;
|
||||
ui_info.nparams = 0;
|
||||
ui_info.params = NULL;
|
||||
register_tap_ui(&ui_info, table);
|
||||
g_string_free(host_cmd_str, FALSE);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
arguments.
|
||||
*/
|
||||
typedef struct _stat_cmd_arg {
|
||||
tap_ui *ui;
|
||||
const char *cmd;
|
||||
void (*func)(const char *arg, void* userdata);
|
||||
void* userdata;
|
||||
|
@ -59,6 +60,7 @@ sort_by_name(gconstpointer a, gconstpointer b)
|
|||
{
|
||||
return strcmp(((const stat_cmd_arg *)a)->cmd, ((const stat_cmd_arg *)b)->cmd);
|
||||
}
|
||||
|
||||
void
|
||||
register_stat_cmd_arg(const char *cmd, void (*func)(const char*, void*),void* userdata)
|
||||
{
|
||||
|
@ -71,6 +73,18 @@ register_stat_cmd_arg(const char *cmd, void (*func)(const char*, void*),void* us
|
|||
stat_cmd_arg_list=g_slist_insert_sorted(stat_cmd_arg_list, newsca, sort_by_name);
|
||||
}
|
||||
|
||||
void
|
||||
register_tap_ui(tap_ui *ui, void *userdata)
|
||||
{
|
||||
stat_cmd_arg *newsca;
|
||||
|
||||
newsca=(stat_cmd_arg *)g_malloc(sizeof(stat_cmd_arg));
|
||||
newsca->cmd=ui->cli_string;
|
||||
newsca->func=ui->tap_init_cb;
|
||||
newsca->userdata=userdata;
|
||||
stat_cmd_arg_list=g_slist_insert_sorted(stat_cmd_arg_list, newsca, sort_by_name);
|
||||
}
|
||||
|
||||
/* **********************************************************************
|
||||
* Function called for a stat command-line argument
|
||||
* ********************************************************************** */
|
||||
|
|
|
@ -37,12 +37,49 @@ extern "C" {
|
|||
* @param func Callbak to be invoked when the CLI argument is supplied.
|
||||
* @param userdata Additional data for the callback.
|
||||
*/
|
||||
#if 0
|
||||
WS_DLL_PUBLIC void register_stat_cmd_arg(const char *cmd,
|
||||
void (*func)(const char *arg,void* userdata), void* userdata);
|
||||
#endif
|
||||
WS_DLL_PUBLIC gboolean process_stat_cmd_arg(char *optstr);
|
||||
WS_DLL_PUBLIC void list_stat_cmd_args(void);
|
||||
WS_DLL_PUBLIC void start_requested_stats(void);
|
||||
|
||||
/*
|
||||
* Parameters for taps.
|
||||
*/
|
||||
|
||||
#include <epan/params.h>
|
||||
#include <epan/stat_groups.h>
|
||||
|
||||
typedef enum {
|
||||
PARAM_UINT,
|
||||
PARAM_STRING,
|
||||
PARAM_ENUM,
|
||||
PARAM_FILTER
|
||||
} param_type;
|
||||
|
||||
typedef struct _tap_param {
|
||||
param_type type;
|
||||
const char *title;
|
||||
const enum_val_t *enum_vals;
|
||||
} tap_param;
|
||||
|
||||
typedef struct _tap_ui {
|
||||
register_stat_group_t group; /* group to which statistic belongs */
|
||||
const char *title; /* title of statistic */
|
||||
const char *cli_string; /* initial part of the "-z" argument for statistic */
|
||||
void (* tap_init_cb)(const char *,void*); /* callback to init function of the tap */
|
||||
gint index; /* initiate this value always with "-1" */
|
||||
size_t nparams; /* number of parameters */
|
||||
tap_param *params; /* pointer to table of parameter info */
|
||||
} tap_ui;
|
||||
|
||||
/*
|
||||
* Register the parameters a tap takes.
|
||||
*/
|
||||
WS_DLL_PUBLIC void register_tap_ui(tap_ui *ui, void *userdata);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
|
|
@ -264,13 +264,21 @@ WSLUA_FUNCTION wslua_register_stat_cmd_arg(lua_State* L) {
|
|||
#define WSLUA_OPTARG_register_stat_cmd_arg_ACTION 2 /* Action */
|
||||
const char* arg = luaL_checkstring(L,WSLUA_ARG_register_stat_cmd_arg_ARGUMENT);
|
||||
statcmd_t* sc = (statcmd_t *)g_malloc0(sizeof(statcmd_t)); /* XXX leaked */
|
||||
tap_ui ui_info;
|
||||
|
||||
sc->L = L;
|
||||
lua_pushvalue(L, WSLUA_OPTARG_register_stat_cmd_arg_ACTION);
|
||||
sc->func_ref = luaL_ref(L, LUA_REGISTRYINDEX);
|
||||
lua_remove(L,1);
|
||||
|
||||
register_stat_cmd_arg(arg, statcmd_init, sc);
|
||||
ui_info.group = REGISTER_STAT_GROUP_UNSORTED; /* XXX - need group for CLI-only? */
|
||||
ui_info.title = NULL;
|
||||
ui_info.cli_string = arg;
|
||||
ui_info.tap_init_cb = statcmd_init;
|
||||
ui_info.index = -1;
|
||||
ui_info.nparams = 0;
|
||||
ui_info.params = NULL;
|
||||
register_tap_ui(&ui_info, sc);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -350,6 +350,15 @@ ansi_map_stat_gtk_init(
|
|||
ansi_map_stat_gtk_cb(NULL, NULL);
|
||||
}
|
||||
|
||||
static tap_ui ansi_map_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"ansi_map",
|
||||
ansi_map_stat_gtk_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_gtkansi_map_stat(void)
|
||||
|
@ -372,5 +381,5 @@ register_tap_listener_gtkansi_map_stat(void)
|
|||
|
||||
exit(1);
|
||||
}
|
||||
register_stat_cmd_arg("ansi_map", ansi_map_stat_gtk_init,NULL);
|
||||
register_tap_ui(&ansi_map_ui, NULL);
|
||||
}
|
||||
|
|
|
@ -1046,11 +1046,20 @@ gtk_comparestat_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
window_present(dlg);
|
||||
}
|
||||
|
||||
static tap_ui compare_stat_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"compare",
|
||||
gtk_comparestat_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_gtkcomparestat(void)
|
||||
{
|
||||
register_stat_cmd_arg("compare", gtk_comparestat_init, NULL);
|
||||
register_tap_ui(&compare_stat_ui, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -714,8 +714,18 @@ void gtk_dcerpcstat_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
window_present(dlg);
|
||||
}
|
||||
|
||||
static tap_ui dcerpcstat_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"dcerpc,srt,",
|
||||
gtk_dcerpcstat_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_gtkdcerpcstat(void)
|
||||
{
|
||||
register_stat_cmd_arg("dcerpc,srt,", gtk_dcerpcstat_init,NULL);
|
||||
register_tap_ui(&dcerpcstat_ui, NULL);
|
||||
}
|
||||
|
|
|
@ -1006,10 +1006,20 @@ expert_comp_dlg_launch(void)
|
|||
}
|
||||
}
|
||||
|
||||
static tap_ui expert_comp_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"expert_comp",
|
||||
expert_comp_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_expert_comp(void)
|
||||
{
|
||||
register_stat_cmd_arg("expert_comp", expert_comp_init,NULL);
|
||||
register_tap_ui(&expert_comp_ui, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -395,10 +395,20 @@ flow_graph_launch(GtkAction *action _U_, gpointer user_data _U_)
|
|||
}
|
||||
|
||||
/****************************************************************************/
|
||||
static tap_ui flow_graph_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"flow_graph",
|
||||
flow_graph_init_tap,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_flow_graph(void)
|
||||
{
|
||||
register_stat_cmd_arg("flow_graph",flow_graph_init_tap,NULL);
|
||||
register_tap_ui(&flow_graph_ui,NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -627,6 +627,106 @@ gsm_a_stat_gtk_sacch_rr_init(
|
|||
gsm_a_stat_gtk_sacch_rr_cb(NULL, NULL);
|
||||
}
|
||||
|
||||
static tap_ui gsm_a_stat_bssmap_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_a,bssmap",
|
||||
gsm_a_stat_gtk_bssmap_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static tap_ui gsm_a_stat_dtap_mm_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_a,dtap_mm",
|
||||
gsm_a_stat_gtk_dtap_mm_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static tap_ui gsm_a_stat_dtap_rr_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_a,dtap_rr",
|
||||
gsm_a_stat_gtk_dtap_rr_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static tap_ui gsm_a_stat_dtap_cc_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_a,dtap_cc",
|
||||
gsm_a_stat_gtk_dtap_cc_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static tap_ui gsm_a_stat_dtap_gmm_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_a,dtap_gmm",
|
||||
gsm_a_stat_gtk_dtap_gmm_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static tap_ui gsm_a_stat_dtap_sms_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_a,dtap_sms",
|
||||
gsm_a_stat_gtk_dtap_sms_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static tap_ui gsm_a_stat_dtap_sm_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_a,dtap_sm",
|
||||
gsm_a_stat_gtk_dtap_sm_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static tap_ui gsm_a_stat_dtap_ss_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_a,dtap_ss",
|
||||
gsm_a_stat_gtk_dtap_ss_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static tap_ui gsm_a_stat_dtap_tp_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_a,dtap_tp",
|
||||
gsm_a_stat_gtk_dtap_tp_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static tap_ui gsm_a_stat_sacch_rr_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_a,sacch",
|
||||
gsm_a_stat_gtk_sacch_rr_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_gtkgsm_a_stat(void)
|
||||
{
|
||||
|
@ -649,23 +749,23 @@ register_tap_listener_gtkgsm_a_stat(void)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
register_stat_cmd_arg("gsm_a,bssmap", gsm_a_stat_gtk_bssmap_init,NULL);
|
||||
register_tap_ui(&gsm_a_stat_bssmap_ui,NULL);
|
||||
|
||||
register_stat_cmd_arg("gsm_a,dtap_mm", gsm_a_stat_gtk_dtap_mm_init,NULL);
|
||||
register_tap_ui(&gsm_a_stat_dtap_mm_ui,NULL);
|
||||
|
||||
register_stat_cmd_arg("gsm_a,dtap_rr", gsm_a_stat_gtk_dtap_rr_init,NULL);
|
||||
register_tap_ui(&gsm_a_stat_dtap_rr_ui,NULL);
|
||||
|
||||
register_stat_cmd_arg("gsm_a,dtap_cc", gsm_a_stat_gtk_dtap_cc_init,NULL);
|
||||
register_tap_ui(&gsm_a_stat_dtap_cc_ui,NULL);
|
||||
|
||||
register_stat_cmd_arg("gsm_a,dtap_gmm", gsm_a_stat_gtk_dtap_gmm_init,NULL);
|
||||
register_tap_ui(&gsm_a_stat_dtap_gmm_ui,NULL);
|
||||
|
||||
register_stat_cmd_arg("gsm_a,dtap_sms", gsm_a_stat_gtk_dtap_sms_init,NULL);
|
||||
register_tap_ui(&gsm_a_stat_dtap_sms_ui,NULL);
|
||||
|
||||
register_stat_cmd_arg("gsm_a,dtap_sm", gsm_a_stat_gtk_dtap_sm_init,NULL);
|
||||
register_tap_ui(&gsm_a_stat_dtap_sm_ui,NULL);
|
||||
|
||||
register_stat_cmd_arg("gsm_a,dtap_ss", gsm_a_stat_gtk_dtap_ss_init,NULL);
|
||||
register_tap_ui(&gsm_a_stat_dtap_ss_ui,NULL);
|
||||
|
||||
register_stat_cmd_arg("gsm_a,dtap_tp", gsm_a_stat_gtk_dtap_tp_init,NULL);
|
||||
register_tap_ui(&gsm_a_stat_dtap_tp_ui,NULL);
|
||||
|
||||
register_stat_cmd_arg("gsm_a,sacch", gsm_a_stat_gtk_sacch_rr_init,NULL);
|
||||
register_tap_ui(&gsm_a_stat_sacch_rr_ui,NULL);
|
||||
}
|
||||
|
|
|
@ -451,6 +451,16 @@ gsm_map_stat_gtk_init(const char *opt_arg _U_,
|
|||
}
|
||||
|
||||
|
||||
static tap_ui gsm_map_stat_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"gsm_map",
|
||||
gsm_map_stat_gtk_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_gtkgsm_map_stat(void)
|
||||
{
|
||||
|
@ -473,5 +483,5 @@ register_tap_listener_gtkgsm_map_stat(void)
|
|||
exit(1);
|
||||
}
|
||||
|
||||
register_stat_cmd_arg("gsm_map", gsm_map_stat_gtk_init,NULL);
|
||||
register_tap_ui(&gsm_map_stat_ui, NULL);
|
||||
}
|
||||
|
|
|
@ -3808,10 +3808,20 @@ iax2_analysis_init(const char *dummy _U_,void* userdata _U_)
|
|||
}
|
||||
|
||||
/****************************************************************************/
|
||||
static tap_ui iax2_analysis_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"IAX2", /* XXX - should be "iax2" */
|
||||
iax2_analysis_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_iax2_analysis(void)
|
||||
{
|
||||
register_stat_cmd_arg("IAX2", iax2_analysis_init,NULL);
|
||||
register_tap_ui(&iax2_analysis_ui,NULL);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2170,8 +2170,18 @@ gui_iostat_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
iostat_init(NULL,NULL);
|
||||
}
|
||||
|
||||
static tap_ui iostat_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"io,stat",
|
||||
iostat_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_gtk_iostat(void)
|
||||
{
|
||||
register_stat_cmd_arg("io,stat", iostat_init,NULL);
|
||||
register_tap_ui(&iostat_ui, NULL);
|
||||
}
|
||||
|
|
|
@ -420,6 +420,16 @@ mtp3_stat_gtk_init( const char *opt_arg _U_, void* userdata _U_)
|
|||
}
|
||||
|
||||
|
||||
static tap_ui mtp3_stat_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"mtp3,msus",
|
||||
mtp3_stat_gtk_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_gtkmtp3_stat(void)
|
||||
{
|
||||
|
@ -441,5 +451,5 @@ register_tap_listener_gtkmtp3_stat(void)
|
|||
|
||||
exit(1);
|
||||
}
|
||||
register_stat_cmd_arg("mtp3,msus", mtp3_stat_gtk_init,NULL);
|
||||
register_tap_ui(&mtp3_stat_ui, NULL);
|
||||
}
|
||||
|
|
|
@ -426,8 +426,18 @@ gtk_rpcprogs_cb(GtkWidget *w _U_, gpointer data _U_)
|
|||
gtk_rpcprogs_init("", NULL);
|
||||
}
|
||||
|
||||
static tap_ui rpcprogs_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"rpc,programs",
|
||||
gtk_rpcprogs_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_gtkrpcprogs(void)
|
||||
{
|
||||
register_stat_cmd_arg("rpc,programs", gtk_rpcprogs_init, NULL);
|
||||
register_tap_ui(&rpcprogs_ui, NULL);
|
||||
}
|
||||
|
|
|
@ -523,9 +523,19 @@ gtk_rpcstat_cb(GtkAction *action _U_, gpointer user_data _U_)
|
|||
}
|
||||
|
||||
|
||||
static tap_ui rpcstat_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"rpc,srt,",
|
||||
gtk_rpcstat_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_gtkrpcstat(void)
|
||||
{
|
||||
register_stat_cmd_arg("rpc,srt,", gtk_rpcstat_init, NULL);
|
||||
register_tap_ui(&rpcstat_ui, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -4044,8 +4044,18 @@ rtp_analysis_init(const char *dummy _U_, void *userdata _U_)
|
|||
}
|
||||
|
||||
/****************************************************************************/
|
||||
static tap_ui rtp_analysis_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"rtp",
|
||||
rtp_analysis_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_rtp_analysis(void)
|
||||
{
|
||||
register_stat_cmd_arg("rtp", rtp_analysis_init, NULL);
|
||||
register_tap_ui(&rtp_analysis_ui, NULL);
|
||||
}
|
||||
|
|
|
@ -67,8 +67,7 @@ register_param_stat(tap_param_dlg *info, const char *name,
|
|||
{
|
||||
gchar *full_name;
|
||||
const gchar *stock_id = NULL;
|
||||
|
||||
register_stat_cmd_arg(info->init_string, info->tap_init_cb, NULL);
|
||||
tap_ui ui_info;
|
||||
|
||||
/*
|
||||
* This menu item will pop up a dialog box, so append "..."
|
||||
|
@ -76,6 +75,15 @@ register_param_stat(tap_param_dlg *info, const char *name,
|
|||
*/
|
||||
full_name = g_strdup_printf("%s...", name);
|
||||
|
||||
ui_info.group = group;
|
||||
ui_info.title = full_name;
|
||||
ui_info.cli_string = info->init_string;
|
||||
ui_info.tap_init_cb = info->tap_init_cb;
|
||||
ui_info.index = -1;
|
||||
ui_info.nparams = info->nparams;
|
||||
ui_info.params = info->params;
|
||||
register_tap_ui(&ui_info, NULL);
|
||||
|
||||
switch (group) {
|
||||
|
||||
case REGISTER_ANALYZE_GROUP_UNSORTED:
|
||||
|
|
|
@ -62,19 +62,7 @@
|
|||
*/
|
||||
|
||||
#include <epan/params.h>
|
||||
|
||||
typedef enum {
|
||||
PARAM_UINT,
|
||||
PARAM_STRING,
|
||||
PARAM_ENUM,
|
||||
PARAM_FILTER
|
||||
} param_type;
|
||||
|
||||
typedef struct _tap_param {
|
||||
param_type type;
|
||||
const char *title;
|
||||
const enum_val_t *enum_vals;
|
||||
} tap_param;
|
||||
#include <epan/stat_cmd_args.h>
|
||||
|
||||
typedef struct _tap_param_dlg {
|
||||
const char *win_title; /* title */
|
||||
|
|
|
@ -921,9 +921,19 @@ voip_flows_launch(GtkAction *action _U_, gpointer user_data _U_)
|
|||
}
|
||||
|
||||
/****************************************************************************/
|
||||
static tap_ui voip_calls_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"voip,calls",
|
||||
voip_calls_init_tap,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
void
|
||||
register_tap_listener_voip_calls_dlg(void)
|
||||
{
|
||||
register_stat_cmd_arg("voip,calls", voip_calls_init_tap, NULL);
|
||||
register_tap_ui(&voip_calls_ui, NULL);
|
||||
}
|
||||
|
||||
|
|
|
@ -2164,11 +2164,21 @@ io_graph_init(const char *, void*) {
|
|||
wsApp->emitStatCommandSignal("IOGraph", NULL, NULL);
|
||||
}
|
||||
|
||||
static tap_ui io_stat_ui = {
|
||||
REGISTER_STAT_GROUP_GENERIC,
|
||||
NULL,
|
||||
"io,stat",
|
||||
io_graph_init,
|
||||
-1,
|
||||
0,
|
||||
NULL
|
||||
};
|
||||
|
||||
extern "C" {
|
||||
void
|
||||
register_tap_listener_qt_iostat(void)
|
||||
{
|
||||
register_stat_cmd_arg("io,stat", io_graph_init, NULL);
|
||||
register_tap_ui(&io_stat_ui, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue