diff options
author | Pascal Quantin <pascal@wireshark.org> | 2023-06-13 21:49:45 +0200 |
---|---|---|
committer | John Thacker <johnthacker@gmail.com> | 2023-06-13 21:49:46 +0000 |
commit | 274e67998e84ba12a55b3e9456e500e4c632ac21 (patch) | |
tree | 125e8ad320c42aef619f7565adb28bbfcaf1b04d | |
parent | aa54f33700f43be4ec8505308b6dd4e522ee6f87 (diff) |
tshark: add support for field alias when specifying a list of fields to display
The ek/pdml/json output will display the new filter name and not the
aliased older one
-rw-r--r-- | tshark.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1344,7 +1344,13 @@ main(int argc, char *argv[]) break; case 'e': /* Field entry */ - output_fields_add(output_fields, ws_optarg); + { + header_field_info *hfi = proto_registrar_get_byalias(ws_optarg); + if (hfi) + output_fields_add(output_fields, hfi->abbrev); + else + output_fields_add(output_fields, ws_optarg); + } break; case 'E': /* Field option */ |