Win32 API 日本語リファレンス
ホームNetworkManagement.WiFi › ONEX_RESULT_UPDATE_DATA

ONEX_RESULT_UPDATE_DATA

構造体
サイズx64: 40 バイト / x86: 40 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
oneXStatusONEX_STATUS12+0+0現在の 802.1X 認証状態を指定します。詳細については、ONEX_STATUS 構造体を参照してください。
BackendSupportONEX_EAP_METHOD_BACKEND_SUPPORT4+12+12

サプリカントで構成された EAP メソッドが、802.1X 認証サーバーでサポートされているかどうかを示します。

EAP では、一部またはすべての認証メソッドを実装するバックエンド認証サーバーを使用できます。この場合、オーセンティケーターは一部またはすべてのメソッドおよびピアに対してパススルーとして動作します。詳細については、IETF が公開している RFC 3748 および ONEX_EAP_METHOD_BACKEND_SUPPORT 列挙型を参照してください。

fBackendEngagedBOOL4+16+16802.1X 認証サーバーから応答を受信したかどうかを示します。
_bitfieldDWORD4+20+20付随データの有無を示すフラグのビットフィールド。
authParamsONEX_VARIABLE_BLOB8+24+24802.1X 認証パラメーターです。fOneXAuthParams ビットフィールドメンバーが設定されている場合、このメンバーには ONEX_VARIABLE_BLOBdwOffset メンバーの位置から始まる ONEX_AUTH_PARAMS 構造体が埋め込まれています。
eapErrorONEX_VARIABLE_BLOB8+32+32EAP のエラー値です。fEapError ビットフィールドメンバーが設定されている場合、このメンバーには ONEX_VARIABLE_BLOBdwOffset メンバーの位置から始まる ONEX_EAP_ERROR 構造体が埋め込まれています。

公式ドキュメント

ONEX_RESULT_UPDATE_DATA 構造体は、802.1X 認証の状態変化に関する情報を格納します。

解説(Remarks)

ONEX_RESULT_UPDATE_DATA 構造体は、Windows Vista 以降でサポートされる新しいワイヤレス構成コンポーネントである 802.1X モジュールによって使用されます。

ONEX_RESULT_UPDATE_DATA は、802.1X 認証の状態変化に関する情報を格納します。この構造体は、WLAN_NOTIFICATION_DATA 構造体の NotificationSource メンバーが WLAN_NOTIFICATION_SOURCE_ONEX であり、受信した通知の WLAN_NOTIFICATION_DATA 構造体の NotificationCode メンバーが OneXNotificationTypeResultUpdate である場合に返されます。この通知では、WLAN_NOTIFICATION_DATA 構造体の pData メンバーが、802.1X 認証の状態変化に関する情報を格納する ONEX_RESULT_UPDATE_DATA 構造体を指します。

出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での定義

#include <windows.h>

// ONEX_STATUS  (x64 12 / x86 12 バイト)
typedef struct ONEX_STATUS {
    ONEX_AUTH_STATUS authStatus;
    DWORD dwReason;
    DWORD dwError;
} ONEX_STATUS;

// ONEX_VARIABLE_BLOB  (x64 8 / x86 8 バイト)
typedef struct ONEX_VARIABLE_BLOB {
    DWORD dwSize;
    DWORD dwOffset;
} ONEX_VARIABLE_BLOB;

// ONEX_RESULT_UPDATE_DATA  (x64 40 / x86 40 バイト)
typedef struct ONEX_RESULT_UPDATE_DATA {
    ONEX_STATUS oneXStatus;
    ONEX_EAP_METHOD_BACKEND_SUPPORT BackendSupport;
    BOOL fBackendEngaged;
    DWORD _bitfield;
    ONEX_VARIABLE_BLOB authParams;
    ONEX_VARIABLE_BLOB eapError;
} ONEX_RESULT_UPDATE_DATA;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ONEX_STATUS
{
    public int authStatus;
    public uint dwReason;
    public uint dwError;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ONEX_VARIABLE_BLOB
{
    public uint dwSize;
    public uint dwOffset;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct ONEX_RESULT_UPDATE_DATA
{
    public ONEX_STATUS oneXStatus;
    public int BackendSupport;
    [MarshalAs(UnmanagedType.Bool)] public bool fBackendEngaged;
    public uint _bitfield;
    public ONEX_VARIABLE_BLOB authParams;
    public ONEX_VARIABLE_BLOB eapError;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ONEX_STATUS
    Public authStatus As Integer
    Public dwReason As UInteger
    Public dwError As UInteger
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ONEX_VARIABLE_BLOB
    Public dwSize As UInteger
    Public dwOffset As UInteger
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure ONEX_RESULT_UPDATE_DATA
    Public oneXStatus As ONEX_STATUS
    Public BackendSupport As Integer
    <MarshalAs(UnmanagedType.Bool)> Public fBackendEngaged As Boolean
    Public _bitfield As UInteger
    Public authParams As ONEX_VARIABLE_BLOB
    Public eapError As ONEX_VARIABLE_BLOB
End Structure
import ctypes
from ctypes import wintypes

class ONEX_STATUS(ctypes.Structure):
    _fields_ = [
        ("authStatus", ctypes.c_int),
        ("dwReason", wintypes.DWORD),
        ("dwError", wintypes.DWORD),
    ]

class ONEX_VARIABLE_BLOB(ctypes.Structure):
    _fields_ = [
        ("dwSize", wintypes.DWORD),
        ("dwOffset", wintypes.DWORD),
    ]

class ONEX_RESULT_UPDATE_DATA(ctypes.Structure):
    _fields_ = [
        ("oneXStatus", ONEX_STATUS),
        ("BackendSupport", ctypes.c_int),
        ("fBackendEngaged", wintypes.BOOL),
        ("_bitfield", wintypes.DWORD),
        ("authParams", ONEX_VARIABLE_BLOB),
        ("eapError", ONEX_VARIABLE_BLOB),
    ]
#[repr(C)]
pub struct ONEX_STATUS {
    pub authStatus: i32,
    pub dwReason: u32,
    pub dwError: u32,
}

#[repr(C)]
pub struct ONEX_VARIABLE_BLOB {
    pub dwSize: u32,
    pub dwOffset: u32,
}

#[repr(C)]
pub struct ONEX_RESULT_UPDATE_DATA {
    pub oneXStatus: ONEX_STATUS,
    pub BackendSupport: i32,
    pub fBackendEngaged: i32,
    pub _bitfield: u32,
    pub authParams: ONEX_VARIABLE_BLOB,
    pub eapError: ONEX_VARIABLE_BLOB,
}
import "golang.org/x/sys/windows"

type ONEX_STATUS struct {
	authStatus int32
	dwReason uint32
	dwError uint32
}

type ONEX_VARIABLE_BLOB struct {
	dwSize uint32
	dwOffset uint32
}

type ONEX_RESULT_UPDATE_DATA struct {
	oneXStatus ONEX_STATUS
	BackendSupport int32
	fBackendEngaged int32
	_bitfield uint32
	authParams ONEX_VARIABLE_BLOB
	eapError ONEX_VARIABLE_BLOB
}
type
  ONEX_STATUS = record
    authStatus: Integer;
    dwReason: DWORD;
    dwError: DWORD;
  end;

  ONEX_VARIABLE_BLOB = record
    dwSize: DWORD;
    dwOffset: DWORD;
  end;

  ONEX_RESULT_UPDATE_DATA = record
    oneXStatus: ONEX_STATUS;
    BackendSupport: Integer;
    fBackendEngaged: BOOL;
    _bitfield: DWORD;
    authParams: ONEX_VARIABLE_BLOB;
    eapError: ONEX_VARIABLE_BLOB;
  end;
const ONEX_STATUS = extern struct {
    authStatus: i32,
    dwReason: u32,
    dwError: u32,
};

const ONEX_VARIABLE_BLOB = extern struct {
    dwSize: u32,
    dwOffset: u32,
};

const ONEX_RESULT_UPDATE_DATA = extern struct {
    oneXStatus: ONEX_STATUS,
    BackendSupport: i32,
    fBackendEngaged: i32,
    _bitfield: u32,
    authParams: ONEX_VARIABLE_BLOB,
    eapError: ONEX_VARIABLE_BLOB,
};
type
  ONEX_STATUS {.bycopy.} = object
    authStatus: int32
    dwReason: uint32
    dwError: uint32

  ONEX_VARIABLE_BLOB {.bycopy.} = object
    dwSize: uint32
    dwOffset: uint32

  ONEX_RESULT_UPDATE_DATA {.bycopy.} = object
    oneXStatus: ONEX_STATUS
    BackendSupport: int32
    fBackendEngaged: int32
    _bitfield: uint32
    authParams: ONEX_VARIABLE_BLOB
    eapError: ONEX_VARIABLE_BLOB
struct ONEX_STATUS
{
    int authStatus;
    uint dwReason;
    uint dwError;
}

struct ONEX_VARIABLE_BLOB
{
    uint dwSize;
    uint dwOffset;
}

struct ONEX_RESULT_UPDATE_DATA
{
    ONEX_STATUS oneXStatus;
    int BackendSupport;
    int fBackendEngaged;
    uint _bitfield;
    ONEX_VARIABLE_BLOB authParams;
    ONEX_VARIABLE_BLOB eapError;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; ONEX_RESULT_UPDATE_DATA サイズ: 40 バイト(x64)
dim st, 10    ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; oneXStatus : ONEX_STATUS (+0, 12byte)  varptr(st)+0 を基点に操作(12byte:入れ子/配列)
; BackendSupport : ONEX_EAP_METHOD_BACKEND_SUPPORT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; fBackendEngaged : BOOL (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; _bitfield : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; authParams : ONEX_VARIABLE_BLOB (+24, 8byte)  varptr(st)+24 を基点に操作(8byte:入れ子/配列)
; eapError : ONEX_VARIABLE_BLOB (+32, 8byte)  varptr(st)+32 を基点に操作(8byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global ONEX_STATUS
    #field int authStatus
    #field int dwReason
    #field int dwError
#endstruct

#defstruct global ONEX_VARIABLE_BLOB
    #field int dwSize
    #field int dwOffset
#endstruct

#defstruct global ONEX_RESULT_UPDATE_DATA
    #field ONEX_STATUS oneXStatus
    #field int BackendSupport
    #field bool fBackendEngaged
    #field int _bitfield
    #field ONEX_VARIABLE_BLOB authParams
    #field ONEX_VARIABLE_BLOB eapError
#endstruct

stdim st, ONEX_RESULT_UPDATE_DATA        ; NSTRUCT 変数を確保
st->BackendSupport = 100
mes "BackendSupport=" + st->BackendSupport