aboutsummaryrefslogtreecommitdiff
path: root/slirp/socket.c
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2018-02-01 20:35:45 +1100
committerMichael Tokarev <mjt@tls.msk.ru>2018-05-20 08:25:23 +0300
commit3ad9319f5cf560567ae75c2d94614e979409d580 (patch)
tree053af9e1884534f1ed229f4961023a590e4b965e /slirp/socket.c
parent787bbc306e2770c73f9fd9d3a209d26af191e352 (diff)
downloadqemu-arm-3ad9319f5cf560567ae75c2d94614e979409d580.tar.gz
slirp/debug: Print IP addresses in human readable form
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'slirp/socket.c')
-rw-r--r--slirp/socket.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/slirp/socket.c b/slirp/socket.c
index cb7b5b608d..61347d1a0c 100644
--- a/slirp/socket.c
+++ b/slirp/socket.c
@@ -701,10 +701,10 @@ tcp_listen(Slirp *slirp, uint32_t haddr, u_int hport, uint32_t laddr,
memset(&addr, 0, addrlen);
DEBUG_CALL("tcp_listen");
- DEBUG_ARG("haddr = %x", haddr);
- DEBUG_ARG("hport = %d", hport);
- DEBUG_ARG("laddr = %x", laddr);
- DEBUG_ARG("lport = %d", lport);
+ DEBUG_ARG("haddr = %s", inet_ntoa(*(struct in_addr *)&haddr));
+ DEBUG_ARG("hport = %d", ntohs(hport));
+ DEBUG_ARG("laddr = %s", inet_ntoa(*(struct in_addr *)&laddr));
+ DEBUG_ARG("lport = %d", ntohs(lport));
DEBUG_ARG("flags = %x", flags);
so = socreate(slirp);