Lines Matching refs:tlv
392 #define TLV_RDAT_LEN(tlv) ((int)(EXTRACT_16BITS(&(tlv)->length) - TLV_SET_LEN(0)) argument
394 #define GO_NXT_TLV(tlv,rlen) ((rlen) -= F_ALN_LEN(EXTRACT_16BITS(&(tlv)->length)), \ argument
395 (const struct forces_tlv*)(((const char*)(tlv)) \
396 + F_ALN_LEN(EXTRACT_16BITS(&(tlv)->length))))
417 static inline u_int tlv_valid(const struct forces_tlv *tlv, u_int rlen) in tlv_valid() argument
421 if (EXTRACT_16BITS(&tlv->length) < TLV_HDRL) in tlv_valid()
423 if (EXTRACT_16BITS(&tlv->length) > rlen) in tlv_valid()
425 if (rlen < F_ALN_LEN(EXTRACT_16BITS(&tlv->length))) in tlv_valid()
649 const struct forces_tlv *tlv = (const struct forces_tlv *)pptr; in prestlv_print() local
650 register const u_char *tdp = (const u_char *) TLV_DATA(tlv); in prestlv_print()
687 const struct forces_tlv *tlv = (const struct forces_tlv *)pptr; in fdatatlv_print() local
689 register const u_char *tdp = (const u_char *) TLV_DATA(tlv); in fdatatlv_print()
697 ND_TCHECK(*tlv); in fdatatlv_print()
698 type = EXTRACT_16BITS(&tlv->type); in fdatatlv_print()
768 const struct forces_tlv *tlv = (const struct forces_tlv *)pptr; in sdatatlv_print() local
770 register const u_char *tdp = (const u_char *) TLV_DATA(tlv); in sdatatlv_print()
778 ND_TCHECK(*tlv); in sdatatlv_print()
779 type = EXTRACT_16BITS(&tlv->type); in sdatatlv_print()
797 const struct forces_tlv *tlv = (const struct forces_tlv *)pptr; in pkeyitlv_print() local
798 register const u_char *tdp = (const u_char *) TLV_DATA(tlv); in pkeyitlv_print()
1442 const struct forces_tlv *tlv = (const struct forces_tlv *)pptr; in redirect_print() local
1461 ND_TCHECK(*tlv); in redirect_print()
1462 invtlv = tlv_valid(tlv, rlen); in redirect_print()
1473 if (EXTRACT_16BITS(&tlv->type) == F_TLV_METD) { in redirect_print()
1474 print_metatlv(ndo, (const u_char *) TLV_DATA(tlv), in redirect_print()
1475 EXTRACT_16BITS(&tlv->length), 0, indent); in redirect_print()
1476 } else if ((EXTRACT_16BITS(&tlv->type) == F_TLV_REDD)) { in redirect_print()
1477 print_reddata(ndo, (const u_char *) TLV_DATA(tlv), in redirect_print()
1478 EXTRACT_16BITS(&tlv->length), 0, indent); in redirect_print()
1481 EXTRACT_16BITS(&tlv->type), in redirect_print()
1482 EXTRACT_16BITS(&tlv->length))); in redirect_print()
1485 tlv = GO_NXT_TLV(tlv, rlen); in redirect_print()
1491 EXTRACT_16BITS(&tlv->type), in redirect_print()
1492 rlen - EXTRACT_16BITS(&tlv->length))); in redirect_print()