* changes:
jni - dynamically link C++ - saves 43 kB
libservice-connectivity - dynamically link c++ - saves 600 kB
link libbase & libnetdutils dynamically - save ~17.5 kiB
remove spurious headers
libclat only depends on libbase_headers not libbase itself
bpf_connectivity_headers already pulls in bpf_headers,
which already pulls in bpf_syscall_wrappers.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ib22da8d433bd3187349f06f41ec064360c38982f
netlink_listener_test tests the socket destroy listener, so it makes
sense to just merge it into the TrafficControllerTest.
Test: atest traffic_controller_unit_test
Change-Id: Ibc0b483203150aa2d7898a761fa4715dce6f4218
We are ready to remove traffic controller from netd, so
TrafficController::start() should be called from the system server.
This reverts commit c2984fdca8.
Test: atest FrameworksNetTests FrameworksNetIntegrationTests
CtsNetTestCases:android.net.TrafficStatsTest NetworkUsageStatsTest
CtsHostsideNetworkTests
Change-Id: Ic324ad0c064271977ab35d7f55badee00098e196
TrafficController is currently still started by netd, and this should
not happen in two places. Instead, native_init should init (open) the
maps.
Test: atest FrameworksNetTests
Change-Id: Ifd6be50aa5f62e59a5b1c5c0a97550389fd0e7e1
There is not really a point to separate these two as they are all used
in ConnectivityService.
As a future TODO, we might want to rename libservice-connectivity to
libcom_android_server_jni to be more inline with the jarjar'ed jni lib
versions.
Test: atest FrameworksNetTests:ConnectivityServiceTest
Change-Id: I1b9f4fde345038bda6b3ffcf8e3f47cf9262e052
Added SPDX-license-identifier-Apache-2.0 to:
service/native/Android.bp
Bug: 68860345
Bug: 151177513
Bug: 151953481
Test: m all
Change-Id: Ibfaed81348fca9e5cf313a4d29fd0b72bc746e06
Two reason for renaming:
1. Avoid module name collision in sc-mainline-prod branch.
2. The libnetdbpf was misnamed before.
Bug: 202086915
Test: atest libnetworkstats_test FrameworksNetTests
ConnectivityCoverageTests FrameworksNetSmokeTests
CtsAppOpsTestCases
Change-Id: I87fcf4b1a9d58780a45743a9aa91b9b936e54266
This CL provides native methods to access BPF maps via a native library.
Bug: 202086915
Test: m; flash; boot;
Change-Id: I2e5d03d0c2e31ba11996d1b28ead9b552397fe29
Delete tagSocket(), privilegedTagSocket() and untagSocket() revelant
test cases since thay are moved out of TrafficController in
aosp/1849156.
Bug: 202086915
Test: atest traffic_controller_unit_test passed
Change-Id: I605577ee4d7076f0c8ad75888a4d32bff90f6104
Move native functions from ClatdController and TcUtils to libclat
for jni ClatdCoordinator.
Bug: 212345928
Test: atest libclat_test
Change-Id: Ia4b344b07537d57c3e4ff1285b0e7b17e0c63c3e
Tethering module.
Delete tagSocket(), privilegedTagSocket() and untagSocket() since
they are moved out of TrafficController in aosp/1849156.
Bug: 202086915
Test: m; flash; boot;
Change-Id: Ifeaeb060fbf1add9f06748e7846b9e11e0345bda
Delete tagSocket(), privilegedTagSocket() and untagSocket() since
they are moved out of TrafficController in aosp/1849156.
Test: m
Change-Id: I6162c758446f597eb79734e00348dc8b1fe2d422
configure_packet_socket() is moved from ClatdController. Only change
the failure return value from errno to -errno. The remaining parts
are the same.
The test is modified from ClatdControllerTest::ConfigureIpv6Address.
Simply set socket filter to an interface and check that the packet
socket is bound to the interface. We can't check the socket filter
because there is no way to fetch it from the kernel.
Bug: 212345928
Test: build and boot
atest libclat_test
Change-Id: Ia33c21051b040829c7d2aa55ed5b7de8766c98c5
detect_mtu() is moved from ClatdController without behavior
change. The unique_fd for socket fd is replaced by primitive int
because libbase is not supported in mainline.
Bug: 212345928
Test: build and boot
atest libclat_test
Change-Id: Ib9c1a9d4b9e1c141d88164e8489c5044fdf70685
isIpv4AddressFree() is moved from ClatdController without behavior
change.
selectIpv4Address() and its test are moved from ClatdController as well.
They have been refactored slightly for testing because function pointer
of isIpv4AddressFreeFunc is not a global variable anymore. We can't set
global function pointer to change selectIpv4Address() behavior for
testing. Instead isIpv4AddressFree is sent as an argument of function
pointer. For public caller, selectIpv4Address() has no behavior change.
For test caller, they can call an internal selectIpv4AddressInternal
(.., fn) to change isIpv4AddrFreeFn function pointer for testing.
Bug: 212345928
Test: build and boot
atest libclat_test
Change-Id: Iab5e6fd5ebbccf10e7b3be2251b45949cf3f3464
generateIpv6Address() is moved from ClatdController without behavior
change. The unique_fd for socket fd is replaced by primitive int
because libbase is not supported in mainline.
Bug: 212345928
Test: build and boot
atest libclat_test
Change-Id: I42e152e6fe3ad577a0274e1d55e737318f61176d
Introduce the library libclat to implement clat functions for jni.
It is helpful for unit test.
makeChecksumNeutral() and its test are moved from ClatdController
without behavior change.
Bug: 212345928
Test: build and boot
atest libclat_test
Change-Id: I1c0981d98141fc1cc07b2d3a0f3cbddf38683ff3