It's a reason, so it's a lot clearer this way
Bug: 157405399
Test: ConnectivityServiceTest NetworkStaticLibTests
Change-Id: Id71d710a33b4df3c211e40141adb2aa0a535f458
This is not clearer than using the base method.
Test: ConnectivityServiceTest NetworkStaticLibTests
Bug: 157405399
Change-Id: Iac9aeffb563d0a1cb6c1287b46b9bbfffc0c75ca
The annotation is used to verify behavior for apps with max target SDK
33.
Bug: 267102290
Test: atest CtsNetTestCasesMaxTargetSdk33
Change-Id: I71ba4433389ba07553ea3d6d34a2bf64fdc132ad
This implements the bare minimum to read from BPF ring buffers in
userspace. The implementation uses two shared memory regions with
atomic-like access. Currently, the class only guarantees that the
element type has the same size (later can add btf support).
The alternative would be to use libbpf or bcc, but since this is a small
header-only library that seemed like it could end up being more
difficulty than it was worth.
Bug: 246985031
Test: atest libbpf_android_test
Change-Id: I7f08e76db9cb9672ef66c629bccb3db63d3c2229
This is similar to https://r.android.com/2374598 for maps.
Bug: 246985031
Test: build connectivity module
Change-Id: Id4c9f93b69e808d461b4554bf3fa591828635dd1
In aosp, getModuleVersion would always throw since there is
no meta-info for modules. Currently it would make
isFeatureEnabled method return false, which is not
a right thing for features are default enabled.
Change it to return default value when throwed.
Test: atest NetworkStaticLibTests
Bug: 263219497
Change-Id: Iadcdcedac1f1da7d894e03b76b3e985f87ca8b0e
This updates the ringbuffer and program helpers to allow specifying
which platform builds they are ignored on. In order to use this, you
must specify a min loader version >= 0.32, so the helpers also add
options for setting this at the program/ringbuf level.
Bug: 246985031
Test: tethering build & install, full platform build & install
Change-Id: I6bf9f7945c3fbac8fd4e02b5805016ac275b7884
see kernel's
samples/bpf/bpf_helpers.h
or
tools/testing/selftests/bpf/bpf_legacy.h
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Id331fb9abcd87df8bf87c5a86749acf0144ffbde
This is basically a no-op, but will make future compatibility checks easier.
The programs/maps already won't load on a bpfloader outside of
this range, as the entire .o will be skipped.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I0669c7ff9e04e24a8da68aa821c9ad705a8f5a93
Add this interface so that CS can tell netd the network is allowed for
the given UID ranges.
Freeze AIDL to v13.
Test: netd_integration_test
Change-Id: I00c45a663dc917fc0ba4da5a99828edad1562d8c
no need to use U32, of which uses I'd like to eliminate wherever possible
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I8c0a2df73c4153b21d33ee7a8f5d434f0fc80103
This is a helper function that lets a caller make sure the
side effects of a piece of code are visible both on a handler
thread and in the caller thread before continuing.
Also move HandlerUtilsTests to the tests directory of
frameworks/libs/net from the NetworkStack where it used to be
Test: NetworkStaticLibTests
Change-Id: Icf1bd8bbe1216777c52b73cfbd0a46b647b72260
Since this is an array from 32 bit int to 64 bit int,
the S32/U32 distinction doesn't matter before we hit
a bitmap with 2 billion entries, ie. 128 billion bits,
taking up 16GiB of RAM...
But S32 is a native java int, while U32 requires long.
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I5b06e80e801e007bafb18693647d968cba905c36
(this should avoid kernel reading/writing from out of bounds)
Test: TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I71fe71eee4e4e6a917477eef5fd2266439e803f3
It's useful for the java code to have the overload methods for
eventuallyExpect and expectAvailableCallbacks.
Bug: 231749077
Test: atest CtsHostsideNetworkTests:HostsideVpnTests
Change-Id: I6bb1385ee84d1ff1e9f0472e6de3f452ab142958
This commit updates netd_aidl_interface to support
migrating IPsec tunnel mode SA to different source
and destination addresses.
server/aidl_api/netd_aidl_interface/12/ are generated
by "m netd_aidl_interface-freeze-api"
Bug: 169170985
Test: atest netd_integration_test (new tests)
Change-Id: I89b54272c1528f12e6351819e0efe666af7a2946
This feature allows skipping a program or map based on the type of the
build. This allows things like userdebug-only programs.
Bug: 246985031
Test: added test program and watched it skipped on userdebug
Change-Id: I5cd9725ad8f133c98c86e6ba620a266313055157
Move code to common lib to support coming TCP socket polling
design in connectivity module to prevent code duplication.
Bug: 259000745
Test: atest FrameworksNetTests
Change-Id: I89ca1c19122c3b4306b93a6a253e0ea67259eb77