aboutsummaryrefslogtreecommitdiffstats
path: root/epan/conversation_table.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-12-30 23:26:19 -0500
committerAnders Broman <a.broman58@gmail.com>2015-01-02 00:02:18 +0000
commit860cb393d86fccd01c924b6ea2e565be8ca56698 (patch)
tree60ad77b05717f4470a47a49900cc3b43e1a5625f /epan/conversation_table.c
parent07c9492b8d40ed766074679f86c49780277af002 (diff)
tshark: Add endpoints statistics
"stat name" has been official changed to "endpoints" for all dissectors, rather than a mixture of "host"/"endpoints" based on dissector. Change-Id: If34bcb5165b493948e784ba038ab202803a59843 Reviewed-on: https://code.wireshark.org/review/6154 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net> Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/conversation_table.c')
-rw-r--r--epan/conversation_table.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/epan/conversation_table.c b/epan/conversation_table.c
index 9856cea6df..38171a0527 100644
--- a/epan/conversation_table.c
+++ b/epan/conversation_table.c
@@ -40,7 +40,6 @@ struct register_ct {
int proto_id; /* protocol id (0-indexed) */
tap_packet_cb conv_func; /* function to be called for new incoming packets for conversation*/
tap_packet_cb host_func; /* function to be called for new incoming packets for hostlist */
- host_tap_prefix prefix_func; /* function to provide prefix if different than default (host) */
conv_gui_init_cb conv_gui_init; /* GUI specific function to initialize conversation */
host_gui_init_cb host_gui_init; /* GUI specific function to initialize hostlist */
};
@@ -68,12 +67,6 @@ tap_packet_cb get_hostlist_packet_func(register_ct_t* ct)
return ct->host_func;
}
-host_tap_prefix get_hostlist_prefix_func(register_ct_t* ct)
-{
- return ct->prefix_func;
-}
-
-
static GSList *registered_ct_tables = NULL;
void
@@ -102,7 +95,7 @@ dissector_hostlist_init(const char *opt_arg, void* userdata)
GString *cmd_str = g_string_new("");
const char *filter=NULL;
- g_string_printf(cmd_str, "%s,%s,", (table->prefix_func != NULL) ? table->prefix_func() : "host", proto_get_protocol_filter_name(table->proto_id));
+ g_string_printf(cmd_str, "%s,%s,", HOSTLIST_TAP_PREFIX, proto_get_protocol_filter_name(table->proto_id));
if(!strncmp(opt_arg, cmd_str->str, cmd_str->len)){
if (opt_arg[cmd_str->len] == ',') {
filter = opt_arg + cmd_str->len + 1;
@@ -145,7 +138,7 @@ insert_sorted_by_table_name(gconstpointer aparam, gconstpointer bparam)
}
void
-register_conversation_table(const int proto_id, gboolean hide_ports, tap_packet_cb conv_packet_func, tap_packet_cb hostlist_func, host_tap_prefix prefix_func)
+register_conversation_table(const int proto_id, gboolean hide_ports, tap_packet_cb conv_packet_func, tap_packet_cb hostlist_func)
{
register_ct_t *table;
@@ -157,7 +150,6 @@ register_conversation_table(const int proto_id, gboolean hide_ports, tap_packet_
table->host_func = hostlist_func;
table->conv_gui_init = NULL;
table->host_gui_init = NULL;
- table->prefix_func = prefix_func;
registered_ct_tables = g_slist_insert_sorted(registered_ct_tables, table, insert_sorted_by_table_name);
}
@@ -199,8 +191,7 @@ set_host_gui_data(gpointer data, gpointer user_data)
table->host_gui_init = (host_gui_init_cb)user_data;
- 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));
+ g_string_printf(host_cmd_str, "%s,%s", HOSTLIST_TAP_PREFIX, proto_get_protocol_filter_name(table->proto_id));
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;