ホーム › NetworkManagement.Rras › IKEV2_PROJECTION_INFO
IKEV2_PROJECTION_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| dwIPv4NegotiationError | DWORD | 4 | +0 | +0 | IPv4 ネゴシエーションの結果を指定する値です。0 は IPv4 アドレスが正常に割り当てられたことを示します。0 以外の値は失敗を示し、ネゴシエーション中に発生した致命的なエラーを表します。 | ||||||||||
| wszAddress | WCHAR | 32 | +4 | +4 | ローカル クライアントの IPv4 アドレスを指定する Unicode 文字列を格納する配列です。この文字列は "a.b.c.d" の形式です。wszAddress は dwIPv4NegotiationError が 0 の場合にのみ有効です。 | ||||||||||
| wszRemoteAddress | WCHAR | 32 | +36 | +36 | リモート サーバーの IPv4 アドレスを指定する Unicode 文字列を格納する配列です。この文字列は "a.b.c.d" の形式です。wszRemoteAddress は dwIPv4NegotiationError が 0 の場合にのみ有効です。アドレスが利用できない場合、このメンバーは空の文字列になります。 | ||||||||||
| IPv4SubInterfaceIndex | ULONGLONG | 8 | +72 | +72 | サーバー上の接続に対応する IPv4 サブインターフェイス インデックスを指定する値です。 | ||||||||||
| dwIPv6NegotiationError | DWORD | 4 | +80 | +80 | IPv6 ネゴシエーションの結果を指定する値です。0 は IPv6 アドレスが正常にネゴシエートされたことを示します。0 以外の値は失敗を示し、ネゴシエーション中に発生した致命的なエラーを表します。 | ||||||||||
| bInterfaceIdentifier | BYTE | 8 | +84 | +84 | クライアントの 64 ビット IPv6 インターフェイス識別子を指定する配列です。128 ビットの IPv6 インターネット アドレスの下位 64 ビットは「インターフェイス識別子」と見なされ、先行する 64 ビットに対して高い一意性を提供します。bInterfaceIdentifier は dwIPv6NegotiationError が 0 の場合にのみ有効であり、0 であってはなりません。 | ||||||||||
| bRemoteInterfaceIdentifier | BYTE | 8 | +92 | +92 | サーバーの 64 ビット IPv6 インターフェイス識別子を指定する配列です。128 ビットの IPv6 インターネット アドレスの下位 64 ビットは「インターフェイス識別子」と見なされ、先行する 64 ビットに対して高い一意性を提供します。bInterfaceIdentifier は dwIPv6NegotiationError が 0 の場合にのみ有効であり、0 であってはなりません。 | ||||||||||
| bPrefix | BYTE | 8 | +100 | +100 | クライアント インターフェイスの IPv6 アドレス プレフィックスを指定する値です。 | ||||||||||
| dwPrefixLength | DWORD | 4 | +108 | +108 | bPrefix の長さをビット単位で指定する値です。 | ||||||||||
| IPv6SubInterfaceIndex | ULONGLONG | 8 | +112 | +112 | サーバー上の接続に対応する IPv6 サブインターフェイス インデックスを指定する値です。 | ||||||||||
| dwOptions | DWORD | 4 | +120 | +120 | 使用されません。 | ||||||||||
| dwAuthenticationProtocol | DWORD | 4 | +124 | +124 | リモート サーバーの認証に使用される認証プロトコルを指定する値です。次の認証プロトコルがサポートされます:
| ||||||||||
| dwEapTypeId | DWORD | 4 | +128 | +128 | ローカル クライアントの認証に使用される拡張認証プロトコル (EAP) の種類の識別子を指定する値です。このメンバーの値は、dwAuthenticationProtocol が MPRAPI_IKEV2_AUTH_USING_EAP である場合にのみ有効です。 | ||||||||||
| dwCompressionAlgorithm | DWORD | 4 | +132 | +132 | 使用されません。 | ||||||||||
| dwEncryptionMethod | DWORD | 4 | +136 | +136 | 接続で使用される暗号化方式を指定する値です。次の暗号化方式がサポートされます:
|
公式ドキュメント
IKEV2_PROJECTION_INFO 構造体は、インターネット キー交換 (IKE) ネゴシエーション中に取得された情報を格納します。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// IKEV2_PROJECTION_INFO (x64 144 / x86 144 バイト)
typedef struct IKEV2_PROJECTION_INFO {
DWORD dwIPv4NegotiationError;
WCHAR wszAddress[16];
WCHAR wszRemoteAddress[16];
ULONGLONG IPv4SubInterfaceIndex;
DWORD dwIPv6NegotiationError;
BYTE bInterfaceIdentifier[8];
BYTE bRemoteInterfaceIdentifier[8];
BYTE bPrefix[8];
DWORD dwPrefixLength;
ULONGLONG IPv6SubInterfaceIndex;
DWORD dwOptions;
DWORD dwAuthenticationProtocol;
DWORD dwEapTypeId;
DWORD dwCompressionAlgorithm;
DWORD dwEncryptionMethod;
} IKEV2_PROJECTION_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IKEV2_PROJECTION_INFO
{
public uint dwIPv4NegotiationError;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)] public string wszAddress;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)] public string wszRemoteAddress;
public ulong IPv4SubInterfaceIndex;
public uint dwIPv6NegotiationError;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] bInterfaceIdentifier;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] bRemoteInterfaceIdentifier;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] bPrefix;
public uint dwPrefixLength;
public ulong IPv6SubInterfaceIndex;
public uint dwOptions;
public uint dwAuthenticationProtocol;
public uint dwEapTypeId;
public uint dwCompressionAlgorithm;
public uint dwEncryptionMethod;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IKEV2_PROJECTION_INFO
Public dwIPv4NegotiationError As UInteger
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=16)> Public wszAddress As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=16)> Public wszRemoteAddress As String
Public IPv4SubInterfaceIndex As ULong
Public dwIPv6NegotiationError As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public bInterfaceIdentifier() As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public bRemoteInterfaceIdentifier() As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public bPrefix() As Byte
Public dwPrefixLength As UInteger
Public IPv6SubInterfaceIndex As ULong
Public dwOptions As UInteger
Public dwAuthenticationProtocol As UInteger
Public dwEapTypeId As UInteger
Public dwCompressionAlgorithm As UInteger
Public dwEncryptionMethod As UInteger
End Structureimport ctypes
from ctypes import wintypes
class IKEV2_PROJECTION_INFO(ctypes.Structure):
_fields_ = [
("dwIPv4NegotiationError", wintypes.DWORD),
("wszAddress", ctypes.c_wchar * 16),
("wszRemoteAddress", ctypes.c_wchar * 16),
("IPv4SubInterfaceIndex", ctypes.c_ulonglong),
("dwIPv6NegotiationError", wintypes.DWORD),
("bInterfaceIdentifier", ctypes.c_ubyte * 8),
("bRemoteInterfaceIdentifier", ctypes.c_ubyte * 8),
("bPrefix", ctypes.c_ubyte * 8),
("dwPrefixLength", wintypes.DWORD),
("IPv6SubInterfaceIndex", ctypes.c_ulonglong),
("dwOptions", wintypes.DWORD),
("dwAuthenticationProtocol", wintypes.DWORD),
("dwEapTypeId", wintypes.DWORD),
("dwCompressionAlgorithm", wintypes.DWORD),
("dwEncryptionMethod", wintypes.DWORD),
]#[repr(C)]
pub struct IKEV2_PROJECTION_INFO {
pub dwIPv4NegotiationError: u32,
pub wszAddress: [u16; 16],
pub wszRemoteAddress: [u16; 16],
pub IPv4SubInterfaceIndex: u64,
pub dwIPv6NegotiationError: u32,
pub bInterfaceIdentifier: [u8; 8],
pub bRemoteInterfaceIdentifier: [u8; 8],
pub bPrefix: [u8; 8],
pub dwPrefixLength: u32,
pub IPv6SubInterfaceIndex: u64,
pub dwOptions: u32,
pub dwAuthenticationProtocol: u32,
pub dwEapTypeId: u32,
pub dwCompressionAlgorithm: u32,
pub dwEncryptionMethod: u32,
}import "golang.org/x/sys/windows"
type IKEV2_PROJECTION_INFO struct {
dwIPv4NegotiationError uint32
wszAddress [16]uint16
wszRemoteAddress [16]uint16
IPv4SubInterfaceIndex uint64
dwIPv6NegotiationError uint32
bInterfaceIdentifier [8]byte
bRemoteInterfaceIdentifier [8]byte
bPrefix [8]byte
dwPrefixLength uint32
IPv6SubInterfaceIndex uint64
dwOptions uint32
dwAuthenticationProtocol uint32
dwEapTypeId uint32
dwCompressionAlgorithm uint32
dwEncryptionMethod uint32
}type
IKEV2_PROJECTION_INFO = record
dwIPv4NegotiationError: DWORD;
wszAddress: array[0..15] of WideChar;
wszRemoteAddress: array[0..15] of WideChar;
IPv4SubInterfaceIndex: UInt64;
dwIPv6NegotiationError: DWORD;
bInterfaceIdentifier: array[0..7] of Byte;
bRemoteInterfaceIdentifier: array[0..7] of Byte;
bPrefix: array[0..7] of Byte;
dwPrefixLength: DWORD;
IPv6SubInterfaceIndex: UInt64;
dwOptions: DWORD;
dwAuthenticationProtocol: DWORD;
dwEapTypeId: DWORD;
dwCompressionAlgorithm: DWORD;
dwEncryptionMethod: DWORD;
end;const IKEV2_PROJECTION_INFO = extern struct {
dwIPv4NegotiationError: u32,
wszAddress: [16]u16,
wszRemoteAddress: [16]u16,
IPv4SubInterfaceIndex: u64,
dwIPv6NegotiationError: u32,
bInterfaceIdentifier: [8]u8,
bRemoteInterfaceIdentifier: [8]u8,
bPrefix: [8]u8,
dwPrefixLength: u32,
IPv6SubInterfaceIndex: u64,
dwOptions: u32,
dwAuthenticationProtocol: u32,
dwEapTypeId: u32,
dwCompressionAlgorithm: u32,
dwEncryptionMethod: u32,
};type
IKEV2_PROJECTION_INFO {.bycopy.} = object
dwIPv4NegotiationError: uint32
wszAddress: array[16, uint16]
wszRemoteAddress: array[16, uint16]
IPv4SubInterfaceIndex: uint64
dwIPv6NegotiationError: uint32
bInterfaceIdentifier: array[8, uint8]
bRemoteInterfaceIdentifier: array[8, uint8]
bPrefix: array[8, uint8]
dwPrefixLength: uint32
IPv6SubInterfaceIndex: uint64
dwOptions: uint32
dwAuthenticationProtocol: uint32
dwEapTypeId: uint32
dwCompressionAlgorithm: uint32
dwEncryptionMethod: uint32struct IKEV2_PROJECTION_INFO
{
uint dwIPv4NegotiationError;
wchar[16] wszAddress;
wchar[16] wszRemoteAddress;
ulong IPv4SubInterfaceIndex;
uint dwIPv6NegotiationError;
ubyte[8] bInterfaceIdentifier;
ubyte[8] bRemoteInterfaceIdentifier;
ubyte[8] bPrefix;
uint dwPrefixLength;
ulong IPv6SubInterfaceIndex;
uint dwOptions;
uint dwAuthenticationProtocol;
uint dwEapTypeId;
uint dwCompressionAlgorithm;
uint dwEncryptionMethod;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; IKEV2_PROJECTION_INFO サイズ: 144 バイト(x64)
dim st, 36 ; 4byte整数×36(構造体サイズ 144 / 4 切り上げ)
; dwIPv4NegotiationError : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; wszAddress : WCHAR (+4, 32byte) varptr(st)+4 を基点に操作(32byte:入れ子/配列)
; wszRemoteAddress : WCHAR (+36, 32byte) varptr(st)+36 を基点に操作(32byte:入れ子/配列)
; IPv4SubInterfaceIndex : ULONGLONG (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; dwIPv6NegotiationError : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; bInterfaceIdentifier : BYTE (+84, 8byte) varptr(st)+84 を基点に操作(8byte:入れ子/配列)
; bRemoteInterfaceIdentifier : BYTE (+92, 8byte) varptr(st)+92 を基点に操作(8byte:入れ子/配列)
; bPrefix : BYTE (+100, 8byte) varptr(st)+100 を基点に操作(8byte:入れ子/配列)
; dwPrefixLength : DWORD (+108, 4byte) st.27 = 値 / 値 = st.27 (lpoke/lpeek も可)
; IPv6SubInterfaceIndex : ULONGLONG (+112, 8byte) qpoke st,112,値 / qpeek(st,112) ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; dwOptions : DWORD (+120, 4byte) st.30 = 値 / 値 = st.30 (lpoke/lpeek も可)
; dwAuthenticationProtocol : DWORD (+124, 4byte) st.31 = 値 / 値 = st.31 (lpoke/lpeek も可)
; dwEapTypeId : DWORD (+128, 4byte) st.32 = 値 / 値 = st.32 (lpoke/lpeek も可)
; dwCompressionAlgorithm : DWORD (+132, 4byte) st.33 = 値 / 値 = st.33 (lpoke/lpeek も可)
; dwEncryptionMethod : DWORD (+136, 4byte) st.34 = 値 / 値 = st.34 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global IKEV2_PROJECTION_INFO
#field int dwIPv4NegotiationError
#field wchar wszAddress 16
#field wchar wszRemoteAddress 16
#field int64 IPv4SubInterfaceIndex
#field int dwIPv6NegotiationError
#field byte bInterfaceIdentifier 8
#field byte bRemoteInterfaceIdentifier 8
#field byte bPrefix 8
#field int dwPrefixLength
#field int64 IPv6SubInterfaceIndex
#field int dwOptions
#field int dwAuthenticationProtocol
#field int dwEapTypeId
#field int dwCompressionAlgorithm
#field int dwEncryptionMethod
#endstruct
stdim st, IKEV2_PROJECTION_INFO ; NSTRUCT 変数を確保
st->dwIPv4NegotiationError = 100
mes "dwIPv4NegotiationError=" + st->dwIPv4NegotiationError