wireguard-apple/wireguard-go-bridge/wireguard.h

24 lines
667 B
C
Raw Normal View History

2018-06-09 01:14:34 +00:00
/* SPDX-License-Identifier: GPL-2.0
*
2019-01-02 00:56:33 +00:00
* Copyright (C) 2018-2019 WireGuard LLC. All Rights Reserved.
2018-06-09 01:14:34 +00:00
*/
#ifndef WIREGUARD_H
#define WIREGUARD_H
#include <sys/types.h>
2018-10-26 22:57:58 +00:00
#include <stdint.h>
2019-01-22 12:09:38 +00:00
#include <stdbool.h>
2018-06-09 01:14:34 +00:00
typedef struct { const char *p; size_t n; } gostring_t;
typedef void(*logger_fn_t)(int level, const char *msg);
2019-01-22 12:09:38 +00:00
extern void wgEnableRoaming(bool enabled);
2018-06-09 01:14:34 +00:00
extern void wgSetLogger(logger_fn_t logger_fn);
extern int wgTurnOn(gostring_t settings, int32_t tun_fd);
2018-06-09 01:14:34 +00:00
extern void wgTurnOff(int handle);
2018-12-11 23:45:50 +00:00
extern int64_t wgSetConfig(int handle, gostring_t settings);
extern void wgBindInterfaceScope(int handle, int32_t ifscope);
2018-08-27 20:32:47 +00:00
extern char *wgVersion();
2018-06-09 01:14:34 +00:00
#endif