Add a binder interface checking bpf status
The system server need to know if the bpf traffic stats accounting
system is running at run time before read network stats from it. Instead
of checking the kernel version. A safe way to implement it is adding a
binder call to check the service inside netd. If netd successfully setup
the system and it can be sure the stats will be avalaible for system
server.
Test: run cts -m CtsNetTestCases -t android.net.cts.TrafficStatsTest
Bug: 30950746
Change-Id: Ieef41dd94bc957864108f2f5590d9855ae985244
diff --git a/server/NetdNativeService.h b/server/NetdNativeService.h
index a0f7134..cf53c74 100644
--- a/server/NetdNativeService.h
+++ b/server/NetdNativeService.h
@@ -144,6 +144,8 @@
binder::Status ipSecRemoveTransportModeTransform(
const android::base::unique_fd& socket);
+
+ binder::Status trafficCheckBpfStatsEnable(bool* ret) override;
};
} // namespace net