]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-isakmp.c
IP packet information printing from NFLOG packet
[tcpdump] / print-isakmp.c
index c16d62878df35c651e6c4700443298e2892c9b8f..ee82f5b75b3648ba150acb73d34385db67b6bbf6 100644 (file)
@@ -38,6 +38,13 @@ static const char rcsid[] _U_ =
 #include "config.h"
 #endif
 
+/* The functions from print-esp.c used in this file are only defined when both
+ * OpenSSL and evp.h are detected. Employ the same preprocessor device here.
+ */
+#ifndef HAVE_OPENSSL_EVP_H
+#undef HAVE_LIBCRYPTO
+#endif
+
 #include <tcpdump-stdinc.h>
 
 #include <string.h>
@@ -1542,21 +1549,21 @@ ikev2_sa_print(netdissect_options *ndo, u_char tpay,
                u_int32_t proto _U_, int depth _U_)
 {
        struct isakmp_gen e;
-       int    osa_len, sa_len;
+       int    osa_length, sa_length;
 
        ND_TCHECK(*ext1);
        safememcpy(&e, ext1, sizeof(e));
        ikev2_pay_print(ndo, "sa", e.critical);
 
-       osa_len= ntohs(e.len);
-       sa_len = osa_len - 4;
-       ND_PRINT((ndo," len=%d", sa_len));
+       osa_length= ntohs(e.len);
+       sa_length = osa_length - 4;
+       ND_PRINT((ndo," len=%d", sa_length));
 
        ikev2_sub_print(ndo, NULL, ISAKMP_NPTYPE_P,
                        ext1+1, ep,
                        0, 0, 0, depth);
 
-       return (u_char *)ext1 + osa_len;
+       return (u_char *)ext1 + osa_length;
 trunc:
        ND_PRINT((ndo," [|%s]", NPSTR(tpay)));
        return NULL;
@@ -2214,7 +2221,7 @@ safememcpy(void *p, const void *q, size_t l)
        memcpy(p, q, l);
 }
 
-void
+static void
 ikev1_print(netdissect_options *ndo,
            const u_char *bp,  u_int length,
            const u_char *bp2, struct isakmp *base)