From c4a5883fc51dadbccf2b6991d91189b8806b3ba9 Mon Sep 17 00:00:00 2001 From: evitayan Date: Mon, 11 Nov 2019 17:23:34 -0800 Subject: Expose IKE module API: IkeException, configuration & callback This commit updates system-current.txt to expose APIs including: - IkeException, IkeInternalException and IkeProtocolException - IkeSessionConfiguration and ChildSessionConfiguration - IkeSessionCallback and ChildSessionCallback Bug: 143983419 Test: make update-api && make Change-Id: I941be4dcbb31ef5781eb3f143c2211767b26f612 --- api/system-current.txt | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/api/system-current.txt b/api/system-current.txt index 31b187ded2ee..638f7783f27c 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -4286,6 +4286,23 @@ package android.net.ipsec.ike { method @NonNull public android.net.ipsec.ike.ChildSaProposal build(); } + public interface ChildSessionCallback { + method public void onClosed(); + method public void onClosedExceptionally(@NonNull android.net.ipsec.ike.exceptions.IkeException); + method public void onIpSecTransformCreated(@NonNull android.net.IpSecTransform, int); + method public void onIpSecTransformDeleted(@NonNull android.net.IpSecTransform, int); + method public void onOpened(@NonNull android.net.ipsec.ike.ChildSessionConfiguration); + } + + public final class ChildSessionConfiguration { + method @NonNull public java.util.List getInboundTrafficSelectors(); + method @NonNull public java.util.List getInternalAddresses(); + method @NonNull public java.util.List getInternalDhcpServers(); + method @NonNull public java.util.List getInternalDnsServers(); + method @NonNull public java.util.List getInternalSubnets(); + method @NonNull public java.util.List getOutboundTrafficSelectors(); + } + public class IkeFqdnIdentification extends android.net.ipsec.ike.IkeIdentification { ctor public IkeFqdnIdentification(@NonNull String); field @NonNull public final String fqdn; @@ -4327,6 +4344,21 @@ package android.net.ipsec.ike { method @NonNull public android.net.ipsec.ike.IkeSaProposal build(); } + public interface IkeSessionCallback { + method public void onClosed(); + method public void onClosedExceptionally(@NonNull android.net.ipsec.ike.exceptions.IkeException); + method public void onError(@NonNull android.net.ipsec.ike.exceptions.IkeProtocolException); + method public void onOpened(@NonNull android.net.ipsec.ike.IkeSessionConfiguration); + } + + public final class IkeSessionConfiguration { + ctor public IkeSessionConfiguration(); + method @NonNull public String getRemoteApplicationVersion(); + method public boolean isIkeExtensionEnabled(int); + field public static final int EXTENSION_TYPE_FRAGMENTATION = 1; // 0x1 + field public static final int EXTENSION_TYPE_MOBIKE = 2; // 0x2 + } + public final class IkeTrafficSelector { ctor public IkeTrafficSelector(int, int, @NonNull java.net.InetAddress, @NonNull java.net.InetAddress); field public final int endPort; @@ -4363,6 +4395,37 @@ package android.net.ipsec.ike { } +package android.net.ipsec.ike.exceptions { + + public abstract class IkeException extends java.lang.Exception { + } + + public final class IkeInternalException extends android.net.ipsec.ike.exceptions.IkeException { + } + + public abstract class IkeProtocolException extends android.net.ipsec.ike.exceptions.IkeException { + method @Nullable public byte[] getErrorData(); + method public int getErrorType(); + field public static final int ERROR_TYPE_AUTHENTICATION_FAILED = 24; // 0x18 + field public static final int ERROR_TYPE_CHILD_SA_NOT_FOUND = 44; // 0x2c + field public static final int ERROR_TYPE_FAILED_CP_REQUIRED = 37; // 0x25 + field public static final int ERROR_TYPE_INTERNAL_ADDRESS_FAILURE = 36; // 0x24 + field public static final int ERROR_TYPE_INVALID_IKE_SPI = 4; // 0x4 + field public static final int ERROR_TYPE_INVALID_KE_PAYLOAD = 17; // 0x11 + field public static final int ERROR_TYPE_INVALID_MAJOR_VERSION = 5; // 0x5 + field public static final int ERROR_TYPE_INVALID_MESSAGE_ID = 9; // 0x9 + field public static final int ERROR_TYPE_INVALID_SELECTORS = 39; // 0x27 + field public static final int ERROR_TYPE_INVALID_SYNTAX = 7; // 0x7 + field public static final int ERROR_TYPE_NO_ADDITIONAL_SAS = 35; // 0x23 + field public static final int ERROR_TYPE_NO_PROPOSAL_CHOSEN = 14; // 0xe + field public static final int ERROR_TYPE_SINGLE_PAIR_REQUIRED = 34; // 0x22 + field public static final int ERROR_TYPE_TEMPORARY_FAILURE = 43; // 0x2b + field public static final int ERROR_TYPE_TS_UNACCEPTABLE = 38; // 0x26 + field public static final int ERROR_TYPE_UNSUPPORTED_CRITICAL_PAYLOAD = 1; // 0x1 + } + +} + package android.net.metrics { public final class ApfProgramEvent implements android.net.metrics.IpConnectivityLog.Event { -- cgit v1.2.3-59-g8ed1b