summaryrefslogtreecommitdiff
path: root/proto/wireguard/wireguard.h
diff options
context:
space:
mode:
Diffstat (limited to 'proto/wireguard/wireguard.h')
-rw-r--r--proto/wireguard/wireguard.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/proto/wireguard/wireguard.h b/proto/wireguard/wireguard.h
index e1cce73f..30073869 100644
--- a/proto/wireguard/wireguard.h
+++ b/proto/wireguard/wireguard.h
@@ -4,6 +4,14 @@
#include "nest/protocol.h"
#include "sysdep/linux/wireguard.h"
+#ifdef LOCAL_DEBUG
+#define WG_FORCE_DEBUG 1
+#else
+#define WG_FORCE_DEBUG 0
+#endif
+#define WG_TRACE(flags, msg, args...) do { if ((p->p.debug & flags) || WG_FORCE_DEBUG) \
+ log(L_TRACE "%s: " msg, p->p.name , ## args ); } while(0)
+
struct peer_config {
node n;
const char *public_key;