#include "netdissect.h"
#include "addrtoname.h"
+#include "addrtostr.h"
#include "extract.h"
static const char *ns_ops[] = {
EXTRACT_16BITS(cp), EXTRACT_16BITS(cp + 2)));
break;
-#ifdef INET6
case T_AAAA:
{
- struct in6_addr addr;
char ntop_buf[INET6_ADDRSTRLEN];
if (!ND_TTEST2(*cp, sizeof(struct in6_addr)))
return(NULL);
- memcpy(&addr, cp, sizeof(struct in6_addr));
ND_PRINT((ndo, " %s",
- inet_ntop(AF_INET6, &addr, ntop_buf, sizeof(ntop_buf))));
+ addrtostr6(cp, ntop_buf, sizeof(ntop_buf))));
break;
}
memset(&a, 0, sizeof(a));
memcpy(&a.s6_addr[pbyte], cp + 1, sizeof(a) - pbyte);
ND_PRINT((ndo, " %u %s", pbit,
- inet_ntop(AF_INET6, &a, ntop_buf, sizeof(ntop_buf))));
+ addrtostr6(&a, ntop_buf, sizeof(ntop_buf))));
}
if (pbit > 0) {
ND_PRINT((ndo, " "));
}
break;
}
-#endif /*INET6*/
case T_OPT:
ND_PRINT((ndo, " UDPsize=%u", class));