forked from osmocom/wireshark
From Carlos Pignataro: append the symbolic name for reserved MPLS labels
to the protocol tree item for the label. svn path=/trunk/; revision=12080
This commit is contained in:
parent
360f2d306a
commit
1699af0a7c
|
@ -214,15 +214,18 @@ dissect_mpls(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
ti = proto_tree_add_item(tree, proto_mpls, tvb, offset, 4, FALSE);
|
||||
mpls_tree = proto_item_add_subtree(ti, ett_mpls);
|
||||
|
||||
if (label <= MAX_RESERVED)
|
||||
proto_item_append_text(ti, ", Label: %u", label);
|
||||
if (label <= MAX_RESERVED){
|
||||
proto_tree_add_uint_format(mpls_tree, mpls_filter[MPLSF_LABEL], tvb,
|
||||
offset, 3, label, "MPLS Label: %u (%s)",
|
||||
label, val_to_str(label, special_labels,
|
||||
"Reserved - Unknown"));
|
||||
else
|
||||
proto_item_append_text(ti, " (%s)", val_to_str(label, special_labels,
|
||||
"Reserved - Unknown"));
|
||||
} else {
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue