[NETD-TC#14] Add traffic controller JNI to tethering module
This CL provides native methods to access BPF maps via a native library. Bug: 202086915 Test: m; flash; boot; Change-Id: I2e5d03d0c2e31ba11996d1b28ead9b552397fe29
This commit is contained in:
@@ -28,6 +28,11 @@ import android.util.Log;
|
||||
public class BpfNetMaps {
|
||||
private static final String TAG = "BpfNetMaps";
|
||||
|
||||
static {
|
||||
System.loadLibrary("traffic_controller_jni");
|
||||
native_init();
|
||||
}
|
||||
|
||||
/**
|
||||
* Add naughty app bandwidth rule for specific app
|
||||
*
|
||||
@@ -239,6 +244,7 @@ public class BpfNetMaps {
|
||||
return -err;
|
||||
}
|
||||
|
||||
private static native void native_init();
|
||||
private native int native_addNaughtyApp(int uid);
|
||||
private native int native_removeNaughtyApp(int uid);
|
||||
private native int native_addNiceApp(int uid);
|
||||
|
||||
Reference in New Issue
Block a user