- tptr+=2;
- printf("\n\t Adress Family: ");
- if (af == AFNUM_INET) {
- printf("IPv4, addresses:");
- for (i=0; i<(tlv_tlen-2)/4; i++) {
+ tptr+=LDP_TLV_ADDRESS_LIST_AFNUM_LEN;
+ tlv_tlen -= LDP_TLV_ADDRESS_LIST_AFNUM_LEN;
+ printf("\n\t Address Family: %s, addresses",
+ tok2str(af_values, "Unknown (%u)", af));
+ switch (af) {
+ case AFNUM_INET:
+ while(tlv_tlen >= sizeof(struct in_addr)) {