Lines Matching refs:tlv_length
198 u_int tlv_type, tlv_length; in ospf_print_grace_lsa() local
208 tlv_length = EXTRACT_16BITS(tptr+2); in ospf_print_grace_lsa()
215 tlv_length); in ospf_print_grace_lsa()
217 if (tlv_length > ls_length) { in ospf_print_grace_lsa()
218 printf("\n\t Bogus length %u > %u", tlv_length, in ospf_print_grace_lsa()
224 if (tlv_type == 0 || tlv_length ==0) { in ospf_print_grace_lsa()
228 TCHECK2(*tptr, tlv_length); in ospf_print_grace_lsa()
232 if (tlv_length != 4) { in ospf_print_grace_lsa()
233 printf("\n\t Bogus length %u != 4", tlv_length); in ospf_print_grace_lsa()
240 if (tlv_length != 1) { in ospf_print_grace_lsa()
241 printf("\n\t Bogus length %u != 1", tlv_length); in ospf_print_grace_lsa()
250 if (tlv_length != 4) { in ospf_print_grace_lsa()
251 printf("\n\t Bogus length %u != 4", tlv_length); in ospf_print_grace_lsa()
259 if(!print_unknown_data(tptr,"\n\t ",tlv_length)) in ospf_print_grace_lsa()
266 if (tlv_length%4 != 0) in ospf_print_grace_lsa()
267 tlv_length+=4-(tlv_length%4); in ospf_print_grace_lsa()
268 ls_length-=tlv_length; in ospf_print_grace_lsa()
269 tptr+=tlv_length; in ospf_print_grace_lsa()
280 u_int tlv_type, tlv_length, subtlv_type, subtlv_length; in ospf_print_te_lsa() local
294 tlv_length = EXTRACT_16BITS(tptr+2); in ospf_print_te_lsa()
301 tlv_length); in ospf_print_te_lsa()
303 if (tlv_length > ls_length) { in ospf_print_te_lsa()
304 printf("\n\t Bogus length %u > %u", tlv_length, in ospf_print_te_lsa()
310 if (tlv_type == 0 || tlv_length ==0) { in ospf_print_te_lsa()
316 while (tlv_length >= sizeof(subtlv_type) + sizeof(subtlv_length)) { in ospf_print_te_lsa()
317 if (tlv_length < 4) { in ospf_print_te_lsa()
319 tlv_length); in ospf_print_te_lsa()
326 tlv_length-=4; in ospf_print_te_lsa()
428 tlv_length-=subtlv_length; in ospf_print_te_lsa()
435 if (tlv_length < 4) { in ospf_print_te_lsa()
436 printf("\n\t TLV length %u < 4", tlv_length); in ospf_print_te_lsa()
445 if(!print_unknown_data(tptr,"\n\t ",tlv_length)) in ospf_print_te_lsa()
451 if (tlv_length%4 != 0) in ospf_print_te_lsa()
452 tlv_length+=4-(tlv_length%4); in ospf_print_te_lsa()
453 ls_length-=tlv_length; in ospf_print_te_lsa()
454 tptr+=tlv_length; in ospf_print_te_lsa()
567 register int j, tlv_type, tlv_length, topology; in ospf_print_lsa() local
756 tlv_length = EXTRACT_16BITS(tptr+2); in ospf_print_lsa()
763 tlv_length); in ospf_print_lsa()
765 if (tlv_length > ls_length) { in ospf_print_lsa()
766 printf("\n\t Bogus length %u > %u", tlv_length, in ospf_print_lsa()
770 TCHECK2(*tptr, tlv_length); in ospf_print_lsa()
774 if (tlv_length != 4) { in ospf_print_lsa()
775 printf("\n\t Bogus length %u != 4", tlv_length); in ospf_print_lsa()
783 if(!print_unknown_data(tptr,"\n\t ",tlv_length)) in ospf_print_lsa()
789 tptr+=tlv_length; in ospf_print_lsa()
790 ls_length-=tlv_length; in ospf_print_lsa()