语言

IpSecManager.AllocateSecurityParameterIndex 方法

定义

重载

名称 说明
AllocateSecurityParameterIndex(InetAddress)

保留随机选择的安全参数索引(SPI)。

AllocateSecurityParameterIndex(InetAddress, Int32)

保留请求的安全参数索引(SPI)。

AllocateSecurityParameterIndex(InetAddress)

保留随机选择的安全参数索引(SPI)。

[Android.Runtime.Register("allocateSecurityParameterIndex", "(Ljava/net/InetAddress;)Landroid/net/IpSecManager$SecurityParameterIndex;", "GetAllocateSecurityParameterIndex_Ljava_net_InetAddress_Handler", ApiSince=28)]
public virtual Android.Net.IpSecManager.SecurityParameterIndex AllocateSecurityParameterIndex(Java.Net.InetAddress destinationAddress);
[<Android.Runtime.Register("allocateSecurityParameterIndex", "(Ljava/net/InetAddress;)Landroid/net/IpSecManager$SecurityParameterIndex;", "GetAllocateSecurityParameterIndex_Ljava_net_InetAddress_Handler", ApiSince=28)>]
abstract member AllocateSecurityParameterIndex : Java.Net.InetAddress -> Android.Net.IpSecManager.SecurityParameterIndex
override this.AllocateSecurityParameterIndex : Java.Net.InetAddress -> Android.Net.IpSecManager.SecurityParameterIndex

参数

destinationAddress
InetAddress

承载 SPI 的流量的目标。 对于入站流量,地址当前必须在设备上分配。

返回

保留的 SPI,在关闭之前仍可用。

特性

例外

为用户分配过多 SPIs 时引发。

注解

Java文档android.net.IpSecManager.allocateSecurityParameterIndex(java.net.InetAddress)。

适用于

AllocateSecurityParameterIndex(InetAddress, Int32)

保留请求的安全参数索引(SPI)。

[Android.Runtime.Register("allocateSecurityParameterIndex", "(Ljava/net/InetAddress;I)Landroid/net/IpSecManager$SecurityParameterIndex;", "GetAllocateSecurityParameterIndex_Ljava_net_InetAddress_IHandler", ApiSince=28)]
public virtual Android.Net.IpSecManager.SecurityParameterIndex AllocateSecurityParameterIndex(Java.Net.InetAddress destinationAddress, int requestedSpi);
[<Android.Runtime.Register("allocateSecurityParameterIndex", "(Ljava/net/InetAddress;I)Landroid/net/IpSecManager$SecurityParameterIndex;", "GetAllocateSecurityParameterIndex_Ljava_net_InetAddress_IHandler", ApiSince=28)>]
abstract member AllocateSecurityParameterIndex : Java.Net.InetAddress * int -> Android.Net.IpSecManager.SecurityParameterIndex
override this.AllocateSecurityParameterIndex : Java.Net.InetAddress * int -> Android.Net.IpSecManager.SecurityParameterIndex

参数

destinationAddress
InetAddress

承载 SPI 的流量的目标。 对于入站流量,地址当前必须在设备上分配。

requestedSpi
Int32

请求的 SPI。 值 1 到 255 是保留的,不能使用。

返回

保留的 SPI,在关闭之前仍可用。

特性

例外

为用户分配过多 SPIs 时引发。

当无法保留远程地址/SPI 对时引发。

注解

Java文档android.net.IpSecManager.allocateSecurityParameterIndex(java.net.InetAddress, int)。

适用于