]> The Tcpdump Group git mirrors - tcpdump/commitdiff
LDP: add support for the Typed Wildcard FEC Capability TLV as per RFC 5918
authorHannes Gredler <[email protected]>
Wed, 16 Aug 2023 09:41:32 +0000 (09:41 +0000)
committerfxlb <[email protected]>
Sat, 9 Sep 2023 06:27:30 +0000 (06:27 +0000)
print-ldp.c
tests/ldp-common-session.out

index 3792a4719268738b233d3035a8f7de4453982405..f09c5a6e84a63219372324eba55a23cd46706904 100644 (file)
@@ -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));
index a630c572f90897ad082b3bc0d9cc752725201010..7f775fd6af3049754e8302259c8d2af4efc356f5 100644 (file)
@@ -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)