aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2019-02-05 14:01:03 +0100
committerPeter Wu <peter@lekensteyn.nl>2019-02-05 22:39:21 +0000
commit62a8d40b5fdde124a0f5b88a3dce34468db0cf29 (patch)
treec660fd11bb7bd9dfcdc438c6f5360ed345b95929
parentf2df0fc88d9d5327e1780f5323b74481d4a38738 (diff)
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 <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r--tshark.c7
1 files changed, 6 insertions, 1 deletions
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);
}
}