- printf("%s",ipaddr_string(EXTRACT_32BITS(&tlv_ptr.eigrp_tlv_ip_int->nexthop)));
-
- printf("\n\t delay %u ms, bandwidth %u Kbps, mtu %u, hop %u, reliability %u, load %u",
- (EXTRACT_32BITS(&tlv_ptr.eigrp_tlv_ip_int->delay)/100),
- EXTRACT_32BITS(&tlv_ptr.eigrp_tlv_ip_int->bandwidth),
- EXTRACT_24BITS(&tlv_ptr.eigrp_tlv_ip_int->mtu),
- tlv_ptr.eigrp_tlv_ip_int->hopcount,
- tlv_ptr.eigrp_tlv_ip_int->reliability,
- tlv_ptr.eigrp_tlv_ip_int->load);
+ ND_PRINT("%u.%u",
+ GET_BE_U_2(&tlv_ptr.eigrp_tlv_at_int->nexthop[0]),
+ GET_BE_U_2(&tlv_ptr.eigrp_tlv_at_int->nexthop[2]));
+
+ ND_PRINT("\n\t delay %u ms, bandwidth %u Kbps, mtu %u, hop %u, reliability %u, load %u",
+ (GET_BE_U_4(tlv_ptr.eigrp_tlv_at_int->delay)/100),
+ GET_BE_U_4(tlv_ptr.eigrp_tlv_at_int->bandwidth),
+ GET_BE_U_3(tlv_ptr.eigrp_tlv_at_int->mtu),
+ GET_U_1(tlv_ptr.eigrp_tlv_at_int->hopcount),
+ GET_U_1(tlv_ptr.eigrp_tlv_at_int->reliability),
+ GET_U_1(tlv_ptr.eigrp_tlv_at_int->load));
+ break;
+
+ case EIGRP_TLV_AT_EXT:
+ tlv_ptr.eigrp_tlv_at_ext = (const struct eigrp_tlv_at_ext_t *)tlv_tptr;
+ if (tlv_tlen < sizeof(*tlv_ptr.eigrp_tlv_at_ext)) {
+ ND_PRINT(" (too short, < %zu)",
+ sizeof(struct eigrp_tlv_header) + sizeof(*tlv_ptr.eigrp_tlv_at_ext));
+ break;
+ }
+
+ ND_PRINT("\n\t Cable-Range: %u-%u, nexthop: ",
+ GET_BE_U_2(tlv_ptr.eigrp_tlv_at_ext->cable_start),
+ GET_BE_U_2(tlv_ptr.eigrp_tlv_at_ext->cable_end));
+
+ if (GET_BE_U_4(tlv_ptr.eigrp_tlv_at_ext->nexthop) == 0)
+ ND_PRINT("self");
+ else
+ ND_PRINT("%u.%u",
+ GET_BE_U_2(&tlv_ptr.eigrp_tlv_at_ext->nexthop[0]),
+ GET_BE_U_2(&tlv_ptr.eigrp_tlv_at_ext->nexthop[2]));
+
+ ND_PRINT("\n\t origin-router %u, origin-as %u, origin-proto %s, flags [0x%02x], tag 0x%08x, metric %u",
+ GET_BE_U_4(tlv_ptr.eigrp_tlv_at_ext->origin_router),
+ GET_BE_U_4(tlv_ptr.eigrp_tlv_at_ext->origin_as),
+ tok2str(eigrp_ext_proto_id_values,"unknown",GET_U_1(tlv_ptr.eigrp_tlv_at_ext->proto_id)),
+ GET_U_1(tlv_ptr.eigrp_tlv_at_ext->flags),
+ GET_BE_U_4(tlv_ptr.eigrp_tlv_at_ext->tag),
+ GET_BE_U_2(tlv_ptr.eigrp_tlv_at_ext->metric));
+
+ ND_PRINT("\n\t delay %u ms, bandwidth %u Kbps, mtu %u, hop %u, reliability %u, load %u",
+ (GET_BE_U_4(tlv_ptr.eigrp_tlv_at_ext->delay)/100),
+ GET_BE_U_4(tlv_ptr.eigrp_tlv_at_ext->bandwidth),
+ GET_BE_U_3(tlv_ptr.eigrp_tlv_at_ext->mtu),
+ GET_U_1(tlv_ptr.eigrp_tlv_at_ext->hopcount),
+ GET_U_1(tlv_ptr.eigrp_tlv_at_ext->reliability),
+ GET_U_1(tlv_ptr.eigrp_tlv_at_ext->load));