IkeSessionConfiguration

public final class IkeSessionConfiguration
extends Object

java.lang.Object
   ↳ android.net.ipsec.ike.IkeSessionConfiguration


IkeSessionConfiguration represents the negotiated configuration for a IkeSession.

Configurations include remote application version and enabled IKE extensions.

Summary

Nested classes

class IkeSessionConfiguration.Builder

This class can be used to incrementally construct a IkeSessionConfiguration

Constants

int EXTENSION_TYPE_FRAGMENTATION

IKE Message Fragmentation

int EXTENSION_TYPE_MOBIKE

IKEv2 Mobility and Multihoming Protocol

Public methods

EapInfo getEapInfo()

Retrieves the EAP information.

IkeSessionConnectionInfo getIkeSessionConnectionInfo()

Returns the connection information.

String getRemoteApplicationVersion()

Gets remote (server) version information.

List<byte[]> getRemoteVendorIds()

Returns remote vendor IDs received during IKE Session setup.

boolean isIkeExtensionEnabled(int extensionType)

Checks if an IKE extension is enabled.

Inherited methods

Constants

EXTENSION_TYPE_FRAGMENTATION

Added in API level 31
public static final int EXTENSION_TYPE_FRAGMENTATION

IKE Message Fragmentation

Constant Value: 1 (0x00000001)

EXTENSION_TYPE_MOBIKE

Added in API level 31
public static final int EXTENSION_TYPE_MOBIKE

IKEv2 Mobility and Multihoming Protocol

Constant Value: 2 (0x00000002)

Public methods

getEapInfo

Added in API level 33
public EapInfo getEapInfo ()

Retrieves the EAP information.

Returns
EapInfo the EAP information provided by the server during EAP authentication (e.g. next re-authentication ID), or null if the server did not provide any information that will be useful after the authentication.

getIkeSessionConnectionInfo

Added in API level 31
public IkeSessionConnectionInfo getIkeSessionConnectionInfo ()

Returns the connection information.

Returns
IkeSessionConnectionInfo the IKE Session connection information. This value cannot be null.

getRemoteApplicationVersion

Added in API level 31
public String getRemoteApplicationVersion ()

Gets remote (server) version information.

Returns
String application version of the remote server, or an empty string if the remote server did not provide the application version. This value cannot be null.

getRemoteVendorIds

Added in API level 31
public List<byte[]> getRemoteVendorIds ()

Returns remote vendor IDs received during IKE Session setup.

According to the IKEv2 specification (RFC 7296), a vendor ID may indicate the sender is capable of accepting certain extensions to the protocol, or it may simply identify the implementation as an aid in debugging.

Returns
List<byte[]> the vendor IDs of the remote server, or an empty list if no vendor ID is received during IKE Session setup. This value cannot be null.

isIkeExtensionEnabled

Added in API level 31
public boolean isIkeExtensionEnabled (int extensionType)

Checks if an IKE extension is enabled.

An IKE extension is enabled when both sides can support it. This negotiation always happens in IKE initial exchanges (IKE INIT and IKE AUTH).

Parameters
extensionType int: the extension type. Value is EXTENSION_TYPE_FRAGMENTATION, or EXTENSION_TYPE_MOBIKE

Returns
boolean true if this extension is enabled.