2018-06-09 01:14:34 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0
|
|
|
|
*
|
2021-06-17 14:56:46 +00:00
|
|
|
* Copyright (C) 2018-2021 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
|
|
|
|
2020-11-05 16:14:16 +00:00
|
|
|
typedef void(*logger_fn_t)(void *context, int level, const char *msg);
|
|
|
|
extern void wgSetLogger(void *context, logger_fn_t logger_fn);
|
2020-02-07 11:31:42 +00:00
|
|
|
extern int wgTurnOn(const char *settings, int32_t tun_fd);
|
2018-06-09 01:14:34 +00:00
|
|
|
extern void wgTurnOff(int handle);
|
2020-02-07 11:31:42 +00:00
|
|
|
extern int64_t wgSetConfig(int handle, const char *settings);
|
2019-01-23 21:15:01 +00:00
|
|
|
extern char *wgGetConfig(int handle);
|
2019-05-30 13:31:09 +00:00
|
|
|
extern void wgBumpSockets(int handle);
|
2020-12-15 12:16:35 +00:00
|
|
|
extern void wgDisableSomeRoamingForBrokenMobileSemantics(int handle);
|
2019-01-23 21:15:01 +00:00
|
|
|
extern const char *wgVersion();
|
2018-06-09 01:14:34 +00:00
|
|
|
|
|
|
|
#endif
|