From 62a8d40b5fdde124a0f5b88a3dce34468db0cf29 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Tue, 5 Feb 2019 14:01:03 +0100 Subject: [PATCH] tshark: recognize protocol aliases such as "-O ssl" Be sure to map "ssl" to "tls" instead of silently ignoring it. Change-Id: If1edc10ead4a9f25ee4802e1395390dc3c51796f Reviewed-on: https://code.wireshark.org/review/31894 Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu --- tshark.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tshark.c b/tshark.c index c1fbd13eb5..6747cb49ee 100644 --- a/tshark.c +++ b/tshark.c @@ -1586,7 +1586,12 @@ main(int argc, char *argv[]) output_only_tables = g_hash_table_new (g_str_hash, g_str_equal); for (ps = strtok (output_only, ","); ps; ps = strtok (NULL, ",")) { - g_hash_table_insert(output_only_tables, (gpointer)ps, (gpointer)ps); + const char *name = ps; + header_field_info *hfi = proto_registrar_get_byalias(name); + if (hfi) { + name = hfi->abbrev; + } + g_hash_table_insert(output_only_tables, (gpointer)name, (gpointer)name); } }