]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-ldp.c
IP: Remove an unused and deprecated option number
[tcpdump] / print-ldp.c
index f09c5a6e84a63219372324eba55a23cd46706904..355fac9a151f319fff16723d5ecc12acff1d9260 100644 (file)
@@ -372,6 +372,23 @@ ldp_tlv_print(netdissect_options *ndo,
         }
        break;
 
+    case LDP_TLV_HOP_COUNT:
+       TLV_TCHECK(1);
+       ND_PRINT("\n\t      Hop Count: %u", GET_U_1(tptr));
+       break;
+
+    case LDP_TLV_PATH_VECTOR:
+       TLV_TCHECK(4);
+       ND_PRINT("\n\t      Path Vector: %s", GET_IPADDR_STRING(tptr));
+       tptr += 4;
+       tlv_tlen -= 4;
+       while (tlv_tlen >= 4) {
+           ND_PRINT(", %s", GET_IPADDR_STRING(tptr));
+           tptr += 4;
+           tlv_tlen -= 4;
+       }
+       break;
+
     case LDP_TLV_COMMON_SESSION:
        TLV_TCHECK(14);
        ND_PRINT("\n\t      Version: %u, Keepalive: %us, Flags: [Downstream %s, Loop Detection %s]",
@@ -537,8 +554,7 @@ ldp_tlv_print(netdissect_options *ndo,
            ND_PRINT(", causing Message ID: 0x%08x", ui);
        ui = GET_BE_U_2(tptr);
        if (ui)
-           ND_PRINT(", Message ID: %s", tok2str(ldp_msg_values, "Unknown", ui));
-
+           ND_PRINT(", Message Type: %s", tok2str(ldp_msg_values, "Unknown", ui));
        break;
 
     case LDP_TLV_FT_SESSION:
@@ -586,8 +602,6 @@ ldp_tlv_print(netdissect_options *ndo,
      *  you are welcome to contribute code ;-)
      */
 
-    case LDP_TLV_HOP_COUNT:
-    case LDP_TLV_PATH_VECTOR:
     case LDP_TLV_ATM_LABEL:
     case LDP_TLV_FR_LABEL:
     case LDP_TLV_EXTD_STATUS: