X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/3018f3698b1463d4577ea8b412f079f4381b7605..f67e46a634dd3bdcefa9fc09dbef6baae1b1d1ed:/print-ldp.c diff --git a/print-ldp.c b/print-ldp.c index 452b5f1f..1ee453b2 100644 --- a/print-ldp.c +++ b/print-ldp.c @@ -16,9 +16,7 @@ /* \summary: Label Distribution Protocol (LDP) printer */ -#ifdef HAVE_CONFIG_H #include -#endif #include "netdissect-stdinc.h" @@ -328,11 +326,17 @@ ldp_tlv_print(netdissect_options *ndo, break; case LDP_TLV_COMMON_SESSION: - TLV_TCHECK(8); + TLV_TCHECK(14); ND_PRINT("\n\t Version: %u, Keepalive: %us, Flags: [Downstream %s, Loop Detection %s]", GET_BE_U_2(tptr), GET_BE_U_2(tptr + 2), - (GET_BE_U_2(tptr + 6)&0x8000) ? "On Demand" : "Unsolicited", - (GET_BE_U_2(tptr + 6)&0x4000) ? "Enabled" : "Disabled" + (GET_BE_U_2(tptr + 4)&0x8000) ? "On Demand" : "Unsolicited", + (GET_BE_U_2(tptr + 4)&0x4000) ? "Enabled" : "Disabled" + ); + ND_PRINT("\n\t Path Vector Limit %u, Max-PDU length: %u, Receiver Label-Space-ID %s:%u", + GET_U_1(tptr+5), + GET_BE_U_2(tptr+6), + GET_IPADDR_STRING(tptr+8), + GET_BE_U_2(tptr+12) ); break;