[KA05] Export keepalive offload api for IpSec Nat-T file descriptor

Adds system api of createSocketKeepalive to take file descriptor,
so privileged apps could use it without the need of IpSecService.

Bug: 114151147
Test: atest FrameworksNetTests
Change-Id: If926c21704b6ed73a0adfcadad732b97b42bacae
This commit is contained in:
junyulai
2019-01-15 11:32:44 +08:00
parent 4c95b08a23
commit d05a192fbe
6 changed files with 152 additions and 28 deletions

View File

@@ -3778,6 +3778,7 @@ public class ConnectivityServiceTest {
// TODO: 1. Move this outside of ConnectivityServiceTest.
// 2. Add helper function to test against newSingleThreadExecutor as well as inline
// executor.
// 3. Make test to verify that Nat-T keepalive socket is created by IpSecService.
final int srcPort = 12345;
final InetAddress myIPv4 = InetAddress.getByName("192.0.2.129");
final InetAddress notMyIPv4 = InetAddress.getByName("192.0.2.35");