for splay_each(node_t, n, node_tree) {
char id[2 * sizeof n->id + 1];
for (size_t c = 0; c < sizeof n->id; ++c)
- snprintf(id + 2 * c, 3, "%02hhx", n->id.x[c]);
+ snprintf(id + 2 * c, 3, "%02x", n->id.x[c]);
id[sizeof id - 1] = 0;
- send_request(c, "%d %d %s %s %s %d %d %d %d %x %x %s %s %d %hd %hd %hd %ld", CONTROL, REQ_DUMP_NODES,
+ send_request(c, "%d %d %s %s %s %d %d %d %d %x %x %s %s %d %d %d %d %ld", CONTROL, REQ_DUMP_NODES,
n->name, id, n->hostname ?: "unknown port unknown",
#ifdef DISABLE_LEGACY
0, 0, 0,
if(2.0 * c->outbuf.len / (float)maxoutbufsize - 1 > (float)rand()/(float)RAND_MAX)
return true;
- if(!send_request(c, "%d %hd", PACKET, packet->len))
+ if(!send_request(c, "%d %d", PACKET, packet->len))
return false;
return send_meta(c, (char *)DATA(packet), packet->len);
static bool receive_record(void *handle, uint8_t type, const void *data, uint16_t len) {
if(verbose)
- fprintf(stderr, "Received type %d record of %hu bytes:\n", type, len);
+ fprintf(stderr, "Received type %d record of %u bytes:\n", type, len);
if(!writeonly)
write(out, data, len);
return true;
result = snprintf(netstr, len, *format, ":::");
i += max_zero_length;
} else {
- result = snprintf(netstr, len, "%hx:", ntohs(subnet->net.ipv6.address.x[i]));
+ result = snprintf(netstr, len, "%x:", ntohs(subnet->net.ipv6.address.x[i]));
i++;
}
netstr += result;
} else {
if(only_reachable && !status.reachable)
continue;
- printf("%s id %s at %s port %s cipher %d digest %d maclength %d compression %d options %x status %04x nexthop %s via %s distance %d pmtu %hd (min %hd max %hd)\n",
+ printf("%s id %s at %s port %s cipher %d digest %d maclength %d compression %d options %x status %04x nexthop %s via %s distance %d pmtu %d (min %d max %d)\n",
node, id, host, port, cipher, digest, maclength, compression, options, status_int, nexthop, via, distance, pmtu, minmtu, maxmtu);
}
} break;