aboutsummaryrefslogtreecommitdiffstats
path: root/cbits/tun.h
diff options
context:
space:
mode:
authorBin Jin <bjin@ctrl-d.org>2017-03-12 17:48:20 +0800
committerBin Jin <bjin@ctrl-d.org>2017-03-12 17:48:20 +0800
commita2a3e540f2d1a507b34eccae26de09066a2a12fa (patch)
tree1e336189acd095d761eaad252f18ee6e32b7216b /cbits/tun.h
downloadwireguard-hs-a2a3e540f2d1a507b34eccae26de09066a2a12fa.tar.xz
wireguard-hs-a2a3e540f2d1a507b34eccae26de09066a2a12fa.zip
Initial commit
Diffstat (limited to 'cbits/tun.h')
-rw-r--r--cbits/tun.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/cbits/tun.h b/cbits/tun.h
new file mode 100644
index 0000000..e0256cc
--- /dev/null
+++ b/cbits/tun.h
@@ -0,0 +1,11 @@
+#ifndef _WG_TUN_
+#define _WG_TUN_
+
+#include <string.h>
+
+int tun_alloc(const char *dev_name, int threads, int *fds);
+
+int utun_read(int fd, void *buf, size_t len);
+int utun_write(int fd, void *buf, size_t len);
+
+#endif // _WG_TUN_