IpSecManager.AllocateSecurityParameterIndex 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| 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 直到關閉為止。
- 屬性
例外狀況
當分配給使用者的 SPI 過多時會被丟棄。
備註
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 直到關閉為止。
- 屬性
例外狀況
當分配給使用者的 SPI 過多時會被丟棄。
當遠端位址/SPI 配對無法保留時,會拋出。
備註
Java 文件 android.net.IpSecManager.allocateSecurityParameterIndex(java.net.InetAddress, int)。