]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-vqp.c
CARP: NDOize
[tcpdump] / print-vqp.c
index 1a4ca39caa2e712cbd16f2afefccc39d430476e8..8935545919056399ac4f41db4b4f69c75868a89f 100644 (file)
  * LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  * FOR A PARTICULAR PURPOSE.
  *
- * support for the Cisco prop. VQP Protocol 
+ * support for the Cisco prop. VQP Protocol
  *
  * Original code by Carles Kishimoto <[email protected]>
  */
 
-#ifndef lint
-static const char rcsid[] _U_ =
-    "@(#) $Header: /tcpdump/master/tcpdump/print-vqp.c,v 1.2 2006-03-08 14:30:12 hannes Exp $";
-#endif
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -106,7 +101,7 @@ static const struct tok vqp_obj_values[] = {
 };
 
 void
-vqp_print(register const u_char *pptr, register u_int len) 
+vqp_print(register const u_char *pptr, register u_int len)
 {
     const struct vqp_common_header_t *vqp_common_header;
     const struct vqp_obj_tlv_t *vqp_obj_tlv;
@@ -141,7 +136,7 @@ vqp_print(register const u_char *pptr, register u_int len)
                len);
         return;
     }
-    
+
     /* ok they seem to want to know everything - lets fully decode it */
     nitems = vqp_common_header->nitems;
     printf("\n\tVQPv%u, %s Message, error-code %s (%u), seq 0x%08x, items %u, length %u",
@@ -175,7 +170,7 @@ vqp_print(register const u_char *pptr, register u_int len)
         }
 
         /* did we capture enough for fully decoding the object ? */
-        if (!TTEST2(*tptr, vqp_obj_len)) 
+        if (!TTEST2(*tptr, vqp_obj_len))
             goto trunc;
 
         switch(vqp_obj_type) {
@@ -187,7 +182,7 @@ vqp_print(register const u_char *pptr, register u_int len)
        case VQP_OBJ_VLAN_NAME:
        case VQP_OBJ_VTP_DOMAIN:
        case VQP_OBJ_ETHERNET_PKT:
-            safeputs(tptr, vqp_obj_len);
+            safeputs((const char *)tptr, vqp_obj_len);
             break;
             /* those objects have similar semantics - fall through */
        case VQP_OBJ_MAC_ADDRESS:
@@ -196,7 +191,7 @@ vqp_print(register const u_char *pptr, register u_int len)
               break;
         default:
             if (vflag <= 1)
-                print_unknown_data(tptr, "\n\t    ", vqp_obj_len);
+                print_unknown_data(gndo,tptr, "\n\t    ", vqp_obj_len);
             break;
         }
        tptr += vqp_obj_len;