[CLATJ#7] ClatCoordinator: select IPv4 address for clatd
Introduce ClatCoordinator to replace netd/ClatdController.
This is a startup commit. Starting clatd needs to prepare local
464xlat ipv4 address, local 464xlat ipv6 address, tun interface,
clat read/write sockets. These will be implemented from this
and followup commits. This commit implements that prepare local
464xlat ipv4 address.
Bug: 212345928
Test: flash and boot
Run "atest ClatCoordinatorTest" in a followup commit.
Change-Id: I486db8aef0181ee1aedd7cd7702f95d5a1cef812
diff --git a/service/jni/onload.cpp b/service/jni/onload.cpp
index 0012879..04d9671 100644
--- a/service/jni/onload.cpp
+++ b/service/jni/onload.cpp
@@ -20,6 +20,7 @@
namespace android {
int register_android_server_TestNetworkService(JNIEnv* env);
+int register_android_server_connectivity_ClatCoordinator(JNIEnv* env);
extern "C" jint JNI_OnLoad(JavaVM* vm, void*) {
JNIEnv *env;
@@ -32,6 +33,10 @@
return JNI_ERR;
}
+ if (register_android_server_connectivity_ClatCoordinator(env) < 0) {
+ return JNI_ERR;
+ }
+
return JNI_VERSION_1_6;
}