summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2020-04-21 22:41:43 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2020-05-08 18:52:55 +0200
commitf74539e0023430df6429a01187481cadc10d679f (patch)
treee56165cc08d0d6cf921c36635e3b366d7947f916 /sysdep
parent643bf712cc791daf196345d08639fad0f6693994 (diff)
Wireguard: Improve socket debugging
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/wg_user.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdep/unix/wg_user.c b/sysdep/unix/wg_user.c
index c3bef041..49f6d89c 100644
--- a/sysdep/unix/wg_user.c
+++ b/sysdep/unix/wg_user.c
@@ -34,16 +34,16 @@ bool wg_has_userspace(const char *ifname)
/* NULL=receiving turned off, returns 1 to clear rx buffer */
static
-int user_rx_hook(struct birdsock *sk UNUSED, uint size)
+int user_rx_hook(struct birdsock *sk UNUSED, uint size UNUSED)
{
- DBG(L_TRACE "WG: RX %d", size);
+ DBG(L_TRACE "WG: RX %p %d", sk, size);
return 1;
}
static
-void user_tx_hook(struct birdsock *bs UNUSED)
+void user_tx_hook(struct birdsock *bs)
{
- DBG(L_TRACE "WG: TX");
+ DBG(L_TRACE "WG: TX %p %d", bs, s->tpos - s->ttx);
}
/* errno or zero if EOF */
@@ -53,7 +53,7 @@ void user_err_hook(struct birdsock *bs, int err)
/* if (err == 0) */
/* return; */
- log(L_TRACE "WG: ERR %d %s", err, bs->err);
+ log(L_TRACE "WG: ERR %p %d %s", bs, err, bs->err);
if (bs->fd >= 0)
close(bs->fd);
bs->fd = -1;