Lines Matching refs:tptr
242 TCHECK2(*tptr, minlen); if (tlv_tlen < minlen) goto badtlv;
245 ldp_tlv_print(register const u_char *tptr) { in ldp_tlv_print() argument
259 ldp_tlv_header = (const struct ldp_tlv_header *)tptr; in ldp_tlv_print()
274 tptr+=sizeof(struct ldp_tlv_header); in ldp_tlv_print()
281 EXTRACT_16BITS(tptr), in ldp_tlv_print()
282 (EXTRACT_16BITS(tptr+2)&0x8000) ? "Targeted" : "Link", in ldp_tlv_print()
283 (EXTRACT_16BITS(tptr+2)&0x4000) ? ", Request for targeted Hellos" : ""); in ldp_tlv_print()
288 printf("\n\t IPv4 Transport Address: %s", ipaddr_string(tptr)); in ldp_tlv_print()
293 printf("\n\t IPv6 Transport Address: %s", ip6addr_string(tptr)); in ldp_tlv_print()
298 printf("\n\t Sequence Number: %u", EXTRACT_32BITS(tptr)); in ldp_tlv_print()
303 af = EXTRACT_16BITS(tptr); in ldp_tlv_print()
304 tptr+=LDP_TLV_ADDRESS_LIST_AFNUM_LEN; in ldp_tlv_print()
311 TCHECK2(*tptr, sizeof(struct in_addr)); in ldp_tlv_print()
312 printf(" %s",ipaddr_string(tptr)); in ldp_tlv_print()
314 tptr+=sizeof(struct in_addr); in ldp_tlv_print()
320 TCHECK2(*tptr, sizeof(struct in6_addr)); in ldp_tlv_print()
321 printf(" %s",ip6addr_string(tptr)); in ldp_tlv_print()
323 tptr+=sizeof(struct in6_addr); in ldp_tlv_print()
336 EXTRACT_16BITS(tptr), EXTRACT_16BITS(tptr+2), in ldp_tlv_print()
337 (EXTRACT_16BITS(tptr+6)&0x8000) ? "On Demand" : "Unsolicited", in ldp_tlv_print()
338 (EXTRACT_16BITS(tptr+6)&0x4000) ? "Enabled" : "Disabled" in ldp_tlv_print()
344 fec_type = *tptr; in ldp_tlv_print()
349 tptr+=1; in ldp_tlv_print()
357 af = EXTRACT_16BITS(tptr); in ldp_tlv_print()
358 tptr+=LDP_TLV_ADDRESS_LIST_AFNUM_LEN; in ldp_tlv_print()
361 i=decode_prefix4(tptr,tlv_tlen,buf,sizeof(buf)); in ldp_tlv_print()
373 i=decode_prefix6(tptr,tlv_tlen,buf,sizeof(buf)); in ldp_tlv_print()
396 vc_info_len = *(tptr+2); in ldp_tlv_print()
400 tok2str(l2vpn_encaps_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff), in ldp_tlv_print()
401 EXTRACT_16BITS(tptr)&0x8000 ? "" : "no ", in ldp_tlv_print()
402 EXTRACT_32BITS(tptr+3), in ldp_tlv_print()
410 tok2str(l2vpn_encaps_values, "Unknown", EXTRACT_16BITS(tptr)&0x7fff), in ldp_tlv_print()
411 EXTRACT_16BITS(tptr)&0x8000 ? "" : "no ", in ldp_tlv_print()
412 EXTRACT_32BITS(tptr+3), in ldp_tlv_print()
413 EXTRACT_32BITS(tptr+7), in ldp_tlv_print()
420 tptr+=11; in ldp_tlv_print()
425 vc_info_tlv_type = *tptr; in ldp_tlv_print()
426 vc_info_tlv_len = *(tptr+1); in ldp_tlv_print()
439 printf(": %u",EXTRACT_16BITS(tptr+2)); in ldp_tlv_print()
445 safeputchar(*(tptr+idx)); in ldp_tlv_print()
450 *(tptr+2), in ldp_tlv_print()
451 bittok2str(ldp_fec_martini_ifparm_vccv_cc_values,"none",*(tptr+2))); in ldp_tlv_print()
453 *(tptr+3), in ldp_tlv_print()
454 bittok2str(ldp_fec_martini_ifparm_vccv_cv_values,"none",*(tptr+3))); in ldp_tlv_print()
458 print_unknown_data(tptr+2,"\n\t\t ",vc_info_tlv_len-2); in ldp_tlv_print()
463 tptr += vc_info_tlv_len; in ldp_tlv_print()
472 printf("\n\t Label: %u", EXTRACT_32BITS(tptr) & 0xfffff); in ldp_tlv_print()
477 ui = EXTRACT_32BITS(tptr); in ldp_tlv_print()
478 tptr+=4; in ldp_tlv_print()
483 ui = EXTRACT_32BITS(tptr); in ldp_tlv_print()
484 tptr+=4; in ldp_tlv_print()
491 ft_flags = EXTRACT_16BITS(tptr); in ldp_tlv_print()
498 tptr+=4; in ldp_tlv_print()
499 ui = EXTRACT_32BITS(tptr); in ldp_tlv_print()
502 tptr+=4; in ldp_tlv_print()
503 ui = EXTRACT_32BITS(tptr); in ldp_tlv_print()
510 printf("\n\t MTU: %u", EXTRACT_16BITS(tptr)); in ldp_tlv_print()
532 print_unknown_data(tptr,"\n\t ",tlv_tlen); in ldp_tlv_print()
565 const u_char *tptr,*msg_tptr; in ldp_msg_print() local
570 tptr=pptr; in ldp_msg_print()
599 tptr += sizeof(const struct ldp_common_header); in ldp_msg_print()
604 TCHECK2(*tptr, sizeof(struct ldp_msg_header)); in ldp_msg_print()
606 ldp_msg_header = (const struct ldp_msg_header *)tptr; in ldp_msg_print()
623 msg_tptr=tptr+sizeof(struct ldp_msg_header); in ldp_msg_print()
627 TCHECK2(*tptr, msg_len); in ldp_msg_print()
665 print_unknown_data(tptr+sizeof(struct ldp_msg_header),"\n\t ", in ldp_msg_print()
668 tptr += msg_len+4; in ldp_msg_print()