#include "netdissect-stdinc.h"
-#include <stdlib.h>
#include <string.h>
#include "netdissect.h"
format_ip6addr(netdissect_options *ndo, const u_char *cp)
{
if (is_ipv4_mapped_address(cp))
- return ipaddr_string(ndo, cp + IPV4_MAPPED_HEADING_LEN);
+ return GET_IPADDR_STRING(cp + IPV4_MAPPED_HEADING_LEN);
else
- return ip6addr_string(ndo, cp);
+ return GET_IP6ADDR_STRING(cp);
}
static int
ND_PRINT(".");
if (length+lab_length > max_length) {
if (print)
- (void)nd_printzp(ndo, cp+length, max_length-length, NULL);
+ nd_printjnp(ndo, cp+length, max_length-length);
break;
}
if (print)
- (void)nd_printzp(ndo, cp+length, lab_length, NULL);
+ nd_printjnp(ndo, cp+length, lab_length);
length += lab_length;
}
if (print)
return -1;
}
for (t = 0; t < optlen; t += 4)
- ND_PRINT(" %s", ipaddr_string(ndo, value + t));
+ ND_PRINT(" %s", GET_IPADDR_STRING(value + t));
}
break;
case DH4OPT_DOMAIN_SEARCH: {
return -1;
}
for (t = 0; t < optlen; t += 16)
- ND_PRINT(" %s", ip6addr_string(ndo, value + t));
+ ND_PRINT(" %s", GET_IP6ADDR_STRING(value + t));
}
break;
case DH6OPT_DOMAIN_LIST: {
ND_PRINT(" Verdict: %u Fingerprint: %s Common Name: ",
GET_U_1(value),
format_256(ndo, value + 4));
- (void)nd_printzp(ndo, value + 36, bodylen - 36, NULL);
+ nd_printjnp(ndo, value + 36, bodylen - 36);
}
break;
ND_PRINT(" M: %u P: %u H: %u L: %u User-agent: ",
M, P, H, L
);
- (void)nd_printzp(ndo, value + 4, bodylen - 4, NULL);
+ nd_printjnp(ndo, value + 4, bodylen - 4);
}
break;
print_dns_label(ndo, value+1, bodylen-1, 1);
} else if (policy == 130) {
ND_PRINT("Opaque UTF-8: ");
- (void)nd_printzp(ndo, value + 1, bodylen - 1, NULL);
+ nd_printjnp(ndo, value + 1, bodylen - 1);
} else if (policy == 131) {
if (bodylen != 1) {
nd_print_invalid(ndo);
);
if (l < 64) {
ND_PRINT("\"");
- (void)nd_printzp(ndo, value + 17, l, NULL);
+ nd_printjnp(ndo, value + 17, l);
ND_PRINT("\"");
} else {
nd_print_invalid(ndo);
invalid:
nd_print_invalid(ndo);
- return;
}