- int l;
- l = ND_PRINT((ndo, "%s/%d", ip6addr_string(ndo, &ni->rip6_dest), ni->rip6_plen));
- if (ni->rip6_tag)
- l += ND_PRINT((ndo, " [%d]", EXTRACT_BE_U_2(&ni->rip6_tag)));
- if (metric)
- l += ND_PRINT((ndo, " (%d)", ni->rip6_metric));
- return l;
+ uint16_t tag;
+ uint8_t metric;
+
+ ND_PRINT("%s/%u", GET_IP6ADDR_STRING(ni->rip6_dest),
+ GET_U_1(ni->rip6_plen));
+ tag = GET_BE_U_2(ni->rip6_tag);
+ if (tag)
+ ND_PRINT(" [%u]", tag);
+ metric = GET_U_1(ni->rip6_metric);
+ if (metric && print_metric)
+ ND_PRINT(" (%u)", metric);