diff options
Diffstat (limited to 'tshark.c')
-rw-r--r-- | tshark.c | 24 |
1 files changed, 23 insertions, 1 deletions
@@ -51,6 +51,10 @@ # include <sys/stat.h> #endif +#ifdef HAVE_LIBZ +#include <zlib.h> /* to get the libz version number */ +#endif + #ifndef HAVE_GETOPT #include "wsutil/wsgetopt.h" #endif @@ -918,6 +922,24 @@ show_version(GString *comp_info_str, GString *runtime_info_str) runtime_info_str->str); } +static void +get_tshark_runtime_info(GString *str) +{ +#ifdef HAVE_LIBPCAP + /* Libpcap */ + g_string_append(str, ", "); + get_runtime_pcap_version(str); +#endif + + /* zlib */ +#if defined(HAVE_LIBZ) && !defined(_WIN32) + g_string_append_printf(str, ", with libz %s", zlibVersion()); +#endif + + /* stuff used by libwireshark */ + epan_get_runtime_version_info(str); +} + int main(int argc, char *argv[]) { @@ -989,7 +1011,7 @@ main(int argc, char *argv[]) /* Assemble the run-time version information string */ runtime_info_str = g_string_new("Running "); - get_runtime_version_info(runtime_info_str, NULL); + get_runtime_version_info(runtime_info_str, get_tshark_runtime_info); /* Add it to the information to be reported on a crash. */ ws_add_crash_info("TShark %s\n" |