aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardKitGo/wireguard.h
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2020-12-02 12:27:39 +0100
committerAndrej Mihajlov <and@mullvad.net>2020-12-03 13:32:24 +0100
commitec574085703ea1c8b2d4538596961beb910c4382 (patch)
tree73cf8bbdb74fe5575606664bccd0232ffa911803 /Sources/WireGuardKitGo/wireguard.h
parentWireGuardKit: Assert that resolutionResults must not contain failures (diff)
downloadwireguard-apple-ec574085703ea1c8b2d4538596961beb910c4382.tar.xz
wireguard-apple-ec574085703ea1c8b2d4538596961beb910c4382.zip
Move all source files to `Sources/` and rename WireGuardKit targets
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
Diffstat (limited to 'Sources/WireGuardKitGo/wireguard.h')
-rw-r--r--Sources/WireGuardKitGo/wireguard.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/Sources/WireGuardKitGo/wireguard.h b/Sources/WireGuardKitGo/wireguard.h
new file mode 100644
index 0000000..18bf6bd
--- /dev/null
+++ b/Sources/WireGuardKitGo/wireguard.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0
+ *
+ * Copyright (C) 2018-2019 WireGuard LLC. All Rights Reserved.
+ */
+
+#ifndef WIREGUARD_H
+#define WIREGUARD_H
+
+#include <sys/types.h>
+#include <stdint.h>
+#include <stdbool.h>
+
+typedef void(*logger_fn_t)(void *context, int level, const char *msg);
+extern void wgEnableRoaming(bool enabled);
+extern void wgSetLogger(void *context, logger_fn_t logger_fn);
+extern int wgTurnOn(const char *settings, int32_t tun_fd);
+extern void wgTurnOff(int handle);
+extern int64_t wgSetConfig(int handle, const char *settings);
+extern char *wgGetConfig(int handle);
+extern void wgBumpSockets(int handle);
+extern const char *wgVersion();
+
+#endif