]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
also tell OpenSSL and libsmi versions
[tcpdump] / tcpdump.c
index 3faf2da731a9ae29f20da7163b910a53598e407a..2e9a5055fee7e0c0112d740ff37f6e3d4521e5d7 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -57,6 +57,10 @@ extern int SIZE_BUF;
 #include <smi.h>
 #endif
 
+#ifdef HAVE_LIBCRYPTO
+#include <openssl/crypto.h>
+#endif
+
 #ifdef HAVE_GETOPT_LONG
 #include <getopt.h>
 #else
@@ -2281,6 +2285,14 @@ print_version(void)
        (void)fprintf(stderr, "libpcap version %s\n", pcap_version);
 #endif /* WIN32 */
 #endif /* HAVE_PCAP_LIB_VERSION */
+
+#if defined(HAVE_LIBCRYPTO) && defined(SSLEAY_VERSION)
+       (void)fprintf (stderr, "%s\n", SSLeay_version(SSLEAY_VERSION));
+#endif
+
+#if defined(HAVE_SMI_H)
+       (void)fprintf (stderr, "SMI-library: %s\n", smi_version_string);
+#endif
 }
 
 static void
@@ -2298,9 +2310,9 @@ print_usage(void)
 "\t\t[ -Q in|out|inout ]\n");
 #endif
        (void)fprintf(stderr,
-"\t\t[ -r file ] [ -s snaplen ] [ -T type ] [ -V file ] [ -w file ]\n");
+"\t\t[ -r file ] [ -s snaplen ] [ -T type ] [ --version ] [ -V file ]\n");
        (void)fprintf(stderr,
-"\t\t[ -W filecount ] [ -y datalinktype ] [ -z command ]\n");
+"\t\t[ -w file ] [ -W filecount ] [ -y datalinktype ] [ -z command ]\n");
        (void)fprintf(stderr,
 "\t\t[ -Z user ] [ expression ]\n");
 }