diff options
author | Peter Wu <peter@lekensteyn.nl> | 2019-02-05 14:01:03 +0100 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2019-02-05 22:39:21 +0000 |
commit | 62a8d40b5fdde124a0f5b88a3dce34468db0cf29 (patch) | |
tree | c660fd11bb7bd9dfcdc438c6f5360ed345b95929 /tshark.c | |
parent | f2df0fc88d9d5327e1780f5323b74481d4a38738 (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>
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); } } |