Wireshark-commits: [Wireshark-commits] master bf9286e: Add an API to get the file extension for a c
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=bf9286e554c8d2b9e506b62dc7c0ed8f6e830160
Submitter: "Guy Harris <guy@xxxxxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
bf9286e by Guy Harris (guy@xxxxxxxxxxxx):
Add an API to get the file extension for a compression type, and use it.
Add wtap_compressed_file_extension(), which returns NULL for
WTAP_UNCOMPRESSED and the appropriate file extension for other
compression types.
Add wtap_compression_type_supported(), which returns TRUE for
WTAP_UNCOMPRESSED and all supported compression types and FALSE
otherwise. ("Supported" means "the code can decompmress files in that
compression format and can write files in that compression format", so
WTAP_GAIP_COMPRESSED is supported iff libwiretap is built with zlib.)
In MainWindow::fileAddExtension, instead of checking for
WTAP_GZIP_COMPRESSED and using ".gz" as the extension, use the extension
returned by wtap_compressed_file_extension() for the compression type.
Change-Id: I47cb0eca8c887ada3562df30b54e76509008180f
Reviewed-on: https://code.wireshark.org/review/30707
Reviewed-by: Guy Harris <guy@xxxxxxxxxxxx>
Actions performed:
from 189f1ce packet-mint.c: Rename mint type to mint port and enhance list of ports.
add bf9286e Add an API to get the file extension for a compression type, and use it.
Summary of changes:
ui/qt/main_window.cpp | 2 +-
wiretap/file_access.c | 107 +++++++++++++++++++++++++++++++-----------------
wiretap/file_wrappers.c | 13 ------
wiretap/wtap-int.h | 6 ---
wiretap/wtap.c | 40 ++++++++++++++++++
wiretap/wtap.h | 4 ++
6 files changed, 115 insertions(+), 57 deletions(-)