summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tunnel/tools/libwg-go/api-android.go3
-rw-r--r--tunnel/tools/libwg-go/jni.c1
2 files changed, 3 insertions, 1 deletions
diff --git a/tunnel/tools/libwg-go/api-android.go b/tunnel/tools/libwg-go/api-android.go
index abbdf61a..cb3852ea 100644
--- a/tunnel/tools/libwg-go/api-android.go
+++ b/tunnel/tools/libwg-go/api-android.go
@@ -183,7 +183,8 @@ func wgTurnOn(interfaceName string, tunFd int32, settings string) int32 {
return i
}
-func wgDHCP(tunnelHandles int32) {
+//export wgDHCP
+func wgDHCP(tunnelHandle int32) {
handle, ok := tunnelHandles[tunnelHandle]
if !ok {
return
diff --git a/tunnel/tools/libwg-go/jni.c b/tunnel/tools/libwg-go/jni.c
index 0f56210f..9fb4aaed 100644
--- a/tunnel/tools/libwg-go/jni.c
+++ b/tunnel/tools/libwg-go/jni.c
@@ -9,6 +9,7 @@
struct go_string { const char *str; long n; };
extern int wgTurnOn(struct go_string ifname, int tun_fd, struct go_string settings);
+extern void wgDHCP(int handle);
extern void wgTurnOff(int handle);
extern int wgGetSocketV4(int handle);
extern int wgGetSocketV6(int handle);