+ flags1&0x08 ? "SecondaryLSP ":"",
+ link_flags&0x01 ? "ExtraTraffic ":"",
+ link_flags&0x02 ? "Unprotected ":"",
+ link_flags&0x04 ? "Shared ":"",
+ link_flags&0x08 ? "Dedicated1:1 ":"",
+ link_flags&0x10 ? "Dedicated1+1 ":"",
+ link_flags&0x20 ? "Enhanced ":"");
+ break;
+
+ case 2: /* RFC4872 */
+ proto_tree_add_text(rsvp_object_tree, tvb, offset+3, 1,
+ "C-type:2");
+ flags1 = tvb_get_guint8(tvb, offset2);
+ flags1 >>= 4;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
+ "Secondary LSP: %s",
+ decode_boolean_bitfield(flags1, 0x08, 4, "Yes", "No"));
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
+ "Protecting LSP: %s",
+ decode_boolean_bitfield(flags1, 0x04, 4, "Yes", "No"));
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
+ "Notification msg: %s",
+ decode_boolean_bitfield(flags1, 0x02, 4, "Yes", "No"));
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2, 1,
+ "Operational LSP: %s",
+ decode_boolean_bitfield(flags1, 0x01, 4, "Yes", "No"));
+
+ lsp_flags = tvb_get_guint8(tvb, offset2+1);
+ ti3 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+1, 1,
+ "LSP Flags: 0x%02x -%s%s%s%s%s%s", lsp_flags,
+ lsp_flags == 0 ? " Unprotected":"",
+ lsp_flags&0x01 ? " Rerouting":"",
+ lsp_flags&0x02 ? " Rerouting with extra-traffic":"",
+ lsp_flags&0x04 ? " 1:N Protection with extra-traffic":"",
+ lsp_flags&0x08 ? " 1+1 Unidirectional protection":"",
+ lsp_flags&0x10 ? " 1+1 Bidirectional protection":"");
+ rsvp_pi_lsp_flags_tree = proto_item_add_subtree(ti3, TREE(TT_PROTECTION_INFO_LSP));
+ proto_tree_add_text(rsvp_pi_lsp_flags_tree, tvb, offset2+1, 1, "%s",
+ decode_boolean_bitfield(lsp_flags, 0x01, 6,
+ "(Full) rerouting desired",
+ "(Full) rerouting NOT desired"));
+ proto_tree_add_text(rsvp_pi_lsp_flags_tree, tvb, offset2+1, 1, "%s",
+ decode_boolean_bitfield(lsp_flags, 0x02, 6,
+ "Rerouting without extra-traffic desired",
+ "Rerouting without extra-traffic NOT desired"));
+ proto_tree_add_text(rsvp_pi_lsp_flags_tree, tvb, offset2+1, 1, "%s",
+ decode_boolean_bitfield(lsp_flags, 0x04, 6,
+ "1:N protection with extra-traffic desired",
+ "1:N protection with extra-traffic NOT desired"));
+ proto_tree_add_text(rsvp_pi_lsp_flags_tree, tvb, offset2+1, 1, "%s",
+ decode_boolean_bitfield(lsp_flags, 0x08, 6,
+ "1+1 unidirectional protection desired",
+ "1+1 unidirectional protection NOT desired"));
+ proto_tree_add_text(rsvp_pi_lsp_flags_tree, tvb, offset2+1, 1, "%s",
+ decode_boolean_bitfield(lsp_flags, 0x10, 6,
+ "1+1 bidirectional protection desired",
+ "1+1 bidirectional protection NOT desired"));
+
+ link_flags = tvb_get_guint8(tvb, offset2+3);
+ ti2 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+3, 1,
+ "Link Flags: 0x%02x -%s%s%s%s%s%s", link_flags,
+ link_flags&0x01 ? " ExtraTraffic":"",
+ link_flags&0x02 ? " Unprotected":"",
+ link_flags&0x04 ? " Shared":"",
+ link_flags&0x08 ? " Dedicated1:1":"",
+ link_flags&0x10 ? " Dedicated1+1":"",
+ link_flags&0x20 ? " Enhanced":"");
+ rsvp_pi_link_flags_tree = proto_item_add_subtree(ti2,
+ TREE(TT_PROTECTION_INFO_LINK));
+ proto_tree_add_text(rsvp_pi_link_flags_tree, tvb, offset2+3, 1, "%s",
+ decode_boolean_bitfield(link_flags, 0x01, 8,
+ "Extra Traffic desired",
+ "Extra Traffic NOT desired"));
+ proto_tree_add_text(rsvp_pi_link_flags_tree, tvb, offset2+3, 1, "%s",
+ decode_boolean_bitfield(link_flags, 0x02, 8,
+ "Unprotected desired",
+ "Unprotected NOT desired"));
+ proto_tree_add_text(rsvp_pi_link_flags_tree, tvb, offset2+3, 1, "%s",
+ decode_boolean_bitfield(link_flags, 0x04, 8,
+ "Shared desired",
+ "Shared NOT desired"));
+ proto_tree_add_text(rsvp_pi_link_flags_tree, tvb, offset2+3, 1, "%s",
+ decode_boolean_bitfield(link_flags, 0x08, 8,
+ "Dedicated 1:1 desired",
+ "Dedicated 1:1 NOT desired"));
+ proto_tree_add_text(rsvp_pi_link_flags_tree, tvb, offset2+3, 1, "%s",
+ decode_boolean_bitfield(link_flags, 0x10, 8,
+ "Dedicated 1+1 desired",
+ "Dedicated 1+1 NOT desired"));
+ proto_tree_add_text(rsvp_pi_link_flags_tree, tvb, offset2+3, 1, "%s",
+ decode_boolean_bitfield(link_flags, 0x20, 8,
+ "Enhanced desired",
+ "Enhanced NOT desired"));
+
+ flags2 = tvb_get_guint8(tvb, offset2+4);
+ flags2 >>= 6;
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 1,
+ "In-Place: %s",
+ decode_boolean_bitfield(flags2, 0x02, 2, "Yes", "No"));
+ proto_tree_add_text(rsvp_object_tree, tvb, offset2+4, 1,
+ "Required: %s",
+ decode_boolean_bitfield(flags2, 0x01, 2, "Yes", "No"));
+
+ seg_flags = tvb_get_guint8(tvb, offset2+5);
+ ti4 = proto_tree_add_text(rsvp_object_tree, tvb, offset2+5, 1,
+ "Segment recovery Flags: 0x%02x - %s%s%s%s%s%s", seg_flags,
+ seg_flags == 0 ? " Unprotected":"",
+ seg_flags&0x01 ? " Rerouting":"",
+ seg_flags&0x02 ? " Rerouting with extra-traffic":"",
+ seg_flags&0x04 ? " 1:N Protection with extra-traffic":"",
+ seg_flags&0x08 ? " 1+1 Unidirectional protection":"",
+ seg_flags&0x10 ? " 1+1 Bidirectional protection":"");
+ rsvp_pi_seg_flags_tree = proto_item_add_subtree(ti4, TREE(TT_PROTECTION_INFO_SEG));
+ proto_tree_add_text(rsvp_pi_seg_flags_tree, tvb, offset2+5, 1, "%s",
+ decode_boolean_bitfield(seg_flags, 0x01, 6,
+ "(Full) rerouting desired",
+ "(Full) rerouting NOT desired"));
+ proto_tree_add_text(rsvp_pi_seg_flags_tree, tvb, offset2+5, 1, "%s",
+ decode_boolean_bitfield(seg_flags, 0x02, 6,
+ "Rerouting without extra-traffic desired",
+ "Rerouting without extra-traffic NOT desired"));
+ proto_tree_add_text(rsvp_pi_seg_flags_tree, tvb, offset2+5, 1, "%s",
+ decode_boolean_bitfield(seg_flags, 0x04, 6,
+ "1:N protection with extra-traffic desired",
+ "1:N protection with extra-traffic NOT desired"));
+ proto_tree_add_text(rsvp_pi_seg_flags_tree, tvb, offset2+5, 1, "%s",
+ decode_boolean_bitfield(seg_flags, 0x08, 6,
+ "1+1 unidirectional protection desired",
+ "1+1 unidirectional protection NOT desired"));
+ proto_tree_add_text(rsvp_pi_seg_flags_tree, tvb, offset2+5, 1, "%s",
+ decode_boolean_bitfield(seg_flags, 0x10, 6,
+ "1+1 bidirectional protection desired",
+ "1+1 bidirectional protection NOT desired"));
+
+ proto_item_append_text(ti, "%s%s%s%s Link:%s%s%s%s%s%s, LSP:%s%s%s%s%s%s.",
+ flags1&0x08 ? "SecondaryLSP ":"",
+ flags1&0x04 ? "ProtectingLSP ":"",
+ flags1&0x02 ? "Notification ":"",
+ flags1&0x01 ? "OperationalLSP ":"",
+ link_flags&0x01 ? " ExtraTraffic":"",
+ link_flags&0x02 ? " Unprotected":"",
+ link_flags&0x04 ? " Shared":"",
+ link_flags&0x08 ? " Dedicated1:1":"",
+ link_flags&0x10 ? " Dedicated1+1":"",
+ link_flags&0x20 ? " Enhanced":"",
+ lsp_flags == 0 ? " Unprotected":"",
+ lsp_flags&0x01 ? " Rerouting":"",
+ lsp_flags&0x02 ? " Rerouting with extra-traffic":"",
+ lsp_flags&0x04 ? " 1:N Protection with extra-traffic":"",
+ lsp_flags&0x08 ? " 1+1 Unidirectional protection":"",
+ lsp_flags&0x10 ? " 1+1 Bidirectional protection":"");