This is a preparation for moving adding/removing forwarding rules from
IpServer to BpfCoordinator.
Bug: 150736748
Test: atest IpServerTest
Change-Id: I85316ef09ff3c9389ded11dcc384493d699da48e
Verify that the coordinator could fetch tether stats from BPF maps and
report the network stats to the service.
Bug: 150736748
Test: atest BpfCoordinatorTest
Change-Id: Ib1756159a2047c5db7d31359b0f288f840bd1bb1
Make BPF tethering offload coordinator, BpfCoordinator,
registers a network stats provider, BpfTetherStatsProvider, and
provide the tethering stats from the BPF map.
Bug: 150736748
Test: new test BpfCoordinatorTest
Change-Id: I22e71f87b67668f7e733e4f215d93bf5b2c9380d
Used to record offload transmitted/received forwarded bytes/packets.
Bug: 150736748
Test: new test BpfTetheringCoordinatorTest
Change-Id: Ie8725f95c3ddd5fb3811d479de32d2c1f7dcb493
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 9c9c600c16 is in history
Change-Id: I0e0a623ef6a149e1482c341a6987599e326ffe11
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history
Change-Id: Iffcb69ef26033a5d17dcb05a014d98e9dc33cb63
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history
Change-Id: Id4febbdbf75c4acfaa4a62f8124314608fb494b5
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history
Change-Id: I8e1a67cf3573d0294e5585cb794ea5265a9486a3
am skip reason: Change-Id I45e8e8d737486def9d0de8943ec7f09ca0942a0b with SHA-1 908518d8e2 is in history
Change-Id: If8c7dd5b84efc54b5ba4fcbcbed18c1f18009613
KClass#getSimpleName need refer to kotlin-reflect.jar which need
include it in Andorid.bp. However, it's not necessary to use
KClass#getSimpleName but use Class#getSimpleName instead.
Test: atest TetheringTests
Bug: 157527499
Change-Id: I49bc336a276d30152402eba926cc583bc81e8e5c
Merged-In: I49bc336a276d30152402eba926cc583bc81e8e5c
am skip reason: Change-Id Id1c2e848430c49a2da7402244814cd084f5da77c with SHA-1 cbac8e0b63 is in history
Change-Id: I6379d3afe817057eec201635c63558847e2de3ee
am skip reason: Change-Id Id1c2e848430c49a2da7402244814cd084f5da77c with SHA-1 cbac8e0b63 is in history
Change-Id: I39ea3325d903b1f3170e6304d83dcc3d257ea113
am skip reason: Change-Id Id1c2e848430c49a2da7402244814cd084f5da77c with SHA-1 cbac8e0b63 is in history
Change-Id: I1f0759e84c6f7e17427165fc6db9dd7531284e8a
The names of the individual modules do not quite follow the pattern
that java_sdk_library uses so this temporarily sets the following:
naming_scheme: "frameworks-modules"
That causes java_sdk_library to use a naming scheme that matches the
one used by the individual modules of this. It will be cleaned up
later.
Part of the purpose of the java_sdk_library is to hide the
implementation code and force users of the library to depend on stubs
for a well defined API. Ideally, it would allow access to the
implementation in those cases where it is safe, e.g. from within the
same APEX, or from tests for the implementation. Unfortunately, due to
limitations in the build it does not yet have enough information to
make that decision correctly which means that any code that needs to
compile against the implementation is broken which would prevent us
from converting the module to java_sdk_library.
However, the only way to provide the additional information to allow
the implementation to be correctly exposed is to convert the modules
to java_sdk_library; a cycle.
In order to break that cycle the java_sdk_library creates a special
<module>.impl target which is used directly by tests and any other code
that needs it. Once all the modules have been converted to a
java_sdk_library then we can resolve the limitations in the build and
remove the direct references to <module>.impl.
Test: m update-api
Bug: 155164730
Merged-In: If5c115f482751f9f4b5f047e9e401a18e36799ef
Merged-In: Id1c2e848430c49a2da7402244814cd084f5da77c
Change-Id: Id1c2e848430c49a2da7402244814cd084f5da77c
The names of the individual modules do not quite follow the pattern
that java_sdk_library uses so this temporarily sets the following:
naming_scheme: "frameworks-modules"
That causes java_sdk_library to use a naming scheme that matches the
one used by the individual modules of this. It will be cleaned up
later.
Part of the purpose of the java_sdk_library is to hide the
implementation code and force users of the library to depend on stubs
for a well defined API. Ideally, it would allow access to the
implementation in those cases where it is safe, e.g. from within the
same APEX, or from tests for the implementation. Unfortunately, due to
limitations in the build it does not yet have enough information to
make that decision correctly which means that any code that needs to
compile against the implementation is broken which would prevent us
from converting the module to java_sdk_library.
However, the only way to provide the additional information to allow
the implementation to be correctly exposed is to convert the modules
to java_sdk_library; a cycle.
In order to break that cycle the java_sdk_library creates a special
<module>.impl target which is used directly by tests and any other code
that needs it. Once all the modules have been converted to a
java_sdk_library then we can resolve the limitations in the build and
remove the direct references to <module>.impl.
Test: m Tethering InProcessTethering checkapi
Bug: 155164730
Merged-In: If5c115f482751f9f4b5f047e9e401a18e36799ef
Change-Id: Id1c2e848430c49a2da7402244814cd084f5da77c
KClass#getSimpleName need refer to kotlin-reflect.jar which need
include it in Andorid.bp. However, it's not necessary to use
KClass#getSimpleName but use Class#getSimpleName instead.
Test: atest TetheringTests
Bug: 157527499
Change-Id: I49bc336a276d30152402eba926cc583bc81e8e5c
Extend the timeout to lower the EthernetTetheringTest flaky.
Besides, also explicitly exempt entitlement check in
EtetherntTetheringTest because it do not test tethering upstream
currently. Thus, the tests would not be interrupted by entitlement
check if test SIM is entitlement required.
Bug: 156713866
Test: TetheringCoverageTests, CtsTehteringTest
Merged-In: I45e8e8d737486def9d0de8943ec7f09ca0942a0b
Change-Id: I45e8e8d737486def9d0de8943ec7f09ca0942a0b
Extend the timeout to lower the EthernetTetheringTest flaky.
Besides, also explicitly exempt entitlement check in
EtetherntTetheringTest because it do not test tethering upstream
currently. Thus, the tests would not be interrupted by entitlement
check if test SIM is entitlement required.
Bug: 156713866
Test: TetheringCoverageTests, CtsTehteringTest
Change-Id: I45e8e8d737486def9d0de8943ec7f09ca0942a0b
- Add New class PrivateAddressCoordinator to coordinate the private
address conflict problem.
- Downstream prefix would be random in 192.168.0.0/24 ~
192.168.255.0/24.
- If new upstream prefix is conflict with existing downstream prefix,
downstream would be kicked out and it would request a new one.
- The last conflict upstream prefixes would be blacklist. Avoid to
select downstream prefix which is conflict with prefixes in blacklist.
Bug: 130879722
Test: -build, flash, boot
-atest TetheringTests
Change-Id: Ib45b87bcd9eeb5da03fb7ec90b1af9ca53998cf5
am skip reason: Change-Id I7c539f1f4a447b5913164b222601c6113c6fe645 with SHA-1 369fd25f79 is in history
Change-Id: I4cd2582ff27a28cc9f495e93b18521e8de56fd60
am skip reason: Change-Id I7c539f1f4a447b5913164b222601c6113c6fe645 with SHA-1 e79e02e5c4 is in history
Change-Id: I8929d523b1356fc8a7e38f1efe5cf9249123f18a
am skip reason: Change-Id I7c539f1f4a447b5913164b222601c6113c6fe645 with SHA-1 e79e02e5c4 is in history
Change-Id: Ie41bae7c32a017ae640dcea4f9e0f647fa82d6d9
am skip reason: Change-Id I7c539f1f4a447b5913164b222601c6113c6fe645 with SHA-1 369fd25f79 is in history
Change-Id: I7c1d1fea95eb5a98363a8410d8a9e1b9b4fd47f2
am skip reason: Change-Id I7c539f1f4a447b5913164b222601c6113c6fe645 with SHA-1 e79e02e5c4 is in history
Change-Id: I701e22eb877cb7e1460b20f202a31fd54b9490f2