]> The Tcpdump Group git mirrors - tcpdump/commit
cdp: only hex-dump unknown TLVs in verbose mode.
authorGuy Harris <[email protected]>
Mon, 10 Apr 2023 07:27:05 +0000 (00:27 -0700)
committerFrancois-Xavier Le Bail <[email protected]>
Thu, 12 Oct 2023 11:54:36 +0000 (13:54 +0200)
commit07b7c2f5698454964ff7952dcb25d4ba4ef0918d
treec18df7c03b1bbbbd1970a437cad24d0e8b933555
parent7e381d88e1d4bc0cdc196b7e0cc4360115e3a6ef
cdp: only hex-dump unknown TLVs in verbose mode.

If we're not in verbose mode, we only show the Device ID TLV, so there's
no good reason to show a hex dump of other TLVs if we don't happen to
have a printer for them - especially given that we don't show the type
value for the TLV, so it's not clear to what type value those hex bytes
correspond.  Furthermore, the hex dump causes the non-verbose output to
be multiple lines, and causes the ", length N" to show up at the end of
the hex dump rather than at the end of the first line.

I.e., it seems as if either 1) printing the hex dump in non-verbose mode
wasn't intended or 2) it was intended by whoever intended it didn't look
into what it would involve.

(cherry picked from commit 0a31117de8448684b86408fbe639aa398fe7316c)
print-cdp.c