aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2004-09-22 16:28:39 +0000
committerGuy Harris <guy@alum.mit.edu>2004-09-22 16:28:39 +0000
commitf7114879611a673db763a2ee9782572a79cb0b86 (patch)
tree2268d001164e78af5da762ea38ce505b045e1ed3
parent01f8ed1c48c880e5b214ea6b4f261d315dfb4510 (diff)
From Carlos Pignataro:
append MPLS fields and values to the MPLS Header subtree; correct the string displayed for MPLS Label; don't show non-reserved MPLS label values as "Unknown". svn path=/trunk/; revision=12065
-rw-r--r--epan/dissectors/packet-mpls.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/epan/dissectors/packet-mpls.c b/epan/dissectors/packet-mpls.c
index fcbd63c895..72f1fb6c66 100644
--- a/epan/dissectors/packet-mpls.c
+++ b/epan/dissectors/packet-mpls.c
@@ -216,19 +216,25 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (label <= MAX_RESERVED)
proto_tree_add_uint_format(mpls_tree, mpls_filter[MPLSF_LABEL], tvb,
- offset, 3, label, "Label: %u (%s)",
+ offset, 3, label, "MPLS Label: %u (%s)",
label, val_to_str(label, special_labels,
"Reserved - Unknown"));
else
- proto_tree_add_uint(mpls_tree, mpls_filter[MPLSF_LABEL], tvb,
- offset, 3, label);
+ proto_tree_add_uint_format(mpls_tree, mpls_filter[MPLSF_LABEL], tvb,
+ offset, 3, label, "MPLS Label: %u", label);
+ proto_item_append_text(ti, ", Label: %u", label);
proto_tree_add_uint(mpls_tree,mpls_filter[MPLSF_EXP], tvb,
offset+2,1, exp);
+ proto_item_append_text(ti, ", Exp: %u", exp);
+
proto_tree_add_uint(mpls_tree,mpls_filter[MPLSF_BOTTOM_OF_STACK], tvb,
offset+2,1, bos);
+ proto_item_append_text(ti, ", S: %u", bos);
+
proto_tree_add_uint(mpls_tree,mpls_filter[MPLSF_TTL], tvb,
offset+3,1, ttl);
+ proto_item_append_text(ti, ", TTL: %u", ttl);
}
offset += 4;
if (bos) break;