diff options
author | hannes <hannes> | 2003-12-29 19:26:28 +0000 |
---|---|---|
committer | hannes <hannes> | 2003-12-29 19:26:28 +0000 |
commit | df946ca2d73de5add492cfd749df9be1603c6830 (patch) | |
tree | 6cb213cb4d4935a18c4180fafd503d4ae01a3a53 /print-cdp.c | |
parent | 69b12b33d454c54058a4b46948ce34c78c8cbebc (diff) | |
download | tcpdump-df946ca2d73de5add492cfd749df9be1603c6830.tar.gz |
bugfix length output in non-verbose mode
Diffstat (limited to 'print-cdp.c')
-rw-r--r-- | print-cdp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/print-cdp.c b/print-cdp.c index fdc62e89..b65d48eb 100644 --- a/print-cdp.c +++ b/print-cdp.c @@ -26,7 +26,7 @@ #ifndef lint static const char rcsid[] _U_ = - "@(#) $Header: /tcpdump/master/tcpdump/print-cdp.c,v 1.21 2003-11-16 09:36:15 guy Exp $"; + "@(#) $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]"); |