summaryrefslogtreecommitdiff
path: root/sysdep/unix/wg_user.h
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2019-09-27 21:56:07 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2021-01-12 23:34:17 +0100
commitbeb99f38ec4a889441f5675c1f5c8b8c815c8641 (patch)
tree7a21628c533e2e7ce6c320a4b2fac74b3f7e4921 /sysdep/unix/wg_user.h
parentd3bf043bf7aa5cac349d9472abad5246fce326f8 (diff)
Wg-user: Refactor unix socket implementation
Move unix socket implementation for wireguard-go to sysdep/unix/. Close socket fixing leak
Diffstat (limited to 'sysdep/unix/wg_user.h')
-rw-r--r--sysdep/unix/wg_user.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/sysdep/unix/wg_user.h b/sysdep/unix/wg_user.h
new file mode 100644
index 00000000..a5e4251a
--- /dev/null
+++ b/sysdep/unix/wg_user.h
@@ -0,0 +1,14 @@
+#ifndef _BIRD_WG_USER_H
+#define _BIRD_WG_USER_H
+
+#include "sysdep/config.h"
+
+#define SOCKET_PATH PATH_RUNSTATEDIR "/wireguard/"
+
+struct pool;
+struct wg_device;
+
+bool wg_has_userspace(const char *ifname);
+int wg_user_set_device(struct pool *pool, const char *ifname, struct wg_device *dev);
+
+#endif /* _BIRD_WG_USER_H */