1// Signature format: 2.0 2package android.net.eap { 3 4 public final class EapAkaInfo extends android.net.eap.EapInfo { 5 method @Nullable public byte[] getReauthId(); 6 } 7 8 public static final class EapAkaInfo.Builder { 9 ctor public EapAkaInfo.Builder(); 10 method @NonNull public android.net.eap.EapAkaInfo build(); 11 method @NonNull public android.net.eap.EapAkaInfo.Builder setReauthId(@NonNull byte[]); 12 } 13 14 public abstract class EapInfo { 15 method public final int getEapMethodType(); 16 } 17 18 public final class EapSessionConfig { 19 method @Nullable public android.net.eap.EapSessionConfig.EapAkaConfig getEapAkaConfig(); 20 method @Nullable public android.net.eap.EapSessionConfig.EapAkaPrimeConfig getEapAkaPrimeConfig(); 21 method @NonNull public byte[] getEapIdentity(); 22 method @Nullable public android.net.eap.EapSessionConfig.EapMsChapV2Config getEapMsChapV2Config(); 23 method @Nullable public android.net.eap.EapSessionConfig.EapSimConfig getEapSimConfig(); 24 method @Nullable public android.net.eap.EapSessionConfig.EapTtlsConfig getEapTtlsConfig(); 25 } 26 27 public static final class EapSessionConfig.Builder { 28 ctor public EapSessionConfig.Builder(); 29 method @NonNull public android.net.eap.EapSessionConfig build(); 30 method @NonNull public android.net.eap.EapSessionConfig.Builder setEapAkaConfig(int, int); 31 method @NonNull public android.net.eap.EapSessionConfig.Builder setEapAkaConfig(int, int, @NonNull android.net.eap.EapSessionConfig.EapAkaOption); 32 method @NonNull public android.net.eap.EapSessionConfig.Builder setEapAkaPrimeConfig(int, int, @NonNull String, boolean); 33 method @NonNull public android.net.eap.EapSessionConfig.Builder setEapIdentity(@NonNull byte[]); 34 method @NonNull public android.net.eap.EapSessionConfig.Builder setEapMsChapV2Config(@NonNull String, @NonNull String); 35 method @NonNull public android.net.eap.EapSessionConfig.Builder setEapSimConfig(int, int); 36 method @NonNull public android.net.eap.EapSessionConfig.Builder setEapTtlsConfig(@Nullable java.security.cert.X509Certificate, @NonNull android.net.eap.EapSessionConfig); 37 } 38 39 public static class EapSessionConfig.EapAkaConfig extends android.net.eap.EapSessionConfig.EapMethodConfig { 40 method public int getAppType(); 41 method @NonNull public android.net.eap.EapSessionConfig.EapAkaOption getEapAkaOption(); 42 method public int getSubId(); 43 } 44 45 public static final class EapSessionConfig.EapAkaOption { 46 method @Nullable public byte[] getReauthId(); 47 } 48 49 public static final class EapSessionConfig.EapAkaOption.Builder { 50 ctor public EapSessionConfig.EapAkaOption.Builder(); 51 method @NonNull public android.net.eap.EapSessionConfig.EapAkaOption build(); 52 method @NonNull public android.net.eap.EapSessionConfig.EapAkaOption.Builder setReauthId(@NonNull byte[]); 53 } 54 55 public static class EapSessionConfig.EapAkaPrimeConfig extends android.net.eap.EapSessionConfig.EapAkaConfig { 56 method public boolean allowsMismatchedNetworkNames(); 57 method @NonNull public String getNetworkName(); 58 } 59 60 public abstract static class EapSessionConfig.EapMethodConfig { 61 method public int getMethodType(); 62 field public static final int EAP_TYPE_AKA = 23; // 0x17 63 field public static final int EAP_TYPE_AKA_PRIME = 50; // 0x32 64 field public static final int EAP_TYPE_MSCHAP_V2 = 26; // 0x1a 65 field public static final int EAP_TYPE_SIM = 18; // 0x12 66 field public static final int EAP_TYPE_TTLS = 21; // 0x15 67 } 68 69 public static class EapSessionConfig.EapMsChapV2Config extends android.net.eap.EapSessionConfig.EapMethodConfig { 70 method @NonNull public String getPassword(); 71 method @NonNull public String getUsername(); 72 } 73 74 public static class EapSessionConfig.EapSimConfig extends android.net.eap.EapSessionConfig.EapMethodConfig { 75 method public int getAppType(); 76 method public int getSubId(); 77 } 78 79 public static class EapSessionConfig.EapTtlsConfig extends android.net.eap.EapSessionConfig.EapMethodConfig { 80 method @NonNull public android.net.eap.EapSessionConfig getInnerEapSessionConfig(); 81 method @Nullable public java.security.cert.X509Certificate getServerCaCert(); 82 } 83 84} 85 86package android.net.ipsec.ike { 87 88 public final class ChildSaProposal extends android.net.ipsec.ike.SaProposal { 89 method @NonNull public static java.util.Set<java.lang.Integer> getSupportedEncryptionAlgorithms(); 90 method @NonNull public static java.util.Set<java.lang.Integer> getSupportedIntegrityAlgorithms(); 91 } 92 93 public static final class ChildSaProposal.Builder { 94 ctor public ChildSaProposal.Builder(); 95 method @NonNull public android.net.ipsec.ike.ChildSaProposal.Builder addDhGroup(int); 96 method @NonNull public android.net.ipsec.ike.ChildSaProposal.Builder addEncryptionAlgorithm(int, int); 97 method @NonNull public android.net.ipsec.ike.ChildSaProposal.Builder addIntegrityAlgorithm(int); 98 method @NonNull public android.net.ipsec.ike.ChildSaProposal build(); 99 } 100 101 public interface ChildSessionCallback { 102 method public void onClosed(); 103 method public default void onClosedWithException(@NonNull android.net.ipsec.ike.exceptions.IkeException); 104 method public void onIpSecTransformCreated(@NonNull android.net.IpSecTransform, int); 105 method public void onIpSecTransformDeleted(@NonNull android.net.IpSecTransform, int); 106 method public void onOpened(@NonNull android.net.ipsec.ike.ChildSessionConfiguration); 107 } 108 109 public final class ChildSessionConfiguration { 110 method @NonNull public java.util.List<android.net.ipsec.ike.IkeTrafficSelector> getInboundTrafficSelectors(); 111 method @NonNull public java.util.List<android.net.ipsec.ike.IkeTrafficSelector> getOutboundTrafficSelectors(); 112 } 113 114 public static final class ChildSessionConfiguration.Builder { 115 ctor public ChildSessionConfiguration.Builder(@NonNull java.util.List<android.net.ipsec.ike.IkeTrafficSelector>, @NonNull java.util.List<android.net.ipsec.ike.IkeTrafficSelector>); 116 method @NonNull public android.net.ipsec.ike.ChildSessionConfiguration build(); 117 } 118 119 public abstract class ChildSessionParams { 120 method @NonNull public java.util.List<android.net.ipsec.ike.ChildSaProposal> getChildSaProposals(); 121 method @IntRange(from=0x12c, to=0x3840) public int getHardLifetimeSeconds(); 122 method @NonNull public java.util.List<android.net.ipsec.ike.IkeTrafficSelector> getInboundTrafficSelectors(); 123 method @NonNull public java.util.List<android.net.ipsec.ike.IkeTrafficSelector> getOutboundTrafficSelectors(); 124 method @IntRange(from=0x78, to=0x3840) public int getSoftLifetimeSeconds(); 125 } 126 127 public final class IkeDerAsn1DnIdentification extends android.net.ipsec.ike.IkeIdentification { 128 ctor public IkeDerAsn1DnIdentification(@NonNull javax.security.auth.x500.X500Principal); 129 field @NonNull public final javax.security.auth.x500.X500Principal derAsn1Dn; 130 } 131 132 public class IkeFqdnIdentification extends android.net.ipsec.ike.IkeIdentification { 133 ctor public IkeFqdnIdentification(@NonNull String); 134 field @NonNull public final String fqdn; 135 } 136 137 public abstract class IkeIdentification { 138 } 139 140 public final class IkeIpv4AddrIdentification extends android.net.ipsec.ike.IkeIdentification { 141 ctor public IkeIpv4AddrIdentification(@NonNull java.net.Inet4Address); 142 field @NonNull public final java.net.Inet4Address ipv4Address; 143 } 144 145 public class IkeIpv6AddrIdentification extends android.net.ipsec.ike.IkeIdentification { 146 ctor public IkeIpv6AddrIdentification(@NonNull java.net.Inet6Address); 147 field @NonNull public final java.net.Inet6Address ipv6Address; 148 } 149 150 public final class IkeKeyIdIdentification extends android.net.ipsec.ike.IkeIdentification { 151 ctor public IkeKeyIdIdentification(@NonNull byte[]); 152 field @NonNull public final byte[] keyId; 153 } 154 155 public final class IkeRfc822AddrIdentification extends android.net.ipsec.ike.IkeIdentification { 156 ctor public IkeRfc822AddrIdentification(@NonNull String); 157 field @NonNull public final String rfc822Name; 158 } 159 160 public final class IkeSaProposal extends android.net.ipsec.ike.SaProposal { 161 method @NonNull public java.util.List<java.lang.Integer> getPseudorandomFunctions(); 162 method @NonNull public static java.util.Set<java.lang.Integer> getSupportedEncryptionAlgorithms(); 163 method @NonNull public static java.util.Set<java.lang.Integer> getSupportedIntegrityAlgorithms(); 164 method @NonNull public static java.util.Set<java.lang.Integer> getSupportedPseudorandomFunctions(); 165 } 166 167 public static final class IkeSaProposal.Builder { 168 ctor public IkeSaProposal.Builder(); 169 method @NonNull public android.net.ipsec.ike.IkeSaProposal.Builder addDhGroup(int); 170 method @NonNull public android.net.ipsec.ike.IkeSaProposal.Builder addEncryptionAlgorithm(int, int); 171 method @NonNull public android.net.ipsec.ike.IkeSaProposal.Builder addIntegrityAlgorithm(int); 172 method @NonNull public android.net.ipsec.ike.IkeSaProposal.Builder addPseudorandomFunction(int); 173 method @NonNull public android.net.ipsec.ike.IkeSaProposal build(); 174 } 175 176 public final class IkeSession implements java.lang.AutoCloseable { 177 ctor public IkeSession(@NonNull android.content.Context, @NonNull android.net.ipsec.ike.IkeSessionParams, @NonNull android.net.ipsec.ike.ChildSessionParams, @NonNull java.util.concurrent.Executor, @NonNull android.net.ipsec.ike.IkeSessionCallback, @NonNull android.net.ipsec.ike.ChildSessionCallback); 178 method public void close(); 179 method public void closeChildSession(@NonNull android.net.ipsec.ike.ChildSessionCallback); 180 method @FlaggedApi("com.android.ipsec.flags.dumpsys_api") public void dump(@NonNull java.io.PrintWriter); 181 method public void finalize(); 182 method public void kill(); 183 method public void openChildSession(@NonNull android.net.ipsec.ike.ChildSessionParams, @NonNull android.net.ipsec.ike.ChildSessionCallback); 184 } 185 186 public interface IkeSessionCallback { 187 method public void onClosed(); 188 method public default void onClosedWithException(@NonNull android.net.ipsec.ike.exceptions.IkeException); 189 method public default void onError(@NonNull android.net.ipsec.ike.exceptions.IkeException); 190 method public void onOpened(@NonNull android.net.ipsec.ike.IkeSessionConfiguration); 191 } 192 193 public final class IkeSessionConfiguration { 194 method @Nullable public android.net.eap.EapInfo getEapInfo(); 195 method @NonNull public android.net.ipsec.ike.IkeSessionConnectionInfo getIkeSessionConnectionInfo(); 196 method @NonNull public String getRemoteApplicationVersion(); 197 method @NonNull public java.util.List<byte[]> getRemoteVendorIds(); 198 method public boolean isIkeExtensionEnabled(int); 199 field public static final int EXTENSION_TYPE_FRAGMENTATION = 1; // 0x1 200 field public static final int EXTENSION_TYPE_MOBIKE = 2; // 0x2 201 } 202 203 public static final class IkeSessionConfiguration.Builder { 204 ctor public IkeSessionConfiguration.Builder(@NonNull android.net.ipsec.ike.IkeSessionConnectionInfo); 205 method @NonNull public android.net.ipsec.ike.IkeSessionConfiguration.Builder addIkeExtension(int); 206 method @NonNull public android.net.ipsec.ike.IkeSessionConfiguration.Builder addRemoteVendorId(@NonNull byte[]); 207 method @NonNull public android.net.ipsec.ike.IkeSessionConfiguration build(); 208 method @NonNull public android.net.ipsec.ike.IkeSessionConfiguration.Builder clearIkeExtensions(); 209 method @NonNull public android.net.ipsec.ike.IkeSessionConfiguration.Builder clearRemoteApplicationVersion(); 210 method @NonNull public android.net.ipsec.ike.IkeSessionConfiguration.Builder clearRemoteVendorIds(); 211 method @NonNull public android.net.ipsec.ike.IkeSessionConfiguration.Builder setEapInfo(@Nullable android.net.eap.EapInfo); 212 method @NonNull public android.net.ipsec.ike.IkeSessionConfiguration.Builder setRemoteApplicationVersion(@NonNull String); 213 } 214 215 public final class IkeSessionConnectionInfo { 216 ctor public IkeSessionConnectionInfo(@NonNull java.net.InetAddress, @NonNull java.net.InetAddress, @NonNull android.net.Network); 217 method @NonNull public java.net.InetAddress getLocalAddress(); 218 method @NonNull public android.net.Network getNetwork(); 219 method @NonNull public java.net.InetAddress getRemoteAddress(); 220 } 221 222 public final class IkeSessionParams { 223 method @IntRange(from=0x14) public int getDpdDelaySeconds(); 224 method @IntRange(from=0x12c, to=0x15180) public int getHardLifetimeSeconds(); 225 method @FlaggedApi("com.android.ipsec.flags.enabled_ike_options_api") @NonNull public java.util.Set<java.lang.Integer> getIkeOptions(); 226 method @NonNull public java.util.List<android.net.ipsec.ike.IkeSaProposal> getIkeSaProposals(); 227 method @NonNull public android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig getLocalAuthConfig(); 228 method @NonNull public android.net.ipsec.ike.IkeIdentification getLocalIdentification(); 229 method @IntRange(from=0xa, to=0xe10) public int getNattKeepAliveDelaySeconds(); 230 method @Nullable public android.net.Network getNetwork(); 231 method @NonNull public android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig getRemoteAuthConfig(); 232 method @NonNull public android.net.ipsec.ike.IkeIdentification getRemoteIdentification(); 233 method @NonNull public int[] getRetransmissionTimeoutsMillis(); 234 method @NonNull public String getServerHostname(); 235 method @IntRange(from=0x78, to=0x15180) public int getSoftLifetimeSeconds(); 236 method public boolean hasIkeOption(int); 237 field @FlaggedApi("com.android.ipsec.flags.dpd_disable_api") public static final int IKE_DPD_DELAY_SEC_DISABLED = 2147483647; // 0x7fffffff 238 field public static final int IKE_OPTION_ACCEPT_ANY_REMOTE_ID = 0; // 0x0 239 field public static final int IKE_OPTION_EAP_ONLY_AUTH = 1; // 0x1 240 field public static final int IKE_OPTION_FORCE_PORT_4500 = 3; // 0x3 241 field public static final int IKE_OPTION_INITIAL_CONTACT = 4; // 0x4 242 field public static final int IKE_OPTION_MOBIKE = 2; // 0x2 243 } 244 245 public static final class IkeSessionParams.Builder { 246 ctor public IkeSessionParams.Builder(); 247 ctor public IkeSessionParams.Builder(@NonNull android.net.ipsec.ike.IkeSessionParams); 248 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder addIkeOption(int); 249 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder addIkeSaProposal(@NonNull android.net.ipsec.ike.IkeSaProposal); 250 method @NonNull public android.net.ipsec.ike.IkeSessionParams build(); 251 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder removeIkeOption(int); 252 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setAuthDigitalSignature(@Nullable java.security.cert.X509Certificate, @NonNull java.security.cert.X509Certificate, @NonNull java.security.PrivateKey); 253 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setAuthDigitalSignature(@Nullable java.security.cert.X509Certificate, @NonNull java.security.cert.X509Certificate, @NonNull java.util.List<java.security.cert.X509Certificate>, @NonNull java.security.PrivateKey); 254 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setAuthEap(@Nullable java.security.cert.X509Certificate, @NonNull android.net.eap.EapSessionConfig); 255 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setAuthPsk(@NonNull byte[]); 256 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setDpdDelaySeconds(@IntRange(from=0x14) int); 257 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setLifetimeSeconds(@IntRange(from=0x12c, to=0x15180) int, @IntRange(from=0x78, to=0x15180) int); 258 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setLocalIdentification(@NonNull android.net.ipsec.ike.IkeIdentification); 259 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setNattKeepAliveDelaySeconds(@IntRange(from=0xa, to=0xe10) int); 260 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setNetwork(@Nullable android.net.Network); 261 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setRemoteIdentification(@NonNull android.net.ipsec.ike.IkeIdentification); 262 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setRetransmissionTimeoutsMillis(@NonNull int[]); 263 method @NonNull public android.net.ipsec.ike.IkeSessionParams.Builder setServerHostname(@NonNull String); 264 } 265 266 public abstract static class IkeSessionParams.IkeAuthConfig { 267 } 268 269 public static class IkeSessionParams.IkeAuthDigitalSignLocalConfig extends android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig { 270 method @NonNull public java.security.cert.X509Certificate getClientEndCertificate(); 271 method @NonNull public java.util.List<java.security.cert.X509Certificate> getIntermediateCertificates(); 272 method @NonNull public java.security.PrivateKey getPrivateKey(); 273 } 274 275 public static class IkeSessionParams.IkeAuthDigitalSignRemoteConfig extends android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig { 276 method @Nullable public java.security.cert.X509Certificate getRemoteCaCert(); 277 } 278 279 public static class IkeSessionParams.IkeAuthEapConfig extends android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig { 280 method @NonNull public android.net.eap.EapSessionConfig getEapConfig(); 281 } 282 283 public static class IkeSessionParams.IkeAuthPskConfig extends android.net.ipsec.ike.IkeSessionParams.IkeAuthConfig { 284 method @NonNull public byte[] getPsk(); 285 } 286 287 public final class IkeTrafficSelector { 288 ctor public IkeTrafficSelector(int, int, @NonNull java.net.InetAddress, @NonNull java.net.InetAddress); 289 field public final int endPort; 290 field @NonNull public final java.net.InetAddress endingAddress; 291 field public final int startPort; 292 field @NonNull public final java.net.InetAddress startingAddress; 293 } 294 295 public final class IkeTunnelConnectionParams { 296 ctor public IkeTunnelConnectionParams(@NonNull android.net.ipsec.ike.IkeSessionParams, @NonNull android.net.ipsec.ike.TunnelModeChildSessionParams); 297 method @NonNull public android.net.ipsec.ike.IkeSessionParams getIkeSessionParams(); 298 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams getTunnelModeChildSessionParams(); 299 } 300 301 public abstract class SaProposal { 302 method @NonNull public java.util.List<java.lang.Integer> getDhGroups(); 303 method @NonNull public java.util.List<android.util.Pair<java.lang.Integer,java.lang.Integer>> getEncryptionAlgorithms(); 304 method @NonNull public java.util.List<java.lang.Integer> getIntegrityAlgorithms(); 305 method @NonNull public static java.util.Set<java.lang.Integer> getSupportedDhGroups(); 306 field public static final int DH_GROUP_1024_BIT_MODP = 2; // 0x2 307 field public static final int DH_GROUP_1536_BIT_MODP = 5; // 0x5 308 field public static final int DH_GROUP_2048_BIT_MODP = 14; // 0xe 309 field public static final int DH_GROUP_3072_BIT_MODP = 15; // 0xf 310 field public static final int DH_GROUP_4096_BIT_MODP = 16; // 0x10 311 field public static final int DH_GROUP_CURVE_25519 = 31; // 0x1f 312 field public static final int DH_GROUP_NONE = 0; // 0x0 313 field public static final int ENCRYPTION_ALGORITHM_3DES = 3; // 0x3 314 field public static final int ENCRYPTION_ALGORITHM_AES_CBC = 12; // 0xc 315 field public static final int ENCRYPTION_ALGORITHM_AES_CTR = 13; // 0xd 316 field public static final int ENCRYPTION_ALGORITHM_AES_GCM_12 = 19; // 0x13 317 field public static final int ENCRYPTION_ALGORITHM_AES_GCM_16 = 20; // 0x14 318 field public static final int ENCRYPTION_ALGORITHM_AES_GCM_8 = 18; // 0x12 319 field public static final int ENCRYPTION_ALGORITHM_CHACHA20_POLY1305 = 28; // 0x1c 320 field public static final int INTEGRITY_ALGORITHM_AES_CMAC_96 = 8; // 0x8 321 field public static final int INTEGRITY_ALGORITHM_AES_XCBC_96 = 5; // 0x5 322 field public static final int INTEGRITY_ALGORITHM_HMAC_SHA1_96 = 2; // 0x2 323 field public static final int INTEGRITY_ALGORITHM_HMAC_SHA2_256_128 = 12; // 0xc 324 field public static final int INTEGRITY_ALGORITHM_HMAC_SHA2_384_192 = 13; // 0xd 325 field public static final int INTEGRITY_ALGORITHM_HMAC_SHA2_512_256 = 14; // 0xe 326 field public static final int INTEGRITY_ALGORITHM_NONE = 0; // 0x0 327 field public static final int KEY_LEN_AES_128 = 128; // 0x80 328 field public static final int KEY_LEN_AES_192 = 192; // 0xc0 329 field public static final int KEY_LEN_AES_256 = 256; // 0x100 330 field public static final int KEY_LEN_UNUSED = 0; // 0x0 331 field public static final int PSEUDORANDOM_FUNCTION_AES128_CMAC = 8; // 0x8 332 field public static final int PSEUDORANDOM_FUNCTION_AES128_XCBC = 4; // 0x4 333 field public static final int PSEUDORANDOM_FUNCTION_HMAC_SHA1 = 2; // 0x2 334 field public static final int PSEUDORANDOM_FUNCTION_SHA2_256 = 5; // 0x5 335 field public static final int PSEUDORANDOM_FUNCTION_SHA2_384 = 6; // 0x6 336 field public static final int PSEUDORANDOM_FUNCTION_SHA2_512 = 7; // 0x7 337 } 338 339 public final class TransportModeChildSessionParams extends android.net.ipsec.ike.ChildSessionParams { 340 } 341 342 public static final class TransportModeChildSessionParams.Builder { 343 ctor public TransportModeChildSessionParams.Builder(); 344 ctor public TransportModeChildSessionParams.Builder(@NonNull android.net.ipsec.ike.TransportModeChildSessionParams); 345 method @NonNull public android.net.ipsec.ike.TransportModeChildSessionParams.Builder addChildSaProposal(@NonNull android.net.ipsec.ike.ChildSaProposal); 346 method @NonNull public android.net.ipsec.ike.TransportModeChildSessionParams.Builder addInboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); 347 method @NonNull public android.net.ipsec.ike.TransportModeChildSessionParams.Builder addOutboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); 348 method @NonNull public android.net.ipsec.ike.TransportModeChildSessionParams build(); 349 method @NonNull public android.net.ipsec.ike.TransportModeChildSessionParams.Builder setLifetimeSeconds(@IntRange(from=0x12c, to=0x3840) int, @IntRange(from=0x78, to=0x3840) int); 350 } 351 352 public final class TunnelModeChildSessionParams extends android.net.ipsec.ike.ChildSessionParams { 353 method @NonNull public java.util.List<android.net.ipsec.ike.TunnelModeChildSessionParams.TunnelModeChildConfigRequest> getConfigurationRequests(); 354 } 355 356 public static final class TunnelModeChildSessionParams.Builder { 357 ctor public TunnelModeChildSessionParams.Builder(); 358 ctor public TunnelModeChildSessionParams.Builder(@NonNull android.net.ipsec.ike.TunnelModeChildSessionParams); 359 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addChildSaProposal(@NonNull android.net.ipsec.ike.ChildSaProposal); 360 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); 361 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalAddressRequest(int); 362 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalAddressRequest(@NonNull java.net.Inet4Address); 363 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalAddressRequest(@NonNull java.net.Inet6Address, int); 364 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalDhcpServerRequest(int); 365 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addInternalDnsServerRequest(int); 366 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder addOutboundTrafficSelectors(@NonNull android.net.ipsec.ike.IkeTrafficSelector); 367 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams build(); 368 method @NonNull public android.net.ipsec.ike.TunnelModeChildSessionParams.Builder setLifetimeSeconds(@IntRange(from=0x12c, to=0x3840) int, @IntRange(from=0x78, to=0x3840) int); 369 } 370 371 public static interface TunnelModeChildSessionParams.ConfigRequestIpv4Address extends android.net.ipsec.ike.TunnelModeChildSessionParams.TunnelModeChildConfigRequest { 372 method @Nullable public java.net.Inet4Address getAddress(); 373 } 374 375 public static interface TunnelModeChildSessionParams.ConfigRequestIpv4DhcpServer extends android.net.ipsec.ike.TunnelModeChildSessionParams.TunnelModeChildConfigRequest { 376 } 377 378 public static interface TunnelModeChildSessionParams.ConfigRequestIpv4DnsServer extends android.net.ipsec.ike.TunnelModeChildSessionParams.TunnelModeChildConfigRequest { 379 } 380 381 public static interface TunnelModeChildSessionParams.ConfigRequestIpv4Netmask extends android.net.ipsec.ike.TunnelModeChildSessionParams.TunnelModeChildConfigRequest { 382 } 383 384 public static interface TunnelModeChildSessionParams.ConfigRequestIpv6Address extends android.net.ipsec.ike.TunnelModeChildSessionParams.TunnelModeChildConfigRequest { 385 method @Nullable public java.net.Inet6Address getAddress(); 386 method public int getPrefixLength(); 387 } 388 389 public static interface TunnelModeChildSessionParams.ConfigRequestIpv6DnsServer extends android.net.ipsec.ike.TunnelModeChildSessionParams.TunnelModeChildConfigRequest { 390 } 391 392 public static interface TunnelModeChildSessionParams.TunnelModeChildConfigRequest { 393 } 394 395} 396 397package android.net.ipsec.ike.exceptions { 398 399 public abstract class IkeException extends java.lang.Exception { 400 } 401 402 public final class IkeIOException extends android.net.ipsec.ike.exceptions.IkeNonProtocolException { 403 ctor public IkeIOException(@NonNull java.io.IOException); 404 method @NonNull public java.io.IOException getCause(); 405 } 406 407 public final class IkeInternalException extends android.net.ipsec.ike.exceptions.IkeNonProtocolException { 408 ctor public IkeInternalException(@NonNull Throwable); 409 ctor public IkeInternalException(@NonNull String, @NonNull Throwable); 410 } 411 412 public final class IkeNetworkLostException extends android.net.ipsec.ike.exceptions.IkeNonProtocolException { 413 ctor public IkeNetworkLostException(@NonNull android.net.Network); 414 method @NonNull public android.net.Network getNetwork(); 415 } 416 417 public abstract class IkeNonProtocolException extends android.net.ipsec.ike.exceptions.IkeException { 418 } 419 420 public abstract class IkeProtocolException extends android.net.ipsec.ike.exceptions.IkeException { 421 method public int getErrorType(); 422 field public static final int ERROR_TYPE_AUTHENTICATION_FAILED = 24; // 0x18 423 field public static final int ERROR_TYPE_CHILD_SA_NOT_FOUND = 44; // 0x2c 424 field public static final int ERROR_TYPE_FAILED_CP_REQUIRED = 37; // 0x25 425 field public static final int ERROR_TYPE_INTERNAL_ADDRESS_FAILURE = 36; // 0x24 426 field public static final int ERROR_TYPE_INVALID_IKE_SPI = 4; // 0x4 427 field public static final int ERROR_TYPE_INVALID_KE_PAYLOAD = 17; // 0x11 428 field public static final int ERROR_TYPE_INVALID_MAJOR_VERSION = 5; // 0x5 429 field public static final int ERROR_TYPE_INVALID_MESSAGE_ID = 9; // 0x9 430 field public static final int ERROR_TYPE_INVALID_SELECTORS = 39; // 0x27 431 field public static final int ERROR_TYPE_INVALID_SYNTAX = 7; // 0x7 432 field public static final int ERROR_TYPE_NO_ADDITIONAL_SAS = 35; // 0x23 433 field public static final int ERROR_TYPE_NO_PROPOSAL_CHOSEN = 14; // 0xe 434 field public static final int ERROR_TYPE_SINGLE_PAIR_REQUIRED = 34; // 0x22 435 field public static final int ERROR_TYPE_TEMPORARY_FAILURE = 43; // 0x2b 436 field public static final int ERROR_TYPE_TS_UNACCEPTABLE = 38; // 0x26 437 field public static final int ERROR_TYPE_UNSUPPORTED_CRITICAL_PAYLOAD = 1; // 0x1 438 } 439 440 public final class IkeTimeoutException extends java.io.IOException { 441 ctor public IkeTimeoutException(@NonNull String); 442 } 443 444 public final class InvalidKeException extends android.net.ipsec.ike.exceptions.IkeProtocolException { 445 ctor public InvalidKeException(int); 446 method public int getDhGroup(); 447 } 448 449 public final class InvalidMajorVersionException extends android.net.ipsec.ike.exceptions.IkeProtocolException { 450 ctor public InvalidMajorVersionException(byte); 451 method public byte getMajorVersion(); 452 } 453 454 public final class InvalidSelectorsException extends android.net.ipsec.ike.exceptions.IkeProtocolException { 455 ctor public InvalidSelectorsException(int, @NonNull byte[]); 456 method @NonNull public byte[] getIpSecPacketInfo(); 457 method public int getIpSecSpi(); 458 } 459 460} 461 462