ホーム › NetworkManagement.Rras › ROUTER_CUSTOM_IKEv2_POLICY0
ROUTER_CUSTOM_IKEv2_POLICY0
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwIntegrityMethod | DWORD | 4 | +0 | +0 | IKEv2のフェーズ1で使用する整合性(ハッシュ)アルゴリズム。 |
| dwEncryptionMethod | DWORD | 4 | +4 | +4 | IKEv2のフェーズ1で使用する暗号化アルゴリズム。 |
| dwCipherTransformConstant | DWORD | 4 | +8 | +8 | IPsecデータ保護に使用する暗号変換定数(ESP暗号)。 |
| dwAuthTransformConstant | DWORD | 4 | +12 | +12 | IPsecデータ保護に使用する認証変換定数(ESP整合性)。 |
| dwPfsGroup | DWORD | 4 | +16 | +16 | PFS(Perfect Forward Secrecy)で使用するDiffie-Hellmanグループ。 |
| dwDhGroup | DWORD | 4 | +20 | +20 | 鍵交換で使用するDiffie-Hellmanグループ。 |
各言語での定義
#include <windows.h>
// ROUTER_CUSTOM_IKEv2_POLICY0 (x64 24 / x86 24 バイト)
typedef struct ROUTER_CUSTOM_IKEv2_POLICY0 {
DWORD dwIntegrityMethod;
DWORD dwEncryptionMethod;
DWORD dwCipherTransformConstant;
DWORD dwAuthTransformConstant;
DWORD dwPfsGroup;
DWORD dwDhGroup;
} ROUTER_CUSTOM_IKEv2_POLICY0;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ROUTER_CUSTOM_IKEv2_POLICY0
{
public uint dwIntegrityMethod;
public uint dwEncryptionMethod;
public uint dwCipherTransformConstant;
public uint dwAuthTransformConstant;
public uint dwPfsGroup;
public uint dwDhGroup;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ROUTER_CUSTOM_IKEv2_POLICY0
Public dwIntegrityMethod As UInteger
Public dwEncryptionMethod As UInteger
Public dwCipherTransformConstant As UInteger
Public dwAuthTransformConstant As UInteger
Public dwPfsGroup As UInteger
Public dwDhGroup As UInteger
End Structureimport ctypes
from ctypes import wintypes
class ROUTER_CUSTOM_IKEv2_POLICY0(ctypes.Structure):
_fields_ = [
("dwIntegrityMethod", wintypes.DWORD),
("dwEncryptionMethod", wintypes.DWORD),
("dwCipherTransformConstant", wintypes.DWORD),
("dwAuthTransformConstant", wintypes.DWORD),
("dwPfsGroup", wintypes.DWORD),
("dwDhGroup", wintypes.DWORD),
]#[repr(C)]
pub struct ROUTER_CUSTOM_IKEv2_POLICY0 {
pub dwIntegrityMethod: u32,
pub dwEncryptionMethod: u32,
pub dwCipherTransformConstant: u32,
pub dwAuthTransformConstant: u32,
pub dwPfsGroup: u32,
pub dwDhGroup: u32,
}import "golang.org/x/sys/windows"
type ROUTER_CUSTOM_IKEv2_POLICY0 struct {
dwIntegrityMethod uint32
dwEncryptionMethod uint32
dwCipherTransformConstant uint32
dwAuthTransformConstant uint32
dwPfsGroup uint32
dwDhGroup uint32
}type
ROUTER_CUSTOM_IKEv2_POLICY0 = record
dwIntegrityMethod: DWORD;
dwEncryptionMethod: DWORD;
dwCipherTransformConstant: DWORD;
dwAuthTransformConstant: DWORD;
dwPfsGroup: DWORD;
dwDhGroup: DWORD;
end;const ROUTER_CUSTOM_IKEv2_POLICY0 = extern struct {
dwIntegrityMethod: u32,
dwEncryptionMethod: u32,
dwCipherTransformConstant: u32,
dwAuthTransformConstant: u32,
dwPfsGroup: u32,
dwDhGroup: u32,
};type
ROUTER_CUSTOM_IKEv2_POLICY0 {.bycopy.} = object
dwIntegrityMethod: uint32
dwEncryptionMethod: uint32
dwCipherTransformConstant: uint32
dwAuthTransformConstant: uint32
dwPfsGroup: uint32
dwDhGroup: uint32struct ROUTER_CUSTOM_IKEv2_POLICY0
{
uint dwIntegrityMethod;
uint dwEncryptionMethod;
uint dwCipherTransformConstant;
uint dwAuthTransformConstant;
uint dwPfsGroup;
uint dwDhGroup;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ROUTER_CUSTOM_IKEv2_POLICY0 サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; dwIntegrityMethod : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwEncryptionMethod : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwCipherTransformConstant : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwAuthTransformConstant : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwPfsGroup : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwDhGroup : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global ROUTER_CUSTOM_IKEv2_POLICY0
#field int dwIntegrityMethod
#field int dwEncryptionMethod
#field int dwCipherTransformConstant
#field int dwAuthTransformConstant
#field int dwPfsGroup
#field int dwDhGroup
#endstruct
stdim st, ROUTER_CUSTOM_IKEv2_POLICY0 ; NSTRUCT 変数を確保
st->dwIntegrityMethod = 100
mes "dwIntegrityMethod=" + st->dwIntegrityMethod