]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-vqp.c
Avoid -E and -M options inconsistencies with no libcrypto
[tcpdump] / print-vqp.c
index b990538d4ff76fbd7a7b7bf8e0dd4684b8b4a707..dca3c1e61d2239d277012810880d9d382625120d 100644 (file)
@@ -17,9 +17,7 @@
 
 /* \summary: Cisco VLAN Query Protocol (VQP) printer */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
 #include "netdissect-stdinc.h"
 
@@ -28,7 +26,7 @@
 #include "extract.h"
 #include "addrtoname.h"
 
-#define VQP_VERSION                            1
+#define VQP_VERSION 1
 
 /*
  * VQP common header
@@ -132,7 +130,7 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
         ND_PRINT("VQPv%u %s Message, error-code %s (%u), length %u",
                version,
                tok2str(vqp_msg_type_values, "unknown (%u)",GET_U_1(vqp_common_header->msg_type)),
-               tok2str(vqp_error_code_values, "unknown (%u)",GET_U_1(vqp_common_header->error_code)),
+               tok2str(vqp_error_code_values, "unknown", GET_U_1(vqp_common_header->error_code)),
                GET_U_1(vqp_common_header->error_code),
                len);
         return;
@@ -143,7 +141,7 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
     ND_PRINT("\n\tVQPv%u, %s Message, error-code %s (%u), seq 0x%08x, items %u, length %u",
            version,
           tok2str(vqp_msg_type_values, "unknown (%u)",GET_U_1(vqp_common_header->msg_type)),
-          tok2str(vqp_error_code_values, "unknown (%u)",GET_U_1(vqp_common_header->error_code)),
+          tok2str(vqp_error_code_values, "unknown", GET_U_1(vqp_common_header->error_code)),
           GET_U_1(vqp_common_header->error_code),
           GET_BE_U_4(vqp_common_header->sequence),
           nitems,
@@ -190,14 +188,14 @@ vqp_print(netdissect_options *ndo, const u_char *pptr, u_int len)
        case VQP_OBJ_VLAN_NAME:
        case VQP_OBJ_VTP_DOMAIN:
        case VQP_OBJ_ETHERNET_PKT:
-            (void)nd_printzp(ndo, tptr, vqp_obj_len, NULL);
+            nd_printjnp(ndo, tptr, vqp_obj_len);
             break;
             /* those objects have similar semantics - fall through */
        case VQP_OBJ_MAC_ADDRESS:
        case VQP_OBJ_MAC_NULL:
-            if (vqp_obj_len != MAC_ADDR_LEN)
+            if (vqp_obj_len != MAC48_LEN)
                 goto invalid;
-             ND_PRINT("%s", GET_ETHERADDR_STRING(tptr));
+             ND_PRINT("%s", GET_MAC48_STRING(tptr));
               break;
         default:
             if (ndo->ndo_vflag <= 1)