]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-cdp.c
Fix spaces
[tcpdump] / print-cdp.c
index 1e1d66ab7902b4a17cde52c6061d5fe335209d5e..79d7046c7367c0ca41b72bf1c7ae25fe23655f35 100644 (file)
@@ -39,7 +39,6 @@
 #include "extract.h"
 #include "nlpid.h"
 
-static const char tstr[] = "[|cdp]";
 
 #define CDP_HEADER_LEN             4
 #define CDP_HEADER_VERSION_OFFSET  0
@@ -99,7 +98,7 @@ cdp_print(netdissect_options *ndo,
 
        ndo->ndo_protocol = "cdp";
        if (caplen < CDP_HEADER_LEN) {
-               ND_PRINT("%s", tstr);
+               nd_print_trunc(ndo);
                return;
        }
 
@@ -149,7 +148,7 @@ cdp_print(netdissect_options *ndo,
                        if (!ndo->ndo_vflag)
                            ND_PRINT(", Device-ID ");
                        ND_PRINT("'");
-                       (void)fn_printn(ndo, tptr, len, NULL);
+                       (void)nd_printn(ndo, tptr, len, NULL);
                        ND_PRINT("'");
                        break;
                    case 0x02: /* Address */
@@ -158,7 +157,7 @@ cdp_print(netdissect_options *ndo,
                        break;
                    case 0x03: /* Port-ID */
                        ND_PRINT("'");
-                       (void)fn_printn(ndo, tptr, len, NULL);
+                       (void)nd_printn(ndo, tptr, len, NULL);
                        ND_PRINT("'");
                        break;
                    case 0x04: /* Capabilities */
@@ -181,7 +180,7 @@ cdp_print(netdissect_options *ndo,
                        break;
                    case 0x06: /* Platform */
                        ND_PRINT("'");
-                       (void)fn_printn(ndo, tptr, len, NULL);
+                       (void)nd_printn(ndo, tptr, len, NULL);
                        ND_PRINT("'");
                        break;
                    case 0x07: /* Prefixes */
@@ -192,7 +191,7 @@ cdp_print(netdissect_options *ndo,
                        break;
                    case 0x09: /* VTP Mgmt Domain  - CDPv2 */
                        ND_PRINT("'");
-                       (void)fn_printn(ndo, tptr, len, NULL);
+                       (void)nd_printn(ndo, tptr, len, NULL);
                        ND_PRINT("'");
                        break;
                    case 0x0a: /* Native VLAN ID - CDPv2 */
@@ -251,7 +250,7 @@ cdp_print(netdissect_options *ndo,
                        break;
                    case 0x14: /* System Name - not documented */
                        ND_PRINT("'");
-                       (void)fn_printn(ndo, tptr, len, NULL);
+                       (void)nd_printn(ndo, tptr, len, NULL);
                        ND_PRINT("'");
                        break;
                    case 0x16: /* System Object ID - not documented */
@@ -264,7 +263,7 @@ cdp_print(netdissect_options *ndo,
                        ND_PRINT("0x%02x", EXTRACT_U_1(tptr));
                        if (len > 1) {
                                ND_PRINT("/");
-                               (void)fn_printn(ndo, tptr + 1, len - 1, NULL);
+                               (void)nd_printn(ndo, tptr + 1, len - 1, NULL);
                        }
                        break;
                    default:
@@ -279,7 +278,7 @@ cdp_print(netdissect_options *ndo,
 
        return;
 trunc:
-       ND_PRINT("%s", tstr);
+       nd_print_trunc(ndo);
 }
 
 /*