ホーム › NetworkManagement.Rras › PPP_LCP_INFO
PPP_LCP_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| dwError | DWORD | 4 | +0 | +0 | ネゴシエーションが失敗した場合に発生したエラーを指定します。 | ||||||||||||||
| dwAuthenticationProtocol | PPP_LCP | 4 | +4 | +4 | ローカルコンピューターの認証に使用された認証プロトコルを指定します。このメンバーには次のいずれかの値を指定できます。 | ||||||||||||||
| dwAuthenticationData | PPP_LCP_INFO_AUTH_DATA | 4 | +8 | +8 | dwAuthenticationProtocol メンバーで指定された認証プロトコルに関する追加情報を指定します。このメンバーには次のいずれかの値を指定できます。
| ||||||||||||||
| dwRemoteAuthenticationProtocol | DWORD | 4 | +12 | +12 | リモートコンピューターの認証に使用された認証プロトコルを指定します。指定できる値の一覧については、dwAuthenticationProtocol メンバーを参照してください。 | ||||||||||||||
| dwRemoteAuthenticationData | DWORD | 4 | +16 | +16 | dwRemoteAuthenticationProtocol で指定された認証プロトコルに関する追加情報を指定します。指定できる値の一覧については、dwAuthenticationData メンバーを参照してください。 | ||||||||||||||
| dwTerminateReason | DWORD | 4 | +20 | +20 | ローカルコンピューターが接続を終了した理由を指定します。このメンバーの値は常に 0 です。 | ||||||||||||||
| dwRemoteTerminateReason | DWORD | 4 | +24 | +24 | リモートコンピューターが接続を終了した理由を指定します。このメンバーの値は常に 0 です。 | ||||||||||||||
| dwOptions | DWORD | 4 | +28 | +28 | ローカルコンピューターが使用している LCP オプションに関する情報を指定します。このメンバーは次のフラグの組み合わせです。
| ||||||||||||||
| dwRemoteOptions | DWORD | 4 | +32 | +32 | リモートコンピューターが使用している LCP オプションに関する情報を指定します。このメンバーは次のフラグの組み合わせです。
| ||||||||||||||
| dwEapTypeId | DWORD | 4 | +36 | +36 | ローカルコンピューターの認証に使用された拡張認証プロトコル (EAP) の型識別子を指定します。このメンバーの値が有効なのは、dwAuthenticationProtocol が PPP_LCP_EAP の場合のみです。 | ||||||||||||||
| dwRemoteEapTypeId | DWORD | 4 | +40 | +40 | リモートコンピューターの認証に使用された拡張認証プロトコル (EAP) の型識別子を指定します。このメンバーの値が有効なのは、dwRemoteAuthenticationProtocol が PPP_LCP_EAP の場合のみです。 |
公式ドキュメント
PPP_LCP_INFO 構造体には、PPP リンク制御プロトコル (LCP) ネゴシエーションの結果を示す情報が格納されます。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// PPP_LCP_INFO (x64 44 / x86 44 バイト)
typedef struct PPP_LCP_INFO {
DWORD dwError;
PPP_LCP dwAuthenticationProtocol;
PPP_LCP_INFO_AUTH_DATA dwAuthenticationData;
DWORD dwRemoteAuthenticationProtocol;
DWORD dwRemoteAuthenticationData;
DWORD dwTerminateReason;
DWORD dwRemoteTerminateReason;
DWORD dwOptions;
DWORD dwRemoteOptions;
DWORD dwEapTypeId;
DWORD dwRemoteEapTypeId;
} PPP_LCP_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct PPP_LCP_INFO
{
public uint dwError;
public uint dwAuthenticationProtocol;
public uint dwAuthenticationData;
public uint dwRemoteAuthenticationProtocol;
public uint dwRemoteAuthenticationData;
public uint dwTerminateReason;
public uint dwRemoteTerminateReason;
public uint dwOptions;
public uint dwRemoteOptions;
public uint dwEapTypeId;
public uint dwRemoteEapTypeId;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure PPP_LCP_INFO
Public dwError As UInteger
Public dwAuthenticationProtocol As UInteger
Public dwAuthenticationData As UInteger
Public dwRemoteAuthenticationProtocol As UInteger
Public dwRemoteAuthenticationData As UInteger
Public dwTerminateReason As UInteger
Public dwRemoteTerminateReason As UInteger
Public dwOptions As UInteger
Public dwRemoteOptions As UInteger
Public dwEapTypeId As UInteger
Public dwRemoteEapTypeId As UInteger
End Structureimport ctypes
from ctypes import wintypes
class PPP_LCP_INFO(ctypes.Structure):
_fields_ = [
("dwError", wintypes.DWORD),
("dwAuthenticationProtocol", wintypes.DWORD),
("dwAuthenticationData", wintypes.DWORD),
("dwRemoteAuthenticationProtocol", wintypes.DWORD),
("dwRemoteAuthenticationData", wintypes.DWORD),
("dwTerminateReason", wintypes.DWORD),
("dwRemoteTerminateReason", wintypes.DWORD),
("dwOptions", wintypes.DWORD),
("dwRemoteOptions", wintypes.DWORD),
("dwEapTypeId", wintypes.DWORD),
("dwRemoteEapTypeId", wintypes.DWORD),
]#[repr(C)]
pub struct PPP_LCP_INFO {
pub dwError: u32,
pub dwAuthenticationProtocol: u32,
pub dwAuthenticationData: u32,
pub dwRemoteAuthenticationProtocol: u32,
pub dwRemoteAuthenticationData: u32,
pub dwTerminateReason: u32,
pub dwRemoteTerminateReason: u32,
pub dwOptions: u32,
pub dwRemoteOptions: u32,
pub dwEapTypeId: u32,
pub dwRemoteEapTypeId: u32,
}import "golang.org/x/sys/windows"
type PPP_LCP_INFO struct {
dwError uint32
dwAuthenticationProtocol uint32
dwAuthenticationData uint32
dwRemoteAuthenticationProtocol uint32
dwRemoteAuthenticationData uint32
dwTerminateReason uint32
dwRemoteTerminateReason uint32
dwOptions uint32
dwRemoteOptions uint32
dwEapTypeId uint32
dwRemoteEapTypeId uint32
}type
PPP_LCP_INFO = record
dwError: DWORD;
dwAuthenticationProtocol: DWORD;
dwAuthenticationData: DWORD;
dwRemoteAuthenticationProtocol: DWORD;
dwRemoteAuthenticationData: DWORD;
dwTerminateReason: DWORD;
dwRemoteTerminateReason: DWORD;
dwOptions: DWORD;
dwRemoteOptions: DWORD;
dwEapTypeId: DWORD;
dwRemoteEapTypeId: DWORD;
end;const PPP_LCP_INFO = extern struct {
dwError: u32,
dwAuthenticationProtocol: u32,
dwAuthenticationData: u32,
dwRemoteAuthenticationProtocol: u32,
dwRemoteAuthenticationData: u32,
dwTerminateReason: u32,
dwRemoteTerminateReason: u32,
dwOptions: u32,
dwRemoteOptions: u32,
dwEapTypeId: u32,
dwRemoteEapTypeId: u32,
};type
PPP_LCP_INFO {.bycopy.} = object
dwError: uint32
dwAuthenticationProtocol: uint32
dwAuthenticationData: uint32
dwRemoteAuthenticationProtocol: uint32
dwRemoteAuthenticationData: uint32
dwTerminateReason: uint32
dwRemoteTerminateReason: uint32
dwOptions: uint32
dwRemoteOptions: uint32
dwEapTypeId: uint32
dwRemoteEapTypeId: uint32struct PPP_LCP_INFO
{
uint dwError;
uint dwAuthenticationProtocol;
uint dwAuthenticationData;
uint dwRemoteAuthenticationProtocol;
uint dwRemoteAuthenticationData;
uint dwTerminateReason;
uint dwRemoteTerminateReason;
uint dwOptions;
uint dwRemoteOptions;
uint dwEapTypeId;
uint dwRemoteEapTypeId;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; PPP_LCP_INFO サイズ: 44 バイト(x64)
dim st, 11 ; 4byte整数×11(構造体サイズ 44 / 4 切り上げ)
; dwError : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwAuthenticationProtocol : PPP_LCP (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwAuthenticationData : PPP_LCP_INFO_AUTH_DATA (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwRemoteAuthenticationProtocol : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; dwRemoteAuthenticationData : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; dwTerminateReason : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; dwRemoteTerminateReason : DWORD (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; dwOptions : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; dwRemoteOptions : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; dwEapTypeId : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; dwRemoteEapTypeId : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global PPP_LCP_INFO
#field int dwError
#field int dwAuthenticationProtocol
#field int dwAuthenticationData
#field int dwRemoteAuthenticationProtocol
#field int dwRemoteAuthenticationData
#field int dwTerminateReason
#field int dwRemoteTerminateReason
#field int dwOptions
#field int dwRemoteOptions
#field int dwEapTypeId
#field int dwRemoteEapTypeId
#endstruct
stdim st, PPP_LCP_INFO ; NSTRUCT 変数を確保
st->dwError = 100
mes "dwError=" + st->dwError