ホーム › NetworkManagement.WindowsFilteringPlatform › IKEEXT_POLICY0
IKEEXT_POLICY0
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| softExpirationTime | DWORD | 4 | +0 | +0 | SAのソフト有効期限(秒単位)。再ネゴシエーションの目安。 |
| numAuthenticationMethods | DWORD | 4 | +4 | +4 | authenticationMethods配列の要素数。 |
| authenticationMethods | IKEEXT_AUTHENTICATION_METHOD0* | 8/4 | +8 | +8 | 許容する認証方式の配列へのポインター。 |
| initiatorImpersonationType | IKEEXT_AUTHENTICATION_IMPERSONATION_TYPE | 4 | +16 | +12 | イニシエーターの偽装(impersonation)種別を示す列挙値。 |
| numIkeProposals | DWORD | 4 | +20 | +16 | ikeProposals配列の要素数。 |
| ikeProposals | IKEEXT_PROPOSAL0* | 8/4 | +24 | +20 | IKEプロポーザルの配列へのポインター。 |
| flags | IKEEXT_POLICY_FLAG | 4 | +32 | +24 | IKEポリシーの動作を制御するフラグ。 |
| maxDynamicFilters | DWORD | 4 | +36 | +28 | 動的に作成可能なフィルターの上限数。 |
各言語での定義
#include <windows.h>
// IKEEXT_POLICY0 (x64 40 / x86 32 バイト)
typedef struct IKEEXT_POLICY0 {
DWORD softExpirationTime;
DWORD numAuthenticationMethods;
IKEEXT_AUTHENTICATION_METHOD0* authenticationMethods;
IKEEXT_AUTHENTICATION_IMPERSONATION_TYPE initiatorImpersonationType;
DWORD numIkeProposals;
IKEEXT_PROPOSAL0* ikeProposals;
IKEEXT_POLICY_FLAG flags;
DWORD maxDynamicFilters;
} IKEEXT_POLICY0;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IKEEXT_POLICY0
{
public uint softExpirationTime;
public uint numAuthenticationMethods;
public IntPtr authenticationMethods;
public int initiatorImpersonationType;
public uint numIkeProposals;
public IntPtr ikeProposals;
public uint flags;
public uint maxDynamicFilters;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IKEEXT_POLICY0
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
End Structureimport ctypes
from ctypes import wintypes
class IKEEXT_POLICY0(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),
]#[repr(C)]
pub struct IKEEXT_POLICY0 {
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,
}import "golang.org/x/sys/windows"
type IKEEXT_POLICY0 struct {
softExpirationTime uint32
numAuthenticationMethods uint32
authenticationMethods uintptr
initiatorImpersonationType int32
numIkeProposals uint32
ikeProposals uintptr
flags uint32
maxDynamicFilters uint32
}type
IKEEXT_POLICY0 = record
softExpirationTime: DWORD;
numAuthenticationMethods: DWORD;
authenticationMethods: Pointer;
initiatorImpersonationType: Integer;
numIkeProposals: DWORD;
ikeProposals: Pointer;
flags: DWORD;
maxDynamicFilters: DWORD;
end;const IKEEXT_POLICY0 = extern struct {
softExpirationTime: u32,
numAuthenticationMethods: u32,
authenticationMethods: ?*anyopaque,
initiatorImpersonationType: i32,
numIkeProposals: u32,
ikeProposals: ?*anyopaque,
flags: u32,
maxDynamicFilters: u32,
};type
IKEEXT_POLICY0 {.bycopy.} = object
softExpirationTime: uint32
numAuthenticationMethods: uint32
authenticationMethods: pointer
initiatorImpersonationType: int32
numIkeProposals: uint32
ikeProposals: pointer
flags: uint32
maxDynamicFilters: uint32struct IKEEXT_POLICY0
{
uint softExpirationTime;
uint numAuthenticationMethods;
void* authenticationMethods;
int initiatorImpersonationType;
uint numIkeProposals;
void* ikeProposals;
uint flags;
uint maxDynamicFilters;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; IKEEXT_POLICY0 サイズ: 32 バイト(x86)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; softExpirationTime : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; numAuthenticationMethods : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; authenticationMethods : IKEEXT_AUTHENTICATION_METHOD0* (+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 も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; IKEEXT_POLICY0 サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; softExpirationTime : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; numAuthenticationMethods : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; authenticationMethods : IKEEXT_AUTHENTICATION_METHOD0* (+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 も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global IKEEXT_POLICY0
#field int softExpirationTime
#field int numAuthenticationMethods
#field intptr authenticationMethods
#field int initiatorImpersonationType
#field int numIkeProposals
#field intptr ikeProposals
#field int flags
#field int maxDynamicFilters
#endstruct
stdim st, IKEEXT_POLICY0 ; NSTRUCT 変数を確保
st->softExpirationTime = 100
mes "softExpirationTime=" + st->softExpirationTime