Added implementation for VTI add/remove address
This change adds implementation details for add/remove addresses onto a VTI. Bug: 73675031 Test: New tests added, passing on Walleye Change-Id: Idde9d943a5285d2c13c5c6b0f7b8a9faf718e6a5
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
|
||||
package android.net;
|
||||
|
||||
import android.net.LinkAddress;
|
||||
import android.net.Network;
|
||||
import android.net.IpSecConfig;
|
||||
import android.net.IpSecUdpEncapResponse;
|
||||
@@ -48,11 +49,11 @@ interface IIpSecService
|
||||
|
||||
void addAddressToTunnelInterface(
|
||||
int tunnelResourceId,
|
||||
String localAddr);
|
||||
in LinkAddress localAddr);
|
||||
|
||||
void removeAddressFromTunnelInterface(
|
||||
int tunnelResourceId,
|
||||
String localAddr);
|
||||
in LinkAddress localAddr);
|
||||
|
||||
void deleteTunnelInterface(int resourceId);
|
||||
|
||||
|
||||
@@ -660,10 +660,14 @@ public final class IpSecManager {
|
||||
* tunneled traffic.
|
||||
*
|
||||
* @param address the local address for traffic inside the tunnel
|
||||
* @throws IOException if the address could not be added
|
||||
* @hide
|
||||
*/
|
||||
public void addAddress(LinkAddress address) throws IOException {
|
||||
public void addAddress(LinkAddress address) {
|
||||
try {
|
||||
mService.addAddressToTunnelInterface(mResourceId, address);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -672,10 +676,14 @@ public final class IpSecManager {
|
||||
* <p>Remove an address which was previously added to the IpSecTunnelInterface
|
||||
*
|
||||
* @param address to be removed
|
||||
* @throws IOException if the address could not be removed
|
||||
* @hide
|
||||
*/
|
||||
public void removeAddress(LinkAddress address) throws IOException {
|
||||
public void removeAddress(LinkAddress address) {
|
||||
try {
|
||||
mService.removeAddressFromTunnelInterface(mResourceId, address);
|
||||
} catch (RemoteException e) {
|
||||
throw e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
private IpSecTunnelInterface(@NonNull IIpSecService service,
|
||||
|
||||
Reference in New Issue
Block a user