X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/3824a6c0417a551961d1a1bf4f94f10eff736afc..5c77a341d4e766eef8beebaecd9e69bd2cc7b59b:/print-cdp.c diff --git a/print-cdp.c b/print-cdp.c index 2e605fd3..b65d48eb 100644 --- a/print-cdp.c +++ b/print-cdp.c @@ -24,6 +24,10 @@ * http://www.cisco.com/univercd/cc/td/doc/product/lan/trsrb/frames.htm */ +#ifndef lint +static const char rcsid[] _U_ = + "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.22 2003-12-29 19:26:28 hannes Exp $"; +#endif #ifdef HAVE_CONFIG_H #include "config.h" @@ -38,10 +42,6 @@ #include "addrtoname.h" #include "extract.h" /* must come after interface.h */ -#ifndef lint -static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.20 2003-11-15 00:39:17 guy Exp $"; -#endif #define CDP_HEADER_LEN 4 static struct tok cdp_tlv_values[] = { @@ -99,9 +99,9 @@ cdp_print(const u_char *pptr, u_int length, u_int caplen) if (!TTEST2(*tptr, CDP_HEADER_LEN)) goto trunc; - printf("CDP v%u, ttl: %us", *tptr, *(tptr+1)); + printf("CDPv%u, ttl: %us", *tptr, *(tptr+1)); if (vflag) - printf(", checksum: %u (unverified)", EXTRACT_16BITS(tptr)); + printf(", checksum: %u (unverified), length %u", EXTRACT_16BITS(tptr), length); tptr += CDP_HEADER_LEN; while (tptr < (pptr+length)) { @@ -213,6 +213,9 @@ cdp_print(const u_char *pptr, u_int length, u_int caplen) break; tptr = tptr+len; } + if (vflag < 1) + printf(", length %u",caplen); + return; trunc: printf("[|cdp]");