ホーム › Security.ExtensibleAuthenticationProtocol › PPP_EAP_INPUT
PPP_EAP_INPUT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwSizeInBytes | DWORD | 4 | +0 | +0 | この構造体のバイト数。 |
| fFlags | DWORD | 4 | +4 | +4 | EAP処理の動作を制御するフラグの組み合わせ。 |
| fAuthenticator | BOOL | 4 | +8 | +8 | 認証側として動作するかを示す真偽値。 |
| pwszIdentity | LPWSTR | 8/4 | +16 | +12 | 認証に使うユーザーIDの文字列。NULL可。 |
| pwszPassword | LPWSTR | 8/4 | +24 | +16 | 認証に使うパスワード文字列。NULL可。 |
| bInitialId | BYTE | 1 | +32 | +20 | 最初のEAPパケットに使う識別子の初期値。 |
| pUserAttributes | RAS_AUTH_ATTRIBUTE* | 8/4 | +40 | +24 | ユーザーに関連付けられたRAS認証属性配列へのポインタ。 |
| fAuthenticationComplete | BOOL | 4 | +48 | +28 | 認証処理が完了したかを示す真偽値。 |
| dwAuthResultCode | DWORD | 4 | +52 | +32 | 認証結果コード。Win32エラーコードで表す。 |
| hTokenImpersonateUser | HANDLE | 8/4 | +56 | +36 | 認証成功時にユーザーを偽装するためのトークンハンドル。 |
| fSuccessPacketReceived | BOOL | 4 | +64 | +40 | 成功EAPパケットを受信したかを示す真偽値。 |
| fDataReceivedFromInteractiveUI | BOOL | 4 | +68 | +44 | 対話型UIからデータを受信したかを示す真偽値。 |
| pDataFromInteractiveUI | BYTE* | 8/4 | +72 | +48 | 対話型UIから受け取ったデータへのポインタ。 |
| dwSizeOfDataFromInteractiveUI | DWORD | 4 | +80 | +52 | pDataFromInteractiveUIのバイト数。 |
| pConnectionData | BYTE* | 8/4 | +88 | +56 | 接続単位の構成データへのポインタ。 |
| dwSizeOfConnectionData | DWORD | 4 | +96 | +60 | pConnectionDataのバイト数。 |
| pUserData | BYTE* | 8/4 | +104 | +64 | ユーザー単位の構成データへのポインタ。 |
| dwSizeOfUserData | DWORD | 4 | +112 | +68 | pUserDataのバイト数。 |
| hReserved | HANDLE | 8/4 | +120 | +72 | 予約済みのハンドル。 |
| guidConnectionId | GUID | 16 | +128 | +76 | 接続を一意に識別するGUID。 |
| isVpn | BOOL | 4 | +144 | +92 | VPN接続かどうかを示す真偽値。 |
各言語での定義
#include <windows.h>
// PPP_EAP_INPUT (x64 152 / x86 96 バイト)
typedef struct PPP_EAP_INPUT {
DWORD dwSizeInBytes;
DWORD fFlags;
BOOL fAuthenticator;
LPWSTR pwszIdentity;
LPWSTR pwszPassword;
BYTE bInitialId;
RAS_AUTH_ATTRIBUTE* pUserAttributes;
BOOL fAuthenticationComplete;
DWORD dwAuthResultCode;
HANDLE hTokenImpersonateUser;
BOOL fSuccessPacketReceived;
BOOL fDataReceivedFromInteractiveUI;
BYTE* pDataFromInteractiveUI;
DWORD dwSizeOfDataFromInteractiveUI;
BYTE* pConnectionData;
DWORD dwSizeOfConnectionData;
BYTE* pUserData;
DWORD dwSizeOfUserData;
HANDLE hReserved;
GUID guidConnectionId;
BOOL isVpn;
} PPP_EAP_INPUT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PPP_EAP_INPUT
{
public uint dwSizeInBytes;
public uint fFlags;
[MarshalAs(UnmanagedType.Bool)] public bool fAuthenticator;
public IntPtr pwszIdentity;
public IntPtr pwszPassword;
public byte bInitialId;
public IntPtr pUserAttributes;
[MarshalAs(UnmanagedType.Bool)] public bool fAuthenticationComplete;
public uint dwAuthResultCode;
public IntPtr hTokenImpersonateUser;
[MarshalAs(UnmanagedType.Bool)] public bool fSuccessPacketReceived;
[MarshalAs(UnmanagedType.Bool)] public bool fDataReceivedFromInteractiveUI;
public IntPtr pDataFromInteractiveUI;
public uint dwSizeOfDataFromInteractiveUI;
public IntPtr pConnectionData;
public uint dwSizeOfConnectionData;
public IntPtr pUserData;
public uint dwSizeOfUserData;
public IntPtr hReserved;
public Guid guidConnectionId;
[MarshalAs(UnmanagedType.Bool)] public bool isVpn;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PPP_EAP_INPUT
Public dwSizeInBytes As UInteger
Public fFlags As UInteger
<MarshalAs(UnmanagedType.Bool)> Public fAuthenticator As Boolean
Public pwszIdentity As IntPtr
Public pwszPassword As IntPtr
Public bInitialId As Byte
Public pUserAttributes As IntPtr
<MarshalAs(UnmanagedType.Bool)> Public fAuthenticationComplete As Boolean
Public dwAuthResultCode As UInteger
Public hTokenImpersonateUser As IntPtr
<MarshalAs(UnmanagedType.Bool)> Public fSuccessPacketReceived As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fDataReceivedFromInteractiveUI As Boolean
Public pDataFromInteractiveUI As IntPtr
Public dwSizeOfDataFromInteractiveUI As UInteger
Public pConnectionData As IntPtr
Public dwSizeOfConnectionData As UInteger
Public pUserData As IntPtr
Public dwSizeOfUserData As UInteger
Public hReserved As IntPtr
Public guidConnectionId As Guid
<MarshalAs(UnmanagedType.Bool)> Public isVpn As Boolean
End Structureimport ctypes
from ctypes import wintypes
class PPP_EAP_INPUT(ctypes.Structure):
_fields_ = [
("dwSizeInBytes", wintypes.DWORD),
("fFlags", wintypes.DWORD),
("fAuthenticator", wintypes.BOOL),
("pwszIdentity", ctypes.c_void_p),
("pwszPassword", ctypes.c_void_p),
("bInitialId", ctypes.c_ubyte),
("pUserAttributes", ctypes.c_void_p),
("fAuthenticationComplete", wintypes.BOOL),
("dwAuthResultCode", wintypes.DWORD),
("hTokenImpersonateUser", ctypes.c_void_p),
("fSuccessPacketReceived", wintypes.BOOL),
("fDataReceivedFromInteractiveUI", wintypes.BOOL),
("pDataFromInteractiveUI", ctypes.c_void_p),
("dwSizeOfDataFromInteractiveUI", wintypes.DWORD),
("pConnectionData", ctypes.c_void_p),
("dwSizeOfConnectionData", wintypes.DWORD),
("pUserData", ctypes.c_void_p),
("dwSizeOfUserData", wintypes.DWORD),
("hReserved", ctypes.c_void_p),
("guidConnectionId", GUID),
("isVpn", wintypes.BOOL),
]#[repr(C)]
pub struct PPP_EAP_INPUT {
pub dwSizeInBytes: u32,
pub fFlags: u32,
pub fAuthenticator: i32,
pub pwszIdentity: *mut core::ffi::c_void,
pub pwszPassword: *mut core::ffi::c_void,
pub bInitialId: u8,
pub pUserAttributes: *mut core::ffi::c_void,
pub fAuthenticationComplete: i32,
pub dwAuthResultCode: u32,
pub hTokenImpersonateUser: *mut core::ffi::c_void,
pub fSuccessPacketReceived: i32,
pub fDataReceivedFromInteractiveUI: i32,
pub pDataFromInteractiveUI: *mut core::ffi::c_void,
pub dwSizeOfDataFromInteractiveUI: u32,
pub pConnectionData: *mut core::ffi::c_void,
pub dwSizeOfConnectionData: u32,
pub pUserData: *mut core::ffi::c_void,
pub dwSizeOfUserData: u32,
pub hReserved: *mut core::ffi::c_void,
pub guidConnectionId: GUID,
pub isVpn: i32,
}import "golang.org/x/sys/windows"
type PPP_EAP_INPUT struct {
dwSizeInBytes uint32
fFlags uint32
fAuthenticator int32
pwszIdentity uintptr
pwszPassword uintptr
bInitialId byte
pUserAttributes uintptr
fAuthenticationComplete int32
dwAuthResultCode uint32
hTokenImpersonateUser uintptr
fSuccessPacketReceived int32
fDataReceivedFromInteractiveUI int32
pDataFromInteractiveUI uintptr
dwSizeOfDataFromInteractiveUI uint32
pConnectionData uintptr
dwSizeOfConnectionData uint32
pUserData uintptr
dwSizeOfUserData uint32
hReserved uintptr
guidConnectionId windows.GUID
isVpn int32
}type
PPP_EAP_INPUT = record
dwSizeInBytes: DWORD;
fFlags: DWORD;
fAuthenticator: BOOL;
pwszIdentity: Pointer;
pwszPassword: Pointer;
bInitialId: Byte;
pUserAttributes: Pointer;
fAuthenticationComplete: BOOL;
dwAuthResultCode: DWORD;
hTokenImpersonateUser: Pointer;
fSuccessPacketReceived: BOOL;
fDataReceivedFromInteractiveUI: BOOL;
pDataFromInteractiveUI: Pointer;
dwSizeOfDataFromInteractiveUI: DWORD;
pConnectionData: Pointer;
dwSizeOfConnectionData: DWORD;
pUserData: Pointer;
dwSizeOfUserData: DWORD;
hReserved: Pointer;
guidConnectionId: TGUID;
isVpn: BOOL;
end;const PPP_EAP_INPUT = extern struct {
dwSizeInBytes: u32,
fFlags: u32,
fAuthenticator: i32,
pwszIdentity: ?*anyopaque,
pwszPassword: ?*anyopaque,
bInitialId: u8,
pUserAttributes: ?*anyopaque,
fAuthenticationComplete: i32,
dwAuthResultCode: u32,
hTokenImpersonateUser: ?*anyopaque,
fSuccessPacketReceived: i32,
fDataReceivedFromInteractiveUI: i32,
pDataFromInteractiveUI: ?*anyopaque,
dwSizeOfDataFromInteractiveUI: u32,
pConnectionData: ?*anyopaque,
dwSizeOfConnectionData: u32,
pUserData: ?*anyopaque,
dwSizeOfUserData: u32,
hReserved: ?*anyopaque,
guidConnectionId: GUID,
isVpn: i32,
};type
PPP_EAP_INPUT {.bycopy.} = object
dwSizeInBytes: uint32
fFlags: uint32
fAuthenticator: int32
pwszIdentity: pointer
pwszPassword: pointer
bInitialId: uint8
pUserAttributes: pointer
fAuthenticationComplete: int32
dwAuthResultCode: uint32
hTokenImpersonateUser: pointer
fSuccessPacketReceived: int32
fDataReceivedFromInteractiveUI: int32
pDataFromInteractiveUI: pointer
dwSizeOfDataFromInteractiveUI: uint32
pConnectionData: pointer
dwSizeOfConnectionData: uint32
pUserData: pointer
dwSizeOfUserData: uint32
hReserved: pointer
guidConnectionId: GUID
isVpn: int32struct PPP_EAP_INPUT
{
uint dwSizeInBytes;
uint fFlags;
int fAuthenticator;
void* pwszIdentity;
void* pwszPassword;
ubyte bInitialId;
void* pUserAttributes;
int fAuthenticationComplete;
uint dwAuthResultCode;
void* hTokenImpersonateUser;
int fSuccessPacketReceived;
int fDataReceivedFromInteractiveUI;
void* pDataFromInteractiveUI;
uint dwSizeOfDataFromInteractiveUI;
void* pConnectionData;
uint dwSizeOfConnectionData;
void* pUserData;
uint dwSizeOfUserData;
void* hReserved;
GUID guidConnectionId;
int isVpn;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; PPP_EAP_INPUT サイズ: 96 バイト(x86)
dim st, 24 ; 4byte整数×24(構造体サイズ 96 / 4 切り上げ)
; dwSizeInBytes : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fAuthenticator : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pwszIdentity : LPWSTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; pwszPassword : LPWSTR (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; bInitialId : BYTE (+20, 1byte) poke st,20,値 / 値 = peek(st,20)
; pUserAttributes : RAS_AUTH_ATTRIBUTE* (+24, 4byte) varptr(st)+24 を基点に操作(4byte:入れ子/配列)
; fAuthenticationComplete : BOOL (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwAuthResultCode : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; hTokenImpersonateUser : HANDLE (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; fSuccessPacketReceived : BOOL (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; fDataReceivedFromInteractiveUI : BOOL (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; pDataFromInteractiveUI : BYTE* (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; dwSizeOfDataFromInteractiveUI : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; pConnectionData : BYTE* (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; dwSizeOfConnectionData : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; pUserData : BYTE* (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; dwSizeOfUserData : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; hReserved : HANDLE (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; guidConnectionId : GUID (+76, 16byte) varptr(st)+76 を基点に操作(16byte:入れ子/配列)
; isVpn : BOOL (+92, 4byte) st.23 = 値 / 値 = st.23 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; PPP_EAP_INPUT サイズ: 152 バイト(x64)
dim st, 38 ; 4byte整数×38(構造体サイズ 152 / 4 切り上げ)
; dwSizeInBytes : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; fFlags : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; fAuthenticator : BOOL (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; pwszIdentity : LPWSTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; pwszPassword : LPWSTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; bInitialId : BYTE (+32, 1byte) poke st,32,値 / 値 = peek(st,32)
; pUserAttributes : RAS_AUTH_ATTRIBUTE* (+40, 8byte) varptr(st)+40 を基点に操作(8byte:入れ子/配列)
; fAuthenticationComplete : BOOL (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; dwAuthResultCode : DWORD (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; hTokenImpersonateUser : HANDLE (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; fSuccessPacketReceived : BOOL (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; fDataReceivedFromInteractiveUI : BOOL (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; pDataFromInteractiveUI : BYTE* (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; dwSizeOfDataFromInteractiveUI : DWORD (+80, 4byte) st.20 = 値 / 値 = st.20 (lpoke/lpeek も可)
; pConnectionData : BYTE* (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; dwSizeOfConnectionData : DWORD (+96, 4byte) st.24 = 値 / 値 = st.24 (lpoke/lpeek も可)
; pUserData : BYTE* (+104, 8byte) qpoke st,104,値 / qpeek(st,104) ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; dwSizeOfUserData : DWORD (+112, 4byte) st.28 = 値 / 値 = st.28 (lpoke/lpeek も可)
; hReserved : HANDLE (+120, 8byte) qpoke st,120,値 / qpeek(st,120) ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; guidConnectionId : GUID (+128, 16byte) varptr(st)+128 を基点に操作(16byte:入れ子/配列)
; isVpn : BOOL (+144, 4byte) st.36 = 値 / 値 = st.36 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global PPP_EAP_INPUT
#field int dwSizeInBytes
#field int fFlags
#field bool fAuthenticator
#field intptr pwszIdentity
#field intptr pwszPassword
#field byte bInitialId
#field intptr pUserAttributes
#field bool fAuthenticationComplete
#field int dwAuthResultCode
#field intptr hTokenImpersonateUser
#field bool fSuccessPacketReceived
#field bool fDataReceivedFromInteractiveUI
#field intptr pDataFromInteractiveUI
#field int dwSizeOfDataFromInteractiveUI
#field intptr pConnectionData
#field int dwSizeOfConnectionData
#field intptr pUserData
#field int dwSizeOfUserData
#field intptr hReserved
#field GUID guidConnectionId
#field bool isVpn
#endstruct
stdim st, PPP_EAP_INPUT ; NSTRUCT 変数を確保
st->dwSizeInBytes = 100
mes "dwSizeInBytes=" + st->dwSizeInBytes