Win32 API 日本語リファレンス
ホームNetworkManagement.WindowsFilteringPlatform › IKEEXT_SA_DETAILS0

IKEEXT_SA_DETAILS0

構造体
サイズx64: 160 バイト / x86: 152 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
saIdULONGLONG8+0+0セキュリティアソシエーションを一意に識別する64ビットID。
keyModuleTypeIKEEXT_KEY_MODULE_TYPE4+8+8SAを管理する鍵モジュール種別(IKE/AuthIP等)。
ipVersionFWP_IP_VERSION4+12+12SAのIPバージョンを示す列挙値。
Anonymous_Anonymous_e__Union8/4+16+16IPバージョンに応じたトラフィック情報を保持する無名共用体。
ikeTrafficIKEEXT_TRAFFIC048+24+24SAに関連付くトラフィック情報。
ikeProposalIKEEXT_PROPOSAL028+72+72ネゴシエート済みのIKEプロポーザル。
cookiePairIKEEXT_COOKIE_PAIR016+104+104イニシエーター/レスポンダーのクッキーペア。
ikeCredentialsIKEEXT_CREDENTIALS016/8+120+120SAで使用された資格情報。
ikePolicyKeyGUID16+136+128適用されたIKEポリシーを識別するGUID。
virtualIfTunnelIdULONGLONG8+152+144仮想インターフェーストンネルID(該当時)。

共用体: _Anonymous_e__Union x64 8B / x86 4B

フィールドサイズx64x86
v4UdpEncapsulationIPSEC_V4_UDP_ENCAPSULATION0*8/4+0+0

各言語での定義

#include <windows.h>

// IKEEXT_TRAFFIC0  (x64 48 / x86 48 バイト)
typedef struct IKEEXT_TRAFFIC0 {
    FWP_IP_VERSION ipVersion;
    _Anonymous1_e__Union Anonymous1;
    _Anonymous2_e__Union Anonymous2;
    ULONGLONG authIpFilterId;
} IKEEXT_TRAFFIC0;

// IKEEXT_CIPHER_ALGORITHM0  (x64 12 / x86 12 バイト)
typedef struct IKEEXT_CIPHER_ALGORITHM0 {
    IKEEXT_CIPHER_TYPE algoIdentifier;
    DWORD keyLen;
    DWORD rounds;
} IKEEXT_CIPHER_ALGORITHM0;

// IKEEXT_INTEGRITY_ALGORITHM0  (x64 4 / x86 4 バイト)
typedef struct IKEEXT_INTEGRITY_ALGORITHM0 {
    IKEEXT_INTEGRITY_TYPE algoIdentifier;
} IKEEXT_INTEGRITY_ALGORITHM0;

// IKEEXT_PROPOSAL0  (x64 28 / x86 28 バイト)
typedef struct IKEEXT_PROPOSAL0 {
    IKEEXT_CIPHER_ALGORITHM0 cipherAlgorithm;
    IKEEXT_INTEGRITY_ALGORITHM0 integrityAlgorithm;
    DWORD maxLifetimeSeconds;
    IKEEXT_DH_GROUP dhGroup;
    DWORD quickModeLimit;
} IKEEXT_PROPOSAL0;

// IKEEXT_COOKIE_PAIR0  (x64 16 / x86 16 バイト)
typedef struct IKEEXT_COOKIE_PAIR0 {
    ULONGLONG initiator;
    ULONGLONG responder;
} IKEEXT_COOKIE_PAIR0;

// IKEEXT_CREDENTIALS0  (x64 16 / x86 8 バイト)
typedef struct IKEEXT_CREDENTIALS0 {
    DWORD numCredentials;
    IKEEXT_CREDENTIAL_PAIR0* credentials;
} IKEEXT_CREDENTIALS0;

// IKEEXT_SA_DETAILS0  (x64 160 / x86 152 バイト)
typedef struct IKEEXT_SA_DETAILS0 {
    ULONGLONG saId;
    IKEEXT_KEY_MODULE_TYPE keyModuleType;
    FWP_IP_VERSION ipVersion;
    _Anonymous_e__Union Anonymous;
    IKEEXT_TRAFFIC0 ikeTraffic;
    IKEEXT_PROPOSAL0 ikeProposal;
    IKEEXT_COOKIE_PAIR0 cookiePair;
    IKEEXT_CREDENTIALS0 ikeCredentials;
    GUID ikePolicyKey;
    ULONGLONG virtualIfTunnelId;
} IKEEXT_SA_DETAILS0;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IKEEXT_TRAFFIC0
{
    public int ipVersion;
    public _Anonymous1_e__Union Anonymous1;
    public _Anonymous2_e__Union Anonymous2;
    public ulong authIpFilterId;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IKEEXT_CIPHER_ALGORITHM0
{
    public int algoIdentifier;
    public uint keyLen;
    public uint rounds;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IKEEXT_INTEGRITY_ALGORITHM0
{
    public int algoIdentifier;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IKEEXT_PROPOSAL0
{
    public IKEEXT_CIPHER_ALGORITHM0 cipherAlgorithm;
    public IKEEXT_INTEGRITY_ALGORITHM0 integrityAlgorithm;
    public uint maxLifetimeSeconds;
    public int dhGroup;
    public uint quickModeLimit;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IKEEXT_COOKIE_PAIR0
{
    public ulong initiator;
    public ulong responder;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IKEEXT_CREDENTIALS0
{
    public uint numCredentials;
    public IntPtr credentials;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IKEEXT_SA_DETAILS0
{
    public ulong saId;
    public int keyModuleType;
    public int ipVersion;
    public _Anonymous_e__Union Anonymous;
    public IKEEXT_TRAFFIC0 ikeTraffic;
    public IKEEXT_PROPOSAL0 ikeProposal;
    public IKEEXT_COOKIE_PAIR0 cookiePair;
    public IKEEXT_CREDENTIALS0 ikeCredentials;
    public Guid ikePolicyKey;
    public ulong virtualIfTunnelId;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IKEEXT_TRAFFIC0
    Public ipVersion As Integer
    Public Anonymous1 As _Anonymous1_e__Union
    Public Anonymous2 As _Anonymous2_e__Union
    Public authIpFilterId As ULong
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IKEEXT_CIPHER_ALGORITHM0
    Public algoIdentifier As Integer
    Public keyLen As UInteger
    Public rounds As UInteger
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IKEEXT_INTEGRITY_ALGORITHM0
    Public algoIdentifier As Integer
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IKEEXT_PROPOSAL0
    Public cipherAlgorithm As IKEEXT_CIPHER_ALGORITHM0
    Public integrityAlgorithm As IKEEXT_INTEGRITY_ALGORITHM0
    Public maxLifetimeSeconds As UInteger
    Public dhGroup As Integer
    Public quickModeLimit As UInteger
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IKEEXT_COOKIE_PAIR0
    Public initiator As ULong
    Public responder As ULong
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IKEEXT_CREDENTIALS0
    Public numCredentials As UInteger
    Public credentials As IntPtr
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IKEEXT_SA_DETAILS0
    Public saId As ULong
    Public keyModuleType As Integer
    Public ipVersion As Integer
    Public Anonymous As _Anonymous_e__Union
    Public ikeTraffic As IKEEXT_TRAFFIC0
    Public ikeProposal As IKEEXT_PROPOSAL0
    Public cookiePair As IKEEXT_COOKIE_PAIR0
    Public ikeCredentials As IKEEXT_CREDENTIALS0
    Public ikePolicyKey As Guid
    Public virtualIfTunnelId As ULong
End Structure
import ctypes
from ctypes import wintypes

class IKEEXT_TRAFFIC0(ctypes.Structure):
    _fields_ = [
        ("ipVersion", ctypes.c_int),
        ("Anonymous1", _Anonymous1_e__Union),
        ("Anonymous2", _Anonymous2_e__Union),
        ("authIpFilterId", ctypes.c_ulonglong),
    ]

class IKEEXT_CIPHER_ALGORITHM0(ctypes.Structure):
    _fields_ = [
        ("algoIdentifier", ctypes.c_int),
        ("keyLen", wintypes.DWORD),
        ("rounds", wintypes.DWORD),
    ]

class IKEEXT_INTEGRITY_ALGORITHM0(ctypes.Structure):
    _fields_ = [
        ("algoIdentifier", ctypes.c_int),
    ]

class IKEEXT_PROPOSAL0(ctypes.Structure):
    _fields_ = [
        ("cipherAlgorithm", IKEEXT_CIPHER_ALGORITHM0),
        ("integrityAlgorithm", IKEEXT_INTEGRITY_ALGORITHM0),
        ("maxLifetimeSeconds", wintypes.DWORD),
        ("dhGroup", ctypes.c_int),
        ("quickModeLimit", wintypes.DWORD),
    ]

class IKEEXT_COOKIE_PAIR0(ctypes.Structure):
    _fields_ = [
        ("initiator", ctypes.c_ulonglong),
        ("responder", ctypes.c_ulonglong),
    ]

class IKEEXT_CREDENTIALS0(ctypes.Structure):
    _fields_ = [
        ("numCredentials", wintypes.DWORD),
        ("credentials", ctypes.c_void_p),
    ]

class IKEEXT_SA_DETAILS0(ctypes.Structure):
    _fields_ = [
        ("saId", ctypes.c_ulonglong),
        ("keyModuleType", ctypes.c_int),
        ("ipVersion", ctypes.c_int),
        ("Anonymous", _Anonymous_e__Union),
        ("ikeTraffic", IKEEXT_TRAFFIC0),
        ("ikeProposal", IKEEXT_PROPOSAL0),
        ("cookiePair", IKEEXT_COOKIE_PAIR0),
        ("ikeCredentials", IKEEXT_CREDENTIALS0),
        ("ikePolicyKey", GUID),
        ("virtualIfTunnelId", ctypes.c_ulonglong),
    ]
#[repr(C)]
pub struct IKEEXT_TRAFFIC0 {
    pub ipVersion: i32,
    pub Anonymous1: _Anonymous1_e__Union,
    pub Anonymous2: _Anonymous2_e__Union,
    pub authIpFilterId: u64,
}

#[repr(C)]
pub struct IKEEXT_CIPHER_ALGORITHM0 {
    pub algoIdentifier: i32,
    pub keyLen: u32,
    pub rounds: u32,
}

#[repr(C)]
pub struct IKEEXT_INTEGRITY_ALGORITHM0 {
    pub algoIdentifier: i32,
}

#[repr(C)]
pub struct IKEEXT_PROPOSAL0 {
    pub cipherAlgorithm: IKEEXT_CIPHER_ALGORITHM0,
    pub integrityAlgorithm: IKEEXT_INTEGRITY_ALGORITHM0,
    pub maxLifetimeSeconds: u32,
    pub dhGroup: i32,
    pub quickModeLimit: u32,
}

#[repr(C)]
pub struct IKEEXT_COOKIE_PAIR0 {
    pub initiator: u64,
    pub responder: u64,
}

#[repr(C)]
pub struct IKEEXT_CREDENTIALS0 {
    pub numCredentials: u32,
    pub credentials: *mut core::ffi::c_void,
}

#[repr(C)]
pub struct IKEEXT_SA_DETAILS0 {
    pub saId: u64,
    pub keyModuleType: i32,
    pub ipVersion: i32,
    pub Anonymous: _Anonymous_e__Union,
    pub ikeTraffic: IKEEXT_TRAFFIC0,
    pub ikeProposal: IKEEXT_PROPOSAL0,
    pub cookiePair: IKEEXT_COOKIE_PAIR0,
    pub ikeCredentials: IKEEXT_CREDENTIALS0,
    pub ikePolicyKey: GUID,
    pub virtualIfTunnelId: u64,
}
import "golang.org/x/sys/windows"

type IKEEXT_TRAFFIC0 struct {
	ipVersion int32
	Anonymous1 _Anonymous1_e__Union
	Anonymous2 _Anonymous2_e__Union
	authIpFilterId uint64
}

type IKEEXT_CIPHER_ALGORITHM0 struct {
	algoIdentifier int32
	keyLen uint32
	rounds uint32
}

type IKEEXT_INTEGRITY_ALGORITHM0 struct {
	algoIdentifier int32
}

type IKEEXT_PROPOSAL0 struct {
	cipherAlgorithm IKEEXT_CIPHER_ALGORITHM0
	integrityAlgorithm IKEEXT_INTEGRITY_ALGORITHM0
	maxLifetimeSeconds uint32
	dhGroup int32
	quickModeLimit uint32
}

type IKEEXT_COOKIE_PAIR0 struct {
	initiator uint64
	responder uint64
}

type IKEEXT_CREDENTIALS0 struct {
	numCredentials uint32
	credentials uintptr
}

type IKEEXT_SA_DETAILS0 struct {
	saId uint64
	keyModuleType int32
	ipVersion int32
	Anonymous _Anonymous_e__Union
	ikeTraffic IKEEXT_TRAFFIC0
	ikeProposal IKEEXT_PROPOSAL0
	cookiePair IKEEXT_COOKIE_PAIR0
	ikeCredentials IKEEXT_CREDENTIALS0
	ikePolicyKey windows.GUID
	virtualIfTunnelId uint64
}
type
  IKEEXT_TRAFFIC0 = record
    ipVersion: Integer;
    Anonymous1: _Anonymous1_e__Union;
    Anonymous2: _Anonymous2_e__Union;
    authIpFilterId: UInt64;
  end;

  IKEEXT_CIPHER_ALGORITHM0 = record
    algoIdentifier: Integer;
    keyLen: DWORD;
    rounds: DWORD;
  end;

  IKEEXT_INTEGRITY_ALGORITHM0 = record
    algoIdentifier: Integer;
  end;

  IKEEXT_PROPOSAL0 = record
    cipherAlgorithm: IKEEXT_CIPHER_ALGORITHM0;
    integrityAlgorithm: IKEEXT_INTEGRITY_ALGORITHM0;
    maxLifetimeSeconds: DWORD;
    dhGroup: Integer;
    quickModeLimit: DWORD;
  end;

  IKEEXT_COOKIE_PAIR0 = record
    initiator: UInt64;
    responder: UInt64;
  end;

  IKEEXT_CREDENTIALS0 = record
    numCredentials: DWORD;
    credentials: Pointer;
  end;

  IKEEXT_SA_DETAILS0 = record
    saId: UInt64;
    keyModuleType: Integer;
    ipVersion: Integer;
    Anonymous: _Anonymous_e__Union;
    ikeTraffic: IKEEXT_TRAFFIC0;
    ikeProposal: IKEEXT_PROPOSAL0;
    cookiePair: IKEEXT_COOKIE_PAIR0;
    ikeCredentials: IKEEXT_CREDENTIALS0;
    ikePolicyKey: TGUID;
    virtualIfTunnelId: UInt64;
  end;
const IKEEXT_TRAFFIC0 = extern struct {
    ipVersion: i32,
    Anonymous1: _Anonymous1_e__Union,
    Anonymous2: _Anonymous2_e__Union,
    authIpFilterId: u64,
};

const IKEEXT_CIPHER_ALGORITHM0 = extern struct {
    algoIdentifier: i32,
    keyLen: u32,
    rounds: u32,
};

const IKEEXT_INTEGRITY_ALGORITHM0 = extern struct {
    algoIdentifier: i32,
};

const IKEEXT_PROPOSAL0 = extern struct {
    cipherAlgorithm: IKEEXT_CIPHER_ALGORITHM0,
    integrityAlgorithm: IKEEXT_INTEGRITY_ALGORITHM0,
    maxLifetimeSeconds: u32,
    dhGroup: i32,
    quickModeLimit: u32,
};

const IKEEXT_COOKIE_PAIR0 = extern struct {
    initiator: u64,
    responder: u64,
};

const IKEEXT_CREDENTIALS0 = extern struct {
    numCredentials: u32,
    credentials: ?*anyopaque,
};

const IKEEXT_SA_DETAILS0 = extern struct {
    saId: u64,
    keyModuleType: i32,
    ipVersion: i32,
    Anonymous: _Anonymous_e__Union,
    ikeTraffic: IKEEXT_TRAFFIC0,
    ikeProposal: IKEEXT_PROPOSAL0,
    cookiePair: IKEEXT_COOKIE_PAIR0,
    ikeCredentials: IKEEXT_CREDENTIALS0,
    ikePolicyKey: GUID,
    virtualIfTunnelId: u64,
};
type
  IKEEXT_TRAFFIC0 {.bycopy.} = object
    ipVersion: int32
    Anonymous1: _Anonymous1_e__Union
    Anonymous2: _Anonymous2_e__Union
    authIpFilterId: uint64

  IKEEXT_CIPHER_ALGORITHM0 {.bycopy.} = object
    algoIdentifier: int32
    keyLen: uint32
    rounds: uint32

  IKEEXT_INTEGRITY_ALGORITHM0 {.bycopy.} = object
    algoIdentifier: int32

  IKEEXT_PROPOSAL0 {.bycopy.} = object
    cipherAlgorithm: IKEEXT_CIPHER_ALGORITHM0
    integrityAlgorithm: IKEEXT_INTEGRITY_ALGORITHM0
    maxLifetimeSeconds: uint32
    dhGroup: int32
    quickModeLimit: uint32

  IKEEXT_COOKIE_PAIR0 {.bycopy.} = object
    initiator: uint64
    responder: uint64

  IKEEXT_CREDENTIALS0 {.bycopy.} = object
    numCredentials: uint32
    credentials: pointer

  IKEEXT_SA_DETAILS0 {.bycopy.} = object
    saId: uint64
    keyModuleType: int32
    ipVersion: int32
    Anonymous: _Anonymous_e__Union
    ikeTraffic: IKEEXT_TRAFFIC0
    ikeProposal: IKEEXT_PROPOSAL0
    cookiePair: IKEEXT_COOKIE_PAIR0
    ikeCredentials: IKEEXT_CREDENTIALS0
    ikePolicyKey: GUID
    virtualIfTunnelId: uint64
struct IKEEXT_TRAFFIC0
{
    int ipVersion;
    _Anonymous1_e__Union Anonymous1;
    _Anonymous2_e__Union Anonymous2;
    ulong authIpFilterId;
}

struct IKEEXT_CIPHER_ALGORITHM0
{
    int algoIdentifier;
    uint keyLen;
    uint rounds;
}

struct IKEEXT_INTEGRITY_ALGORITHM0
{
    int algoIdentifier;
}

struct IKEEXT_PROPOSAL0
{
    IKEEXT_CIPHER_ALGORITHM0 cipherAlgorithm;
    IKEEXT_INTEGRITY_ALGORITHM0 integrityAlgorithm;
    uint maxLifetimeSeconds;
    int dhGroup;
    uint quickModeLimit;
}

struct IKEEXT_COOKIE_PAIR0
{
    ulong initiator;
    ulong responder;
}

struct IKEEXT_CREDENTIALS0
{
    uint numCredentials;
    void* credentials;
}

struct IKEEXT_SA_DETAILS0
{
    ulong saId;
    int keyModuleType;
    int ipVersion;
    _Anonymous_e__Union Anonymous;
    IKEEXT_TRAFFIC0 ikeTraffic;
    IKEEXT_PROPOSAL0 ikeProposal;
    IKEEXT_COOKIE_PAIR0 cookiePair;
    IKEEXT_CREDENTIALS0 ikeCredentials;
    GUID ikePolicyKey;
    ulong virtualIfTunnelId;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; IKEEXT_SA_DETAILS0 サイズ: 152 バイト(x86)
dim st, 38    ; 4byte整数×38(構造体サイズ 152 / 4 切り上げ)
; saId : ULONGLONG (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; keyModuleType : IKEEXT_KEY_MODULE_TYPE (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; ipVersion : FWP_IP_VERSION (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+16, 4byte)  varptr(st)+16 を基点に操作(4byte:入れ子/配列)
; ikeTraffic : IKEEXT_TRAFFIC0 (+24, 48byte)  varptr(st)+24 を基点に操作(48byte:入れ子/配列)
; ikeProposal : IKEEXT_PROPOSAL0 (+72, 28byte)  varptr(st)+72 を基点に操作(28byte:入れ子/配列)
; cookiePair : IKEEXT_COOKIE_PAIR0 (+104, 16byte)  varptr(st)+104 を基点に操作(16byte:入れ子/配列)
; ikeCredentials : IKEEXT_CREDENTIALS0 (+120, 8byte)  varptr(st)+120 を基点に操作(8byte:入れ子/配列)
; ikePolicyKey : GUID (+128, 16byte)  varptr(st)+128 を基点に操作(16byte:入れ子/配列)
; virtualIfTunnelId : ULONGLONG (+144, 8byte)  qpoke st,144,値 / qpeek(st,144)  ※IronHSPのみ。3.7/3.8は lpoke st,144,下位 : lpoke st,148,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; IKEEXT_SA_DETAILS0 サイズ: 160 バイト(x64)
dim st, 40    ; 4byte整数×40(構造体サイズ 160 / 4 切り上げ)
; saId : ULONGLONG (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; keyModuleType : IKEEXT_KEY_MODULE_TYPE (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; ipVersion : FWP_IP_VERSION (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; Anonymous : _Anonymous_e__Union (+16, 8byte)  varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; ikeTraffic : IKEEXT_TRAFFIC0 (+24, 48byte)  varptr(st)+24 を基点に操作(48byte:入れ子/配列)
; ikeProposal : IKEEXT_PROPOSAL0 (+72, 28byte)  varptr(st)+72 を基点に操作(28byte:入れ子/配列)
; cookiePair : IKEEXT_COOKIE_PAIR0 (+104, 16byte)  varptr(st)+104 を基点に操作(16byte:入れ子/配列)
; ikeCredentials : IKEEXT_CREDENTIALS0 (+120, 16byte)  varptr(st)+120 を基点に操作(16byte:入れ子/配列)
; ikePolicyKey : GUID (+136, 16byte)  varptr(st)+136 を基点に操作(16byte:入れ子/配列)
; virtualIfTunnelId : ULONGLONG (+152, 8byte)  qpoke st,152,値 / qpeek(st,152)  ※IronHSPのみ。3.7/3.8は lpoke st,152,下位 : lpoke st,156,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global IKEEXT_TRAFFIC0
    #field int ipVersion
    #field byte Anonymous1 16
    #field byte Anonymous2 16
    #field int64 authIpFilterId
#endstruct

#defstruct global IKEEXT_CIPHER_ALGORITHM0
    #field int algoIdentifier
    #field int keyLen
    #field int rounds
#endstruct

#defstruct global IKEEXT_INTEGRITY_ALGORITHM0
    #field int algoIdentifier
#endstruct

#defstruct global IKEEXT_PROPOSAL0
    #field IKEEXT_CIPHER_ALGORITHM0 cipherAlgorithm
    #field IKEEXT_INTEGRITY_ALGORITHM0 integrityAlgorithm
    #field int maxLifetimeSeconds
    #field int dhGroup
    #field int quickModeLimit
#endstruct

#defstruct global IKEEXT_COOKIE_PAIR0
    #field int64 initiator
    #field int64 responder
#endstruct

#defstruct global IKEEXT_CREDENTIALS0
    #field int numCredentials
    #field intptr credentials
#endstruct

#defstruct global GUID, pack=1
    #field int Data1
    #field short Data2
    #field short Data3
    #field byte Data4 8
#endstruct

#defstruct global IKEEXT_SA_DETAILS0
    #field int64 saId
    #field int keyModuleType
    #field int ipVersion
    #field byte Anonymous 8
    #field IKEEXT_TRAFFIC0 ikeTraffic
    #field IKEEXT_PROPOSAL0 ikeProposal
    #field IKEEXT_COOKIE_PAIR0 cookiePair
    #field IKEEXT_CREDENTIALS0 ikeCredentials
    #field GUID ikePolicyKey
    #field int64 virtualIfTunnelId
#endstruct

stdim st, IKEEXT_SA_DETAILS0        ; NSTRUCT 変数を確保
st->saId = 100
mes "saId=" + st->saId
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。