diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2020-04-21 22:41:43 +0200 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2021-01-12 23:34:17 +0100 |
commit | 20a0499e37a2c00dc3355aa3ff4deee4b79ac9f7 (patch) | |
tree | 845b2e76be9db7059abb4c22cd701a15a696df83 /sysdep/unix/wg_user.c | |
parent | 82f69234cfa8602dcb1c08716f30796b177bd79f (diff) |
Wg-user: Improve socket debugging
Diffstat (limited to 'sysdep/unix/wg_user.c')
-rw-r--r-- | sysdep/unix/wg_user.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdep/unix/wg_user.c b/sysdep/unix/wg_user.c index 54ab2333..4668b2c6 100644 --- a/sysdep/unix/wg_user.c +++ b/sysdep/unix/wg_user.c @@ -34,17 +34,17 @@ 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); rfree(sk); 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, bs->tpos - bs->ttx); } /* errno or zero if EOF */ @@ -54,7 +54,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; |