diff options
Diffstat (limited to 'Sources/WireGuardKitGo/wireguard.h')
-rw-r--r-- | Sources/WireGuardKitGo/wireguard.h | 23 |
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..fdb66c2 --- /dev/null +++ b/Sources/WireGuardKitGo/wireguard.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: MIT + * + * Copyright (C) 2018-2023 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 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 void wgDisableSomeRoamingForBrokenMobileSemantics(int handle); +extern const char *wgVersion(); + +#endif |