Add binder call tetherOffloadSetInterfaceQuota
Provide binder calls for setting the limit for the given upstream
interface.
Bug: 150736748
Test: atest
Change-Id: I5def133022ee0ae232972c9ccffccd041b4b47a6
Merged-In: I5def133022ee0ae232972c9ccffccd041b4b47a6
diff --git a/server/NetdNativeService.cpp b/server/NetdNativeService.cpp
index 732821b..c580670 100644
--- a/server/NetdNativeService.cpp
+++ b/server/NetdNativeService.cpp
@@ -1295,5 +1295,11 @@
return binder::Status::ok();
}
+binder::Status NetdNativeService::tetherOffloadSetInterfaceQuota(int ifIndex, int64_t quotaBytes) {
+ NETD_LOCKING_RPC(gCtls->tetherCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK);
+ int res = gCtls->tetherCtrl.setTetherOffloadInterfaceQuota(ifIndex, quotaBytes);
+ return statusFromErrcode(res);
+}
+
} // namespace net
} // namespace android