+ case LSPPING_TLV_DOWNSTREAM_MAPPING:
+ /* that strange thing with the downstream map TLV is that until now
+ * we do not know if its IPv4 or IPv6 , after we found the adress-type
+ * lets recast the tlv_tptr and move on */
+
+ tlv_ptr.lspping_tlv_downstream_map_ipv4= \
+ (const struct lspping_tlv_downstream_map_ipv4_t *)tlv_tptr;
+ tlv_ptr.lspping_tlv_downstream_map_ipv6= \
+ (const struct lspping_tlv_downstream_map_ipv6_t *)tlv_tptr;
+ printf("\n\t MTU: %u, Address-Type: %s (%u)",
+ EXTRACT_16BITS(tlv_ptr.lspping_tlv_downstream_map_ipv4->mtu),
+ tok2str(lspping_tlv_downstream_addr_values,
+ "unknown",
+ tlv_ptr.lspping_tlv_downstream_map_ipv4->address_type),
+ tlv_ptr.lspping_tlv_downstream_map_ipv4->address_type);
+
+ switch(tlv_ptr.lspping_tlv_downstream_map_ipv4->address_type) {
+
+ case LSPPING_AFI_IPV4:
+ printf("\n\t Downstream IP: %s" \
+ "\n\t Downstream Interface IP: %s",
+ ipaddr_string(tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_ip),
+ ipaddr_string(tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_interface));
+ tlv_tptr+=sizeof(struct lspping_tlv_downstream_map_ipv4_t);
+ tlv_tlen-=sizeof(struct lspping_tlv_downstream_map_ipv4_t);
+ break;
+ case LSPPING_AFI_IPV6:
+ printf("\n\t Downstream IP: %s" \
+ "\n\t Downstream Interface IP: %s",
+ ip6addr_string(tlv_ptr.lspping_tlv_downstream_map_ipv6->downstream_ip),
+ ip6addr_string(tlv_ptr.lspping_tlv_downstream_map_ipv6->downstream_interface));
+ tlv_tptr+=sizeof(struct lspping_tlv_downstream_map_ipv6_t);
+ tlv_tlen-=sizeof(struct lspping_tlv_downstream_map_ipv6_t);
+ break;
+
+ case LSPPING_AFI_UNMB:
+ printf("\n\t Downstream IP: %s" \
+ "\n\t Downstream Interface Index: 0x%08x",
+ ipaddr_string(tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_ip),
+ EXTRACT_32BITS(tlv_ptr.lspping_tlv_downstream_map_ipv4->downstream_interface));
+ tlv_tptr+=sizeof(struct lspping_tlv_downstream_map_ipv4_t);
+ tlv_tlen-=sizeof(struct lspping_tlv_downstream_map_ipv4_t);
+ break;
+
+ default:
+ /* should not happen ! - no error message - tok2str() has barked already */
+ break;
+ }
+
+ tlv_ptr.lspping_tlv_downstream_map_info= \
+ (const struct lspping_tlv_downstream_map_info_t *)tlv_tptr;
+
+ /* FIXME add hash-key type, depth limit, multipath processing */
+
+
+ tlv_tptr+=sizeof(struct lspping_tlv_downstream_map_info_t);
+ tlv_tlen-=sizeof(struct lspping_tlv_downstream_map_info_t);
+
+ /* FIXME print downstream labels */
+
+
+ tlv_hexdump=TRUE; /* dump the TLV until code complete */
+
+ break;
+