summaryrefslogtreecommitdiffhomepage
path: root/tunnel/tools/libwg-go/jni.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-02-11 22:24:31 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2023-05-27 00:52:28 +0200
commitaec52cc2d53b4a0dbd2889ace9a59404ee35f32f (patch)
tree4fa0e4d9f9297f06149c39387d57ed3c3d59d514 /tunnel/tools/libwg-go/jni.c
parentb9e5ca1e8568efcc73ec290c93940e0b4e5094ff (diff)
tunnel: request DHCPv6 leases
Diffstat (limited to 'tunnel/tools/libwg-go/jni.c')
-rw-r--r--tunnel/tools/libwg-go/jni.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/tunnel/tools/libwg-go/jni.c b/tunnel/tools/libwg-go/jni.c
index b386579c..443848e8 100644
--- a/tunnel/tools/libwg-go/jni.c
+++ b/tunnel/tools/libwg-go/jni.c
@@ -16,6 +16,7 @@ extern char *wgGetConfig(int handle);
extern char *wgVersion();
extern int wgSetConfig(int handle, struct go_string settings);
extern int wgStartGrpc();
+extern int wgSetFd(int handle, int tun_fd);
JNIEXPORT jint JNICALL Java_com_wireguard_android_backend_GoBackend_wgTurnOn(JNIEnv *env, jclass c, jstring ifname, jint tun_fd, jstring settings)
{
@@ -95,3 +96,8 @@ JNIEXPORT jint JNICALL Java_com_wireguard_android_backend_GoBackend_wgStartGrpc(
(*env)->ReleaseStringUTFChars(env, sockname, sockname_str);
return res;
}
+
+JNIEXPORT void JNICALL Java_com_wireguard_android_backend_GoBackend_wgSetFd(JNIEnv *env, jclass c, jint handle, jint tun_fd)
+{
+ wgSetFd(handle, tun_fd);
+}