diff options
author | 2020-08-24 09:41:10 +0000 | |
---|---|---|
committer | 2020-08-24 09:41:10 +0000 | |
commit | d7b4a113f48d3cae3cccd7d78fe0f46e205e19d1 (patch) | |
tree | 074a9c836e4fcbe2882dd5c28ec7b46bf4ded1c4 /usr.sbin/unbound/testcode/streamtcp.c | |
parent | Clarify that tpmr(4) does not aggregate (diff) | |
download | wireguard-openbsd-d7b4a113f48d3cae3cccd7d78fe0f46e205e19d1.tar.xz wireguard-openbsd-d7b4a113f48d3cae3cccd7d78fe0f46e205e19d1.zip |
update to unbound 1.11.0, tests tb@ dtucker@, ok tb@
Diffstat (limited to 'usr.sbin/unbound/testcode/streamtcp.c')
-rw-r--r-- | usr.sbin/unbound/testcode/streamtcp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/unbound/testcode/streamtcp.c b/usr.sbin/unbound/testcode/streamtcp.c index 65ea8d4bcae..c49159d33a5 100644 --- a/usr.sbin/unbound/testcode/streamtcp.c +++ b/usr.sbin/unbound/testcode/streamtcp.c @@ -200,6 +200,7 @@ write_q(int fd, int udp, SSL* ssl, sldns_buffer* buf, uint16_t id, static void recv_one(int fd, int udp, SSL* ssl, sldns_buffer* buf) { + size_t i; char* pktstr; uint16_t len; if(!udp) { @@ -270,7 +271,13 @@ recv_one(int fd, int udp, SSL* ssl, sldns_buffer* buf) len = (size_t)l; } printf("\nnext received packet\n"); - log_buf(0, "data", buf); + printf("data[%d] ", (int)sldns_buffer_limit(buf)); + for(i=0; i<sldns_buffer_limit(buf); i++) { + const char* hex = "0123456789ABCDEF"; + printf("%c%c", hex[(sldns_buffer_read_u8_at(buf, i)&0xf0)>>4], + hex[sldns_buffer_read_u8_at(buf, i)&0x0f]); + } + printf("\n"); pktstr = sldns_wire2str_pkt(sldns_buffer_begin(buf), len); printf("%s", pktstr); |