ホーム › NetworkManagement.WindowsFilteringPlatform › IKEEXT_POLICY1
IKEEXT_POLICY1
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| softExpirationTime | DWORD | 4 | +0 | +0 | IPsec ソフト SA の有効期間(秒単位)。呼び出し元はこれを 0 に設定しなければなりません。 |
| numAuthenticationMethods | DWORD | 4 | +4 | +4 | 認証方法の数。 |
| authenticationMethods | IKEEXT_AUTHENTICATION_METHOD1* | 8/4 | +8 | +8 | 受け入れ可能な認証方法の配列。 詳細については IKEEXT_AUTHENTICATION_METHOD1 を参照してください。 |
| initiatorImpersonationType | IKEEXT_AUTHENTICATION_IMPERSONATION_TYPE | 4 | +16 | +12 | 偽装の種類。AuthIP にのみ適用されます。 詳細については IKEEXT_AUTHENTICATION_IMPERSONATION_TYPE を参照してください。 |
| numIkeProposals | DWORD | 4 | +20 | +16 | メイン モード プロポーザルの数。 |
| ikeProposals | IKEEXT_PROPOSAL0* | 8/4 | +24 | +20 | メイン モード プロポーザルの配列。 詳細については IKEEXT_PROPOSAL0 を参照してください。 |
| flags | IKEEXT_POLICY_FLAG | 4 | +32 | +24 | 次の値の組み合わせです。 |
| maxDynamicFilters | DWORD | 4 | +36 | +28 | このポリシーを使用してネゴシエートされる SA に対して追加できる、 リモート IP アドレスごとおよびトランスポート層ごとの 動的 IPsec フィルターの最大数。 動的フィルターの追加を無効にするには、これを 0 に設定します。動的フィルターは、開始側が提案した QM トラフィックが応答側のトラフィック構成のサブセットである場合に、応答側の IKE/AuthIP によって追加されます。 |
| retransmitDurationSecs | DWORD | 4 | +40 | +32 | SA がタイムアウトするまでに IKEv2 SA ネゴシエーション パケットが再送信される秒数。呼び出し元はこれを 120 秒以上に設定しなければなりません。 |
公式ドキュメント
IKEEXT_POLICY1 構造体は、IKE/AuthIP のメイン モード ネゴシエーション ポリシーを格納するために使用されます。 IKEEXT_POLICY0 が利用可能です。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// IKEEXT_POLICY1 (x64 48 / x86 36 バイト)
typedef struct IKEEXT_POLICY1 {
DWORD softExpirationTime;
DWORD numAuthenticationMethods;
IKEEXT_AUTHENTICATION_METHOD1* authenticationMethods;
IKEEXT_AUTHENTICATION_IMPERSONATION_TYPE initiatorImpersonationType;
DWORD numIkeProposals;
IKEEXT_PROPOSAL0* ikeProposals;
IKEEXT_POLICY_FLAG flags;
DWORD maxDynamicFilters;
DWORD retransmitDurationSecs;
} IKEEXT_POLICY1;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IKEEXT_POLICY1
{
public uint softExpirationTime;
public uint numAuthenticationMethods;
public IntPtr authenticationMethods;
public int initiatorImpersonationType;
public uint numIkeProposals;
public IntPtr ikeProposals;
public uint flags;
public uint maxDynamicFilters;
public uint retransmitDurationSecs;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IKEEXT_POLICY1
Public softExpirationTime As UInteger
Public numAuthenticationMethods As UInteger
Public authenticationMethods As IntPtr
Public initiatorImpersonationType As Integer
Public numIkeProposals As UInteger
Public ikeProposals As IntPtr
Public flags As UInteger
Public maxDynamicFilters As UInteger
Public retransmitDurationSecs As UInteger
End Structureimport ctypes
from ctypes import wintypes
class IKEEXT_POLICY1(ctypes.Structure):
_fields_ = [
("softExpirationTime", wintypes.DWORD),
("numAuthenticationMethods", wintypes.DWORD),
("authenticationMethods", ctypes.c_void_p),
("initiatorImpersonationType", ctypes.c_int),
("numIkeProposals", wintypes.DWORD),
("ikeProposals", ctypes.c_void_p),
("flags", wintypes.DWORD),
("maxDynamicFilters", wintypes.DWORD),
("retransmitDurationSecs", wintypes.DWORD),
]#[repr(C)]
pub struct IKEEXT_POLICY1 {
pub softExpirationTime: u32,
pub numAuthenticationMethods: u32,
pub authenticationMethods: *mut core::ffi::c_void,
pub initiatorImpersonationType: i32,
pub numIkeProposals: u32,
pub ikeProposals: *mut core::ffi::c_void,
pub flags: u32,
pub maxDynamicFilters: u32,
pub retransmitDurationSecs: u32,
}import "golang.org/x/sys/windows"
type IKEEXT_POLICY1 struct {
softExpirationTime uint32
numAuthenticationMethods uint32
authenticationMethods uintptr
initiatorImpersonationType int32
numIkeProposals uint32
ikeProposals uintptr
flags uint32
maxDynamicFilters uint32
retransmitDurationSecs uint32
}type
IKEEXT_POLICY1 = record
softExpirationTime: DWORD;
numAuthenticationMethods: DWORD;
authenticationMethods: Pointer;
initiatorImpersonationType: Integer;
numIkeProposals: DWORD;
ikeProposals: Pointer;
flags: DWORD;
maxDynamicFilters: DWORD;
retransmitDurationSecs: DWORD;
end;const IKEEXT_POLICY1 = extern struct {
softExpirationTime: u32,
numAuthenticationMethods: u32,
authenticationMethods: ?*anyopaque,
initiatorImpersonationType: i32,
numIkeProposals: u32,
ikeProposals: ?*anyopaque,
flags: u32,
maxDynamicFilters: u32,
retransmitDurationSecs: u32,
};type
IKEEXT_POLICY1 {.bycopy.} = object
softExpirationTime: uint32
numAuthenticationMethods: uint32
authenticationMethods: pointer
initiatorImpersonationType: int32
numIkeProposals: uint32
ikeProposals: pointer
flags: uint32
maxDynamicFilters: uint32
retransmitDurationSecs: uint32struct IKEEXT_POLICY1
{
uint softExpirationTime;
uint numAuthenticationMethods;
void* authenticationMethods;
int initiatorImpersonationType;
uint numIkeProposals;
void* ikeProposals;
uint flags;
uint maxDynamicFilters;
uint retransmitDurationSecs;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; IKEEXT_POLICY1 サイズ: 36 バイト(x86)
dim st, 9 ; 4byte整数×9(構造体サイズ 36 / 4 切り上げ)
; softExpirationTime : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; numAuthenticationMethods : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; authenticationMethods : IKEEXT_AUTHENTICATION_METHOD1* (+8, 4byte) varptr(st)+8 を基点に操作(4byte:入れ子/配列)
; initiatorImpersonationType : IKEEXT_AUTHENTICATION_IMPERSONATION_TYPE (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; numIkeProposals : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ikeProposals : IKEEXT_PROPOSAL0* (+20, 4byte) varptr(st)+20 を基点に操作(4byte:入れ子/配列)
; flags : IKEEXT_POLICY_FLAG (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; maxDynamicFilters : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; retransmitDurationSecs : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; IKEEXT_POLICY1 サイズ: 48 バイト(x64)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; softExpirationTime : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; numAuthenticationMethods : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; authenticationMethods : IKEEXT_AUTHENTICATION_METHOD1* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; initiatorImpersonationType : IKEEXT_AUTHENTICATION_IMPERSONATION_TYPE (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; numIkeProposals : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ikeProposals : IKEEXT_PROPOSAL0* (+24, 8byte) varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; flags : IKEEXT_POLICY_FLAG (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; maxDynamicFilters : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; retransmitDurationSecs : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global IKEEXT_POLICY1
#field int softExpirationTime
#field int numAuthenticationMethods
#field intptr authenticationMethods
#field int initiatorImpersonationType
#field int numIkeProposals
#field intptr ikeProposals
#field int flags
#field int maxDynamicFilters
#field int retransmitDurationSecs
#endstruct
stdim st, IKEEXT_POLICY1 ; NSTRUCT 変数を確保
st->softExpirationTime = 100
mes "softExpirationTime=" + st->softExpirationTime