summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2016-10-08 18:43:22 -0700
committerGuy Harris <guy@alum.mit.edu>2016-10-08 18:43:22 -0700
commit43587bee2e4f23249bfbe51e9025b94973d77ce3 (patch)
tree3925a8302f50a9f885a1468127c4a2697e59a0cd
parent9178fd8a959af7e6e5fb3a9d4cc23c76598e721e (diff)
downloadtcpdump-43587bee2e4f23249bfbe51e9025b94973d77ce3.tar.gz
Fix some names for MPLS PW types, and use that table for LDP.
-rw-r--r--l2vpn.c4
-rw-r--r--print-ldp.c14
2 files changed, 11 insertions, 7 deletions
diff --git a/l2vpn.c b/l2vpn.c
index 156139ba..47d6a4c8 100644
--- a/l2vpn.c
+++ b/l2vpn.c
@@ -60,8 +60,8 @@ const struct tok l2vpn_encaps_values[] = {
*/
const struct tok mpls_pw_types_values[] = {
{ 0x0000, "Reserved"},
- { 0x0001, "Frame Relay"},
- { 0x0002, "ATM AAL5 VCC transport"},
+ { 0x0001, "Frame Relay DLCI (Martini Mode)"},
+ { 0x0002, "ATM AAL5 SDU VCC transport"},
{ 0x0003, "ATM transparent cell transport"},
{ 0x0004, "Ethernet VLAN"},
{ 0x0005, "Ethernet"},
diff --git a/print-ldp.c b/print-ldp.c
index 68149bba..40c9d8c2 100644
--- a/print-ldp.c
+++ b/print-ldp.c
@@ -380,16 +380,20 @@ ldp_tlv_print(netdissect_options *ndo,
break;
case LDP_FEC_MARTINI_VC:
/*
+ * We assume the type was supposed to be one of the MPLS
+ * Pseudowire Types.
+ */
+ TLV_TCHECK(7);
+ vc_info_len = *(tptr+2);
+
+ /*
* According to RFC 4908, the VC info Length field can be zero,
* in which case not only are there no interface parameters,
* there's no VC ID.
*/
- TLV_TCHECK(7);
- vc_info_len = *(tptr+2);
-
if (vc_info_len == 0) {
ND_PRINT((ndo, ": %s, %scontrol word, group-ID %u, VC-info-length: %u",
- tok2str(l2vpn_encaps_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
+ tok2str(mpls_pw_types_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
EXTRACT_16BITS(tptr)&0x8000 ? "" : "no ",
EXTRACT_32BITS(tptr+3),
vc_info_len));
@@ -399,7 +403,7 @@ ldp_tlv_print(netdissect_options *ndo,
/* Make sure we have the VC ID as well */
TLV_TCHECK(11);
ND_PRINT((ndo, ": %s, %scontrol word, group-ID %u, VC-ID %u, VC-info-length: %u",
- tok2str(l2vpn_encaps_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
+ tok2str(mpls_pw_types_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff),
EXTRACT_16BITS(tptr)&0x8000 ? "" : "no ",
EXTRACT_32BITS(tptr+3),
EXTRACT_32BITS(tptr+7),