+ EXTRACT_32BITS(tptr+3),
+ EXTRACT_32BITS(tptr+7),
+ vc_info_len);
+
+ if (vc_info_len == 0) /* infinite loop protection */
+ break;
+
+ tptr+=11;
+ if (!TTEST2(*tptr, vc_info_len))
+ goto trunc;
+
+ while (vc_info_len > 2) {
+ vc_info_tlv_type = *tptr;
+ vc_info_tlv_len = *(tptr+1);
+ if (vc_info_tlv_len < 2)
+ break;
+ if (vc_info_len < vc_info_tlv_len)
+ break;
+
+ printf("\n\t\tInterface Parameter: %s (0x%02x), len %u",
+ tok2str(ldp_fec_martini_ifparm_values,"Unknown",vc_info_tlv_type),
+ vc_info_tlv_type,
+ vc_info_tlv_len);
+
+ switch(vc_info_tlv_type) {
+ case LDP_FEC_MARTINI_IFPARM_MTU:
+ printf(": %u",EXTRACT_16BITS(tptr+2));
+ break;
+
+ case LDP_FEC_MARTINI_IFPARM_DESC:
+ printf(": ");
+ for (idx = 2; idx < vc_info_tlv_len; idx++)
+ safeputchar(*(tptr+idx));
+ break;
+
+ case LDP_FEC_MARTINI_IFPARM_VCCV:
+ printf("\n\t\t Control Channels (0x%02x) = [%s]",
+ *(tptr+2),
+ bittok2str(ldp_fec_martini_ifparm_vccv_cc_values,"none",*(tptr+2)));
+ printf("\n\t\t CV Types (0x%02x) = [%s]",
+ *(tptr+3),
+ bittok2str(ldp_fec_martini_ifparm_vccv_cv_values,"none",*(tptr+3)));
+ break;
+
+ default:
+ print_unknown_data(tptr+2,"\n\t\t ",vc_info_tlv_len-2);
+ break;
+ }
+
+ vc_info_len -= vc_info_tlv_len;
+ tptr += vc_info_tlv_len;
+ }