Added in API level 31

InvalidSelectorsException


class InvalidSelectorsException : IkeProtocolException

This exception is thrown if the remote server received an IPsec packet with mismatched selectors.

This exception indicates that the remote server received an IPsec packet whose selectors do not match those of the IPsec SA on which it was delivered. The error data contains the start of the offending packet (as in ICMP messages), which is the IP header plus the first 64 bits of the original datagram's data.

Summary

Inherited constants
Int ERROR_TYPE_AUTHENTICATION_FAILED

IKE authentication failed

Int ERROR_TYPE_CHILD_SA_NOT_FOUND

Child SA in the received packet does not exist

Int ERROR_TYPE_FAILED_CP_REQUIRED

Configuration Payload required but not found in IKE setup

Int ERROR_TYPE_INTERNAL_ADDRESS_FAILURE

No internal addresses can be assigned

Int ERROR_TYPE_INVALID_IKE_SPI

Unrecognized destination IKE SPI

Int ERROR_TYPE_INVALID_KE_PAYLOAD

Invalid Key Exchange Payload

Int ERROR_TYPE_INVALID_MAJOR_VERSION

Invalid major version

Int ERROR_TYPE_INVALID_MESSAGE_ID

Invalid message ID

Int ERROR_TYPE_INVALID_SELECTORS

An IPsec Packet was found to have mismatched Traffic Selectors of the IPsec SA on which it was delivered

Int ERROR_TYPE_INVALID_SYNTAX

Invalid syntax

Int ERROR_TYPE_NO_ADDITIONAL_SAS

No additional SAa are acceptable

Int ERROR_TYPE_NO_PROPOSAL_CHOSEN

No SA Proposal Chosen is acceptable

Int ERROR_TYPE_SINGLE_PAIR_REQUIRED

Only Traffic Selectors specifying a single pair of addresses are acceptable

Int ERROR_TYPE_TEMPORARY_FAILURE

Temporary failure

Int ERROR_TYPE_TS_UNACCEPTABLE

No Traffic Selectors are acceptable

Int ERROR_TYPE_UNSUPPORTED_CRITICAL_PAYLOAD

Unsupported critical payload

Public constructors

Construct an instance of InvalidSelectorsException.

Public methods
ByteArray

Returns the IP header plus the first 64 bits of the packet that has mismtached selectors.

Int

Returns the SPI of the IPsec SA that delivered the packet with mismtached selectors.

Inherited functions
Int getErrorType()

Returns the IKE protocol error type of this IkeProtocolException instance.

Public constructors

InvalidSelectorsException

Added in API level 31
InvalidSelectorsException(
    spi: Int,
    packetInfo: ByteArray)

Construct an instance of InvalidSelectorsException.

Except for testing, IKE library users normally do not instantiate this object themselves but instead get a reference via IkeSessionCallback or ChildSessionCallback

Parameters
spi Int: the SPI of the IPsec SA that delivered the packet with mismtached selectors.
packetInfo ByteArray: the IP header plus the first 64 bits of the packet that has mismtached selectors. This value cannot be null.

Public methods

getIpSecPacketInfo

Added in API level 31
fun getIpSecPacketInfo(): ByteArray

Returns the IP header plus the first 64 bits of the packet that has mismtached selectors.

Return
ByteArray This value cannot be null.

getIpSecSpi

Added in API level 31
fun getIpSecSpi(): Int

Returns the SPI of the IPsec SA that delivered the packet with mismtached selectors.