ホーム › NetworkManagement.Rras › PPP_PROJECTION_INFO
PPP_PROJECTION_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwIPv4NegotiationError | DWORD | 4 | +0 | +0 | IPv4ネゴシエーションのエラーコード。0なら正常。 |
| wszAddress | WCHAR | 32 | +4 | +4 | ローカルに割り当てられたIPv4アドレス(ワイド文字列)。 |
| wszRemoteAddress | WCHAR | 32 | +36 | +36 | リモートのIPv4アドレス(ワイド文字列)。 |
| dwIPv4Options | DWORD | 4 | +68 | +68 | ローカルのIPv4オプションフラグ。 |
| dwIPv4RemoteOptions | DWORD | 4 | +72 | +72 | リモートのIPv4オプションフラグ。 |
| IPv4SubInterfaceIndex | ULONGLONG | 8 | +80 | +80 | IPv4サブインターフェイスのインデックス(64ビット)。 |
| dwIPv6NegotiationError | DWORD | 4 | +88 | +88 | IPv6ネゴシエーションのエラーコード。0なら正常。 |
| bInterfaceIdentifier | BYTE | 8 | +92 | +92 | ローカルのIPv6インターフェイス識別子(8バイト)。 |
| bRemoteInterfaceIdentifier | BYTE | 8 | +100 | +100 | リモートのIPv6インターフェイス識別子(8バイト)。 |
| bPrefix | BYTE | 8 | +108 | +108 | 割り当てられたIPv6プレフィックス(8バイト)。 |
| dwPrefixLength | DWORD | 4 | +116 | +116 | IPv6プレフィックスの長さ(ビット数)。 |
| IPv6SubInterfaceIndex | ULONGLONG | 8 | +120 | +120 | IPv6サブインターフェイスのインデックス(64ビット)。 |
| dwLcpError | DWORD | 4 | +128 | +128 | LCPネゴシエーションのエラーコード。0なら正常。 |
| dwAuthenticationProtocol | PPP_LCP | 4 | +132 | +132 | ローカルの認証プロトコル(PPP_LCP列挙値)。 |
| dwAuthenticationData | PPP_LCP_INFO_AUTH_DATA | 4 | +136 | +136 | ローカルの認証データ種別(PPP_LCP_INFO_AUTH_DATA)。 |
| dwRemoteAuthenticationProtocol | PPP_LCP | 4 | +140 | +140 | リモートの認証プロトコル(PPP_LCP列挙値)。 |
| dwRemoteAuthenticationData | PPP_LCP_INFO_AUTH_DATA | 4 | +144 | +144 | リモートの認証データ種別。 |
| dwLcpTerminateReason | DWORD | 4 | +148 | +148 | ローカル側のLCP終了理由コード。 |
| dwLcpRemoteTerminateReason | DWORD | 4 | +152 | +152 | リモート側のLCP終了理由コード。 |
| dwLcpOptions | DWORD | 4 | +156 | +156 | ローカルのLCPオプションフラグ。 |
| dwLcpRemoteOptions | DWORD | 4 | +160 | +160 | リモートのLCPオプションフラグ。 |
| dwEapTypeId | DWORD | 4 | +164 | +164 | ローカルのEAPタイプ識別子。 |
| dwRemoteEapTypeId | DWORD | 4 | +168 | +168 | リモートのEAPタイプ識別子。 |
| dwCcpError | DWORD | 4 | +172 | +172 | CCP圧縮制御のエラーコード。0なら正常。 |
| dwCompressionAlgorithm | DWORD | 4 | +176 | +176 | ローカルの圧縮アルゴリズム。 |
| dwCcpOptions | DWORD | 4 | +180 | +180 | ローカルのCCPオプションフラグ。 |
| dwRemoteCompressionAlgorithm | DWORD | 4 | +184 | +184 | リモートの圧縮アルゴリズム。 |
| dwCcpRemoteOptions | DWORD | 4 | +188 | +188 | リモートのCCPオプションフラグ。 |
各言語での定義
#include <windows.h>
// PPP_PROJECTION_INFO (x64 192 / x86 192 バイト)
typedef struct PPP_PROJECTION_INFO {
DWORD dwIPv4NegotiationError;
WCHAR wszAddress[16];
WCHAR wszRemoteAddress[16];
DWORD dwIPv4Options;
DWORD dwIPv4RemoteOptions;
ULONGLONG IPv4SubInterfaceIndex;
DWORD dwIPv6NegotiationError;
BYTE bInterfaceIdentifier[8];
BYTE bRemoteInterfaceIdentifier[8];
BYTE bPrefix[8];
DWORD dwPrefixLength;
ULONGLONG IPv6SubInterfaceIndex;
DWORD dwLcpError;
PPP_LCP dwAuthenticationProtocol;
PPP_LCP_INFO_AUTH_DATA dwAuthenticationData;
PPP_LCP dwRemoteAuthenticationProtocol;
PPP_LCP_INFO_AUTH_DATA dwRemoteAuthenticationData;
DWORD dwLcpTerminateReason;
DWORD dwLcpRemoteTerminateReason;
DWORD dwLcpOptions;
DWORD dwLcpRemoteOptions;
DWORD dwEapTypeId;
DWORD dwRemoteEapTypeId;
DWORD dwCcpError;
DWORD dwCompressionAlgorithm;
DWORD dwCcpOptions;
DWORD dwRemoteCompressionAlgorithm;
DWORD dwCcpRemoteOptions;
} PPP_PROJECTION_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PPP_PROJECTION_INFO
{
public uint dwIPv4NegotiationError;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)] public string wszAddress;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 16)] public string wszRemoteAddress;
public uint dwIPv4Options;
public uint dwIPv4RemoteOptions;
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 dwLcpError;
public uint dwAuthenticationProtocol;
public uint dwAuthenticationData;
public uint dwRemoteAuthenticationProtocol;
public uint dwRemoteAuthenticationData;
public uint dwLcpTerminateReason;
public uint dwLcpRemoteTerminateReason;
public uint dwLcpOptions;
public uint dwLcpRemoteOptions;
public uint dwEapTypeId;
public uint dwRemoteEapTypeId;
public uint dwCcpError;
public uint dwCompressionAlgorithm;
public uint dwCcpOptions;
public uint dwRemoteCompressionAlgorithm;
public uint dwCcpRemoteOptions;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PPP_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 dwIPv4Options As UInteger
Public dwIPv4RemoteOptions As UInteger
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 dwLcpError As UInteger
Public dwAuthenticationProtocol As UInteger
Public dwAuthenticationData As UInteger
Public dwRemoteAuthenticationProtocol As UInteger
Public dwRemoteAuthenticationData As UInteger
Public dwLcpTerminateReason As UInteger
Public dwLcpRemoteTerminateReason As UInteger
Public dwLcpOptions As UInteger
Public dwLcpRemoteOptions As UInteger
Public dwEapTypeId As UInteger
Public dwRemoteEapTypeId As UInteger
Public dwCcpError As UInteger
Public dwCompressionAlgorithm As UInteger
Public dwCcpOptions As UInteger
Public dwRemoteCompressionAlgorithm As UInteger
Public dwCcpRemoteOptions As UInteger
End Structureimport ctypes
from ctypes import wintypes
class PPP_PROJECTION_INFO(ctypes.Structure):
_fields_ = [
("dwIPv4NegotiationError", wintypes.DWORD),
("wszAddress", ctypes.c_wchar * 16),
("wszRemoteAddress", ctypes.c_wchar * 16),
("dwIPv4Options", wintypes.DWORD),
("dwIPv4RemoteOptions", wintypes.DWORD),
("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),
("dwLcpError", wintypes.DWORD),
("dwAuthenticationProtocol", wintypes.DWORD),
("dwAuthenticationData", wintypes.DWORD),
("dwRemoteAuthenticationProtocol", wintypes.DWORD),
("dwRemoteAuthenticationData", wintypes.DWORD),
("dwLcpTerminateReason", wintypes.DWORD),
("dwLcpRemoteTerminateReason", wintypes.DWORD),
("dwLcpOptions", wintypes.DWORD),
("dwLcpRemoteOptions", wintypes.DWORD),
("dwEapTypeId", wintypes.DWORD),
("dwRemoteEapTypeId", wintypes.DWORD),
("dwCcpError", wintypes.DWORD),
("dwCompressionAlgorithm", wintypes.DWORD),
("dwCcpOptions", wintypes.DWORD),
("dwRemoteCompressionAlgorithm", wintypes.DWORD),
("dwCcpRemoteOptions", wintypes.DWORD),
]#[repr(C)]
pub struct PPP_PROJECTION_INFO {
pub dwIPv4NegotiationError: u32,
pub wszAddress: [u16; 16],
pub wszRemoteAddress: [u16; 16],
pub dwIPv4Options: u32,
pub dwIPv4RemoteOptions: u32,
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 dwLcpError: u32,
pub dwAuthenticationProtocol: u32,
pub dwAuthenticationData: u32,
pub dwRemoteAuthenticationProtocol: u32,
pub dwRemoteAuthenticationData: u32,
pub dwLcpTerminateReason: u32,
pub dwLcpRemoteTerminateReason: u32,
pub dwLcpOptions: u32,
pub dwLcpRemoteOptions: u32,
pub dwEapTypeId: u32,
pub dwRemoteEapTypeId: u32,
pub dwCcpError: u32,
pub dwCompressionAlgorithm: u32,
pub dwCcpOptions: u32,
pub dwRemoteCompressionAlgorithm: u32,
pub dwCcpRemoteOptions: u32,
}import "golang.org/x/sys/windows"
type PPP_PROJECTION_INFO struct {
dwIPv4NegotiationError uint32
wszAddress [16]uint16
wszRemoteAddress [16]uint16
dwIPv4Options uint32
dwIPv4RemoteOptions uint32
IPv4SubInterfaceIndex uint64
dwIPv6NegotiationError uint32
bInterfaceIdentifier [8]byte
bRemoteInterfaceIdentifier [8]byte
bPrefix [8]byte
dwPrefixLength uint32
IPv6SubInterfaceIndex uint64
dwLcpError uint32
dwAuthenticationProtocol uint32
dwAuthenticationData uint32
dwRemoteAuthenticationProtocol uint32
dwRemoteAuthenticationData uint32
dwLcpTerminateReason uint32
dwLcpRemoteTerminateReason uint32
dwLcpOptions uint32
dwLcpRemoteOptions uint32
dwEapTypeId uint32
dwRemoteEapTypeId uint32
dwCcpError uint32
dwCompressionAlgorithm uint32
dwCcpOptions uint32
dwRemoteCompressionAlgorithm uint32
dwCcpRemoteOptions uint32
}type
PPP_PROJECTION_INFO = record
dwIPv4NegotiationError: DWORD;
wszAddress: array[0..15] of WideChar;
wszRemoteAddress: array[0..15] of WideChar;
dwIPv4Options: DWORD;
dwIPv4RemoteOptions: DWORD;
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;
dwLcpError: DWORD;
dwAuthenticationProtocol: DWORD;
dwAuthenticationData: DWORD;
dwRemoteAuthenticationProtocol: DWORD;
dwRemoteAuthenticationData: DWORD;
dwLcpTerminateReason: DWORD;
dwLcpRemoteTerminateReason: DWORD;
dwLcpOptions: DWORD;
dwLcpRemoteOptions: DWORD;
dwEapTypeId: DWORD;
dwRemoteEapTypeId: DWORD;
dwCcpError: DWORD;
dwCompressionAlgorithm: DWORD;
dwCcpOptions: DWORD;
dwRemoteCompressionAlgorithm: DWORD;
dwCcpRemoteOptions: DWORD;
end;const PPP_PROJECTION_INFO = extern struct {
dwIPv4NegotiationError: u32,
wszAddress: [16]u16,
wszRemoteAddress: [16]u16,
dwIPv4Options: u32,
dwIPv4RemoteOptions: u32,
IPv4SubInterfaceIndex: u64,
dwIPv6NegotiationError: u32,
bInterfaceIdentifier: [8]u8,
bRemoteInterfaceIdentifier: [8]u8,
bPrefix: [8]u8,
dwPrefixLength: u32,
IPv6SubInterfaceIndex: u64,
dwLcpError: u32,
dwAuthenticationProtocol: u32,
dwAuthenticationData: u32,
dwRemoteAuthenticationProtocol: u32,
dwRemoteAuthenticationData: u32,
dwLcpTerminateReason: u32,
dwLcpRemoteTerminateReason: u32,
dwLcpOptions: u32,
dwLcpRemoteOptions: u32,
dwEapTypeId: u32,
dwRemoteEapTypeId: u32,
dwCcpError: u32,
dwCompressionAlgorithm: u32,
dwCcpOptions: u32,
dwRemoteCompressionAlgorithm: u32,
dwCcpRemoteOptions: u32,
};type
PPP_PROJECTION_INFO {.bycopy.} = object
dwIPv4NegotiationError: uint32
wszAddress: array[16, uint16]
wszRemoteAddress: array[16, uint16]
dwIPv4Options: uint32
dwIPv4RemoteOptions: uint32
IPv4SubInterfaceIndex: uint64
dwIPv6NegotiationError: uint32
bInterfaceIdentifier: array[8, uint8]
bRemoteInterfaceIdentifier: array[8, uint8]
bPrefix: array[8, uint8]
dwPrefixLength: uint32
IPv6SubInterfaceIndex: uint64
dwLcpError: uint32
dwAuthenticationProtocol: uint32
dwAuthenticationData: uint32
dwRemoteAuthenticationProtocol: uint32
dwRemoteAuthenticationData: uint32
dwLcpTerminateReason: uint32
dwLcpRemoteTerminateReason: uint32
dwLcpOptions: uint32
dwLcpRemoteOptions: uint32
dwEapTypeId: uint32
dwRemoteEapTypeId: uint32
dwCcpError: uint32
dwCompressionAlgorithm: uint32
dwCcpOptions: uint32
dwRemoteCompressionAlgorithm: uint32
dwCcpRemoteOptions: uint32struct PPP_PROJECTION_INFO
{
uint dwIPv4NegotiationError;
wchar[16] wszAddress;
wchar[16] wszRemoteAddress;
uint dwIPv4Options;
uint dwIPv4RemoteOptions;
ulong IPv4SubInterfaceIndex;
uint dwIPv6NegotiationError;
ubyte[8] bInterfaceIdentifier;
ubyte[8] bRemoteInterfaceIdentifier;
ubyte[8] bPrefix;
uint dwPrefixLength;
ulong IPv6SubInterfaceIndex;
uint dwLcpError;
uint dwAuthenticationProtocol;
uint dwAuthenticationData;
uint dwRemoteAuthenticationProtocol;
uint dwRemoteAuthenticationData;
uint dwLcpTerminateReason;
uint dwLcpRemoteTerminateReason;
uint dwLcpOptions;
uint dwLcpRemoteOptions;
uint dwEapTypeId;
uint dwRemoteEapTypeId;
uint dwCcpError;
uint dwCompressionAlgorithm;
uint dwCcpOptions;
uint dwRemoteCompressionAlgorithm;
uint dwCcpRemoteOptions;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; PPP_PROJECTION_INFO サイズ: 192 バイト(x64)
dim st, 48 ; 4byte整数×48(構造体サイズ 192 / 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:入れ子/配列)
; dwIPv4Options : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; dwIPv4RemoteOptions : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; IPv4SubInterfaceIndex : ULONGLONG (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; dwIPv6NegotiationError : DWORD (+88, 4byte) st.22 = 値 / 値 = st.22 (lpoke/lpeek も可)
; bInterfaceIdentifier : BYTE (+92, 8byte) varptr(st)+92 を基点に操作(8byte:入れ子/配列)
; bRemoteInterfaceIdentifier : BYTE (+100, 8byte) varptr(st)+100 を基点に操作(8byte:入れ子/配列)
; bPrefix : BYTE (+108, 8byte) varptr(st)+108 を基点に操作(8byte:入れ子/配列)
; dwPrefixLength : DWORD (+116, 4byte) st.29 = 値 / 値 = st.29 (lpoke/lpeek も可)
; IPv6SubInterfaceIndex : ULONGLONG (+120, 8byte) qpoke st,120,値 / qpeek(st,120) ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; dwLcpError : DWORD (+128, 4byte) st.32 = 値 / 値 = st.32 (lpoke/lpeek も可)
; dwAuthenticationProtocol : PPP_LCP (+132, 4byte) st.33 = 値 / 値 = st.33 (lpoke/lpeek も可)
; dwAuthenticationData : PPP_LCP_INFO_AUTH_DATA (+136, 4byte) st.34 = 値 / 値 = st.34 (lpoke/lpeek も可)
; dwRemoteAuthenticationProtocol : PPP_LCP (+140, 4byte) st.35 = 値 / 値 = st.35 (lpoke/lpeek も可)
; dwRemoteAuthenticationData : PPP_LCP_INFO_AUTH_DATA (+144, 4byte) st.36 = 値 / 値 = st.36 (lpoke/lpeek も可)
; dwLcpTerminateReason : DWORD (+148, 4byte) st.37 = 値 / 値 = st.37 (lpoke/lpeek も可)
; dwLcpRemoteTerminateReason : DWORD (+152, 4byte) st.38 = 値 / 値 = st.38 (lpoke/lpeek も可)
; dwLcpOptions : DWORD (+156, 4byte) st.39 = 値 / 値 = st.39 (lpoke/lpeek も可)
; dwLcpRemoteOptions : DWORD (+160, 4byte) st.40 = 値 / 値 = st.40 (lpoke/lpeek も可)
; dwEapTypeId : DWORD (+164, 4byte) st.41 = 値 / 値 = st.41 (lpoke/lpeek も可)
; dwRemoteEapTypeId : DWORD (+168, 4byte) st.42 = 値 / 値 = st.42 (lpoke/lpeek も可)
; dwCcpError : DWORD (+172, 4byte) st.43 = 値 / 値 = st.43 (lpoke/lpeek も可)
; dwCompressionAlgorithm : DWORD (+176, 4byte) st.44 = 値 / 値 = st.44 (lpoke/lpeek も可)
; dwCcpOptions : DWORD (+180, 4byte) st.45 = 値 / 値 = st.45 (lpoke/lpeek も可)
; dwRemoteCompressionAlgorithm : DWORD (+184, 4byte) st.46 = 値 / 値 = st.46 (lpoke/lpeek も可)
; dwCcpRemoteOptions : DWORD (+188, 4byte) st.47 = 値 / 値 = st.47 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global PPP_PROJECTION_INFO
#field int dwIPv4NegotiationError
#field wchar wszAddress 16
#field wchar wszRemoteAddress 16
#field int dwIPv4Options
#field int dwIPv4RemoteOptions
#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 dwLcpError
#field int dwAuthenticationProtocol
#field int dwAuthenticationData
#field int dwRemoteAuthenticationProtocol
#field int dwRemoteAuthenticationData
#field int dwLcpTerminateReason
#field int dwLcpRemoteTerminateReason
#field int dwLcpOptions
#field int dwLcpRemoteOptions
#field int dwEapTypeId
#field int dwRemoteEapTypeId
#field int dwCcpError
#field int dwCompressionAlgorithm
#field int dwCcpOptions
#field int dwRemoteCompressionAlgorithm
#field int dwCcpRemoteOptions
#endstruct
stdim st, PPP_PROJECTION_INFO ; NSTRUCT 変数を確保
st->dwIPv4NegotiationError = 100
mes "dwIPv4NegotiationError=" + st->dwIPv4NegotiationError