X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/79754989b11793766c0518f43aa57329f1316a72..5c77a341d4e766eef8beebaecd9e69bd2cc7b59b:/print-cdp.c diff --git a/print-cdp.c b/print-cdp.c index ae918cf2..b65d48eb 100644 --- a/print-cdp.c +++ b/print-cdp.c @@ -25,8 +25,8 @@ */ #ifndef lint -static const char rcsid[] = - "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.19 2003-01-08 12:45:26 hannes Exp $"; +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 @@ -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]");