From: Hannes Gredler Date: Wed, 16 Aug 2023 09:41:32 +0000 (+0000) Subject: LDP: add support for the Typed Wildcard FEC Capability TLV as per RFC 5918 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/7cb9c24ee8cc90c9116c9af4de9ce27705bfb8e0?ds=inline LDP: add support for the Typed Wildcard FEC Capability TLV as per RFC 5918 --- diff --git a/print-ldp.c b/print-ldp.c index 3792a471..f09c5a6e 100644 --- a/print-ldp.c +++ b/print-ldp.c @@ -142,6 +142,7 @@ static const struct tok ldp_msg_values[] = { #define LDP_TLV_ATM_SESSION_PARM 0x0501 #define LDP_TLV_FR_SESSION_PARM 0x0502 #define LDP_TLV_FT_SESSION 0x0503 +#define LDP_TLV_TYPED_WC_FEC_CAP 0x050b /* rfc 5918 */ #define LDP_TLV_LABEL_REQUEST_MSG_ID 0x0600 #define LDP_TLV_MTU 0x0601 /* rfc 3988 */ #define LDP_TLV_DUAL_STACK_CAP 0x0701 /* rfc 7552 */ @@ -166,6 +167,7 @@ static const struct tok ldp_tlv_values[] = { { LDP_TLV_ATM_SESSION_PARM, "ATM Session Parameters" }, { LDP_TLV_FR_SESSION_PARM, "Frame-Relay Session Parameters" }, { LDP_TLV_FT_SESSION, "Fault-Tolerant Session Parameters" }, + { LDP_TLV_TYPED_WC_FEC_CAP, "Typed Wildcard FEC Capability" }, { LDP_TLV_LABEL_REQUEST_MSG_ID, "Label Request Message ID" }, { LDP_TLV_MTU, "MTU" }, { LDP_TLV_DUAL_STACK_CAP, "Dual-Stack Capability" }, @@ -559,6 +561,11 @@ ldp_tlv_print(netdissect_options *ndo, ND_PRINT(", Recovery Time: %ums", ui); break; + case LDP_TLV_TYPED_WC_FEC_CAP: + TLV_TCHECK(1); + ND_PRINT("\n\t %s", GET_U_1(tptr)&0x80 ? "Support" : "No Support"); + break; + case LDP_TLV_MTU: TLV_TCHECK(2); ND_PRINT("\n\t MTU: %u", GET_BE_U_2(tptr)); diff --git a/tests/ldp-common-session.out b/tests/ldp-common-session.out index a630c572..7f775fd6 100644 --- a/tests/ldp-common-session.out +++ b/tests/ldp-common-session.out @@ -55,8 +55,8 @@ Common Session Parameters TLV (0x0500), length: 14, Flags: [ignore and don't forward if unknown] Version: 1, Keepalive: 30s, Flags: [Downstream Unsolicited, Loop Detection Enabled] Path Vector Limit 32, Max-PDU length: 0, Receiver Label-Space-ID 192.168.0.1:0 - Unknown TLV (0x050b), length: 1, Flags: [continue processing and don't forward if unknown] - 0x0000: 80 + Typed Wildcard FEC Capability TLV (0x050b), length: 1, Flags: [continue processing and don't forward if unknown] + Support 9 12:24:11.052281 IP (tos 0xc0, ttl 255, id 1507, offset 0, flags [none], proto TCP (6), length 58) 192.168.0.2.58321 > 192.168.0.1.646: Flags [P.], cksum 0x73a6 (correct), seq 41:59, ack 60, win 3023, length 18 10 12:24:11.103231 IP (tos 0xc0, ttl 255, id 1508, offset 0, flags [none], proto TCP (6), length 387)