ホーム › NetworkManagement.WiFi › WLAN_STATISTICS
WLAN_STATISTICS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ullFourWayHandshakeFailures | ULONGLONG | 8 | +0 | +0 | 4ウェイハンドシェイクの失敗回数の累積。 |
| ullTKIPCounterMeasuresInvoked | ULONGLONG | 8 | +8 | +8 | TKIPの対抗措置が発動した回数の累積。 |
| ullReserved | ULONGLONG | 8 | +16 | +16 | 予約フィールド。将来の利用のため確保される。 |
| MacUcastCounters | WLAN_MAC_FRAME_STATISTICS | 96 | +24 | +24 | ユニキャストに関するMACフレーム統計。 |
| MacMcastCounters | WLAN_MAC_FRAME_STATISTICS | 96 | +120 | +120 | マルチキャストに関するMACフレーム統計。 |
| dwNumberOfPhys | DWORD | 4 | +216 | +216 | PhyCountersに含まれるPHYの数。 |
| PhyCounters | WLAN_PHY_FRAME_STATISTICS | 144 | +224 | +224 | 各PHYのフレーム統計の配列(可変長の先頭要素)。 |
各言語での定義
#include <windows.h>
// WLAN_MAC_FRAME_STATISTICS (x64 96 / x86 96 バイト)
typedef struct WLAN_MAC_FRAME_STATISTICS {
ULONGLONG ullTransmittedFrameCount;
ULONGLONG ullReceivedFrameCount;
ULONGLONG ullWEPExcludedCount;
ULONGLONG ullTKIPLocalMICFailures;
ULONGLONG ullTKIPReplays;
ULONGLONG ullTKIPICVErrorCount;
ULONGLONG ullCCMPReplays;
ULONGLONG ullCCMPDecryptErrors;
ULONGLONG ullWEPUndecryptableCount;
ULONGLONG ullWEPICVErrorCount;
ULONGLONG ullDecryptSuccessCount;
ULONGLONG ullDecryptFailureCount;
} WLAN_MAC_FRAME_STATISTICS;
// WLAN_PHY_FRAME_STATISTICS (x64 144 / x86 144 バイト)
typedef struct WLAN_PHY_FRAME_STATISTICS {
ULONGLONG ullTransmittedFrameCount;
ULONGLONG ullMulticastTransmittedFrameCount;
ULONGLONG ullFailedCount;
ULONGLONG ullRetryCount;
ULONGLONG ullMultipleRetryCount;
ULONGLONG ullMaxTXLifetimeExceededCount;
ULONGLONG ullTransmittedFragmentCount;
ULONGLONG ullRTSSuccessCount;
ULONGLONG ullRTSFailureCount;
ULONGLONG ullACKFailureCount;
ULONGLONG ullReceivedFrameCount;
ULONGLONG ullMulticastReceivedFrameCount;
ULONGLONG ullPromiscuousReceivedFrameCount;
ULONGLONG ullMaxRXLifetimeExceededCount;
ULONGLONG ullFrameDuplicateCount;
ULONGLONG ullReceivedFragmentCount;
ULONGLONG ullPromiscuousReceivedFragmentCount;
ULONGLONG ullFCSErrorCount;
} WLAN_PHY_FRAME_STATISTICS;
// WLAN_STATISTICS (x64 368 / x86 368 バイト)
typedef struct WLAN_STATISTICS {
ULONGLONG ullFourWayHandshakeFailures;
ULONGLONG ullTKIPCounterMeasuresInvoked;
ULONGLONG ullReserved;
WLAN_MAC_FRAME_STATISTICS MacUcastCounters;
WLAN_MAC_FRAME_STATISTICS MacMcastCounters;
DWORD dwNumberOfPhys;
WLAN_PHY_FRAME_STATISTICS PhyCounters[1];
} WLAN_STATISTICS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WLAN_MAC_FRAME_STATISTICS
{
public ulong ullTransmittedFrameCount;
public ulong ullReceivedFrameCount;
public ulong ullWEPExcludedCount;
public ulong ullTKIPLocalMICFailures;
public ulong ullTKIPReplays;
public ulong ullTKIPICVErrorCount;
public ulong ullCCMPReplays;
public ulong ullCCMPDecryptErrors;
public ulong ullWEPUndecryptableCount;
public ulong ullWEPICVErrorCount;
public ulong ullDecryptSuccessCount;
public ulong ullDecryptFailureCount;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WLAN_PHY_FRAME_STATISTICS
{
public ulong ullTransmittedFrameCount;
public ulong ullMulticastTransmittedFrameCount;
public ulong ullFailedCount;
public ulong ullRetryCount;
public ulong ullMultipleRetryCount;
public ulong ullMaxTXLifetimeExceededCount;
public ulong ullTransmittedFragmentCount;
public ulong ullRTSSuccessCount;
public ulong ullRTSFailureCount;
public ulong ullACKFailureCount;
public ulong ullReceivedFrameCount;
public ulong ullMulticastReceivedFrameCount;
public ulong ullPromiscuousReceivedFrameCount;
public ulong ullMaxRXLifetimeExceededCount;
public ulong ullFrameDuplicateCount;
public ulong ullReceivedFragmentCount;
public ulong ullPromiscuousReceivedFragmentCount;
public ulong ullFCSErrorCount;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct WLAN_STATISTICS
{
public ulong ullFourWayHandshakeFailures;
public ulong ullTKIPCounterMeasuresInvoked;
public ulong ullReserved;
public WLAN_MAC_FRAME_STATISTICS MacUcastCounters;
public WLAN_MAC_FRAME_STATISTICS MacMcastCounters;
public uint dwNumberOfPhys;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public WLAN_PHY_FRAME_STATISTICS[] PhyCounters;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WLAN_MAC_FRAME_STATISTICS
Public ullTransmittedFrameCount As ULong
Public ullReceivedFrameCount As ULong
Public ullWEPExcludedCount As ULong
Public ullTKIPLocalMICFailures As ULong
Public ullTKIPReplays As ULong
Public ullTKIPICVErrorCount As ULong
Public ullCCMPReplays As ULong
Public ullCCMPDecryptErrors As ULong
Public ullWEPUndecryptableCount As ULong
Public ullWEPICVErrorCount As ULong
Public ullDecryptSuccessCount As ULong
Public ullDecryptFailureCount As ULong
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WLAN_PHY_FRAME_STATISTICS
Public ullTransmittedFrameCount As ULong
Public ullMulticastTransmittedFrameCount As ULong
Public ullFailedCount As ULong
Public ullRetryCount As ULong
Public ullMultipleRetryCount As ULong
Public ullMaxTXLifetimeExceededCount As ULong
Public ullTransmittedFragmentCount As ULong
Public ullRTSSuccessCount As ULong
Public ullRTSFailureCount As ULong
Public ullACKFailureCount As ULong
Public ullReceivedFrameCount As ULong
Public ullMulticastReceivedFrameCount As ULong
Public ullPromiscuousReceivedFrameCount As ULong
Public ullMaxRXLifetimeExceededCount As ULong
Public ullFrameDuplicateCount As ULong
Public ullReceivedFragmentCount As ULong
Public ullPromiscuousReceivedFragmentCount As ULong
Public ullFCSErrorCount As ULong
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure WLAN_STATISTICS
Public ullFourWayHandshakeFailures As ULong
Public ullTKIPCounterMeasuresInvoked As ULong
Public ullReserved As ULong
Public MacUcastCounters As WLAN_MAC_FRAME_STATISTICS
Public MacMcastCounters As WLAN_MAC_FRAME_STATISTICS
Public dwNumberOfPhys As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public PhyCounters() As WLAN_PHY_FRAME_STATISTICS
End Structureimport ctypes
from ctypes import wintypes
class WLAN_MAC_FRAME_STATISTICS(ctypes.Structure):
_fields_ = [
("ullTransmittedFrameCount", ctypes.c_ulonglong),
("ullReceivedFrameCount", ctypes.c_ulonglong),
("ullWEPExcludedCount", ctypes.c_ulonglong),
("ullTKIPLocalMICFailures", ctypes.c_ulonglong),
("ullTKIPReplays", ctypes.c_ulonglong),
("ullTKIPICVErrorCount", ctypes.c_ulonglong),
("ullCCMPReplays", ctypes.c_ulonglong),
("ullCCMPDecryptErrors", ctypes.c_ulonglong),
("ullWEPUndecryptableCount", ctypes.c_ulonglong),
("ullWEPICVErrorCount", ctypes.c_ulonglong),
("ullDecryptSuccessCount", ctypes.c_ulonglong),
("ullDecryptFailureCount", ctypes.c_ulonglong),
]
class WLAN_PHY_FRAME_STATISTICS(ctypes.Structure):
_fields_ = [
("ullTransmittedFrameCount", ctypes.c_ulonglong),
("ullMulticastTransmittedFrameCount", ctypes.c_ulonglong),
("ullFailedCount", ctypes.c_ulonglong),
("ullRetryCount", ctypes.c_ulonglong),
("ullMultipleRetryCount", ctypes.c_ulonglong),
("ullMaxTXLifetimeExceededCount", ctypes.c_ulonglong),
("ullTransmittedFragmentCount", ctypes.c_ulonglong),
("ullRTSSuccessCount", ctypes.c_ulonglong),
("ullRTSFailureCount", ctypes.c_ulonglong),
("ullACKFailureCount", ctypes.c_ulonglong),
("ullReceivedFrameCount", ctypes.c_ulonglong),
("ullMulticastReceivedFrameCount", ctypes.c_ulonglong),
("ullPromiscuousReceivedFrameCount", ctypes.c_ulonglong),
("ullMaxRXLifetimeExceededCount", ctypes.c_ulonglong),
("ullFrameDuplicateCount", ctypes.c_ulonglong),
("ullReceivedFragmentCount", ctypes.c_ulonglong),
("ullPromiscuousReceivedFragmentCount", ctypes.c_ulonglong),
("ullFCSErrorCount", ctypes.c_ulonglong),
]
class WLAN_STATISTICS(ctypes.Structure):
_fields_ = [
("ullFourWayHandshakeFailures", ctypes.c_ulonglong),
("ullTKIPCounterMeasuresInvoked", ctypes.c_ulonglong),
("ullReserved", ctypes.c_ulonglong),
("MacUcastCounters", WLAN_MAC_FRAME_STATISTICS),
("MacMcastCounters", WLAN_MAC_FRAME_STATISTICS),
("dwNumberOfPhys", wintypes.DWORD),
("PhyCounters", WLAN_PHY_FRAME_STATISTICS * 1),
]#[repr(C)]
pub struct WLAN_MAC_FRAME_STATISTICS {
pub ullTransmittedFrameCount: u64,
pub ullReceivedFrameCount: u64,
pub ullWEPExcludedCount: u64,
pub ullTKIPLocalMICFailures: u64,
pub ullTKIPReplays: u64,
pub ullTKIPICVErrorCount: u64,
pub ullCCMPReplays: u64,
pub ullCCMPDecryptErrors: u64,
pub ullWEPUndecryptableCount: u64,
pub ullWEPICVErrorCount: u64,
pub ullDecryptSuccessCount: u64,
pub ullDecryptFailureCount: u64,
}
#[repr(C)]
pub struct WLAN_PHY_FRAME_STATISTICS {
pub ullTransmittedFrameCount: u64,
pub ullMulticastTransmittedFrameCount: u64,
pub ullFailedCount: u64,
pub ullRetryCount: u64,
pub ullMultipleRetryCount: u64,
pub ullMaxTXLifetimeExceededCount: u64,
pub ullTransmittedFragmentCount: u64,
pub ullRTSSuccessCount: u64,
pub ullRTSFailureCount: u64,
pub ullACKFailureCount: u64,
pub ullReceivedFrameCount: u64,
pub ullMulticastReceivedFrameCount: u64,
pub ullPromiscuousReceivedFrameCount: u64,
pub ullMaxRXLifetimeExceededCount: u64,
pub ullFrameDuplicateCount: u64,
pub ullReceivedFragmentCount: u64,
pub ullPromiscuousReceivedFragmentCount: u64,
pub ullFCSErrorCount: u64,
}
#[repr(C)]
pub struct WLAN_STATISTICS {
pub ullFourWayHandshakeFailures: u64,
pub ullTKIPCounterMeasuresInvoked: u64,
pub ullReserved: u64,
pub MacUcastCounters: WLAN_MAC_FRAME_STATISTICS,
pub MacMcastCounters: WLAN_MAC_FRAME_STATISTICS,
pub dwNumberOfPhys: u32,
pub PhyCounters: [WLAN_PHY_FRAME_STATISTICS; 1],
}import "golang.org/x/sys/windows"
type WLAN_MAC_FRAME_STATISTICS struct {
ullTransmittedFrameCount uint64
ullReceivedFrameCount uint64
ullWEPExcludedCount uint64
ullTKIPLocalMICFailures uint64
ullTKIPReplays uint64
ullTKIPICVErrorCount uint64
ullCCMPReplays uint64
ullCCMPDecryptErrors uint64
ullWEPUndecryptableCount uint64
ullWEPICVErrorCount uint64
ullDecryptSuccessCount uint64
ullDecryptFailureCount uint64
}
type WLAN_PHY_FRAME_STATISTICS struct {
ullTransmittedFrameCount uint64
ullMulticastTransmittedFrameCount uint64
ullFailedCount uint64
ullRetryCount uint64
ullMultipleRetryCount uint64
ullMaxTXLifetimeExceededCount uint64
ullTransmittedFragmentCount uint64
ullRTSSuccessCount uint64
ullRTSFailureCount uint64
ullACKFailureCount uint64
ullReceivedFrameCount uint64
ullMulticastReceivedFrameCount uint64
ullPromiscuousReceivedFrameCount uint64
ullMaxRXLifetimeExceededCount uint64
ullFrameDuplicateCount uint64
ullReceivedFragmentCount uint64
ullPromiscuousReceivedFragmentCount uint64
ullFCSErrorCount uint64
}
type WLAN_STATISTICS struct {
ullFourWayHandshakeFailures uint64
ullTKIPCounterMeasuresInvoked uint64
ullReserved uint64
MacUcastCounters WLAN_MAC_FRAME_STATISTICS
MacMcastCounters WLAN_MAC_FRAME_STATISTICS
dwNumberOfPhys uint32
PhyCounters [1]WLAN_PHY_FRAME_STATISTICS
}type
WLAN_MAC_FRAME_STATISTICS = record
ullTransmittedFrameCount: UInt64;
ullReceivedFrameCount: UInt64;
ullWEPExcludedCount: UInt64;
ullTKIPLocalMICFailures: UInt64;
ullTKIPReplays: UInt64;
ullTKIPICVErrorCount: UInt64;
ullCCMPReplays: UInt64;
ullCCMPDecryptErrors: UInt64;
ullWEPUndecryptableCount: UInt64;
ullWEPICVErrorCount: UInt64;
ullDecryptSuccessCount: UInt64;
ullDecryptFailureCount: UInt64;
end;
WLAN_PHY_FRAME_STATISTICS = record
ullTransmittedFrameCount: UInt64;
ullMulticastTransmittedFrameCount: UInt64;
ullFailedCount: UInt64;
ullRetryCount: UInt64;
ullMultipleRetryCount: UInt64;
ullMaxTXLifetimeExceededCount: UInt64;
ullTransmittedFragmentCount: UInt64;
ullRTSSuccessCount: UInt64;
ullRTSFailureCount: UInt64;
ullACKFailureCount: UInt64;
ullReceivedFrameCount: UInt64;
ullMulticastReceivedFrameCount: UInt64;
ullPromiscuousReceivedFrameCount: UInt64;
ullMaxRXLifetimeExceededCount: UInt64;
ullFrameDuplicateCount: UInt64;
ullReceivedFragmentCount: UInt64;
ullPromiscuousReceivedFragmentCount: UInt64;
ullFCSErrorCount: UInt64;
end;
WLAN_STATISTICS = record
ullFourWayHandshakeFailures: UInt64;
ullTKIPCounterMeasuresInvoked: UInt64;
ullReserved: UInt64;
MacUcastCounters: WLAN_MAC_FRAME_STATISTICS;
MacMcastCounters: WLAN_MAC_FRAME_STATISTICS;
dwNumberOfPhys: DWORD;
PhyCounters: array[0..0] of WLAN_PHY_FRAME_STATISTICS;
end;const WLAN_MAC_FRAME_STATISTICS = extern struct {
ullTransmittedFrameCount: u64,
ullReceivedFrameCount: u64,
ullWEPExcludedCount: u64,
ullTKIPLocalMICFailures: u64,
ullTKIPReplays: u64,
ullTKIPICVErrorCount: u64,
ullCCMPReplays: u64,
ullCCMPDecryptErrors: u64,
ullWEPUndecryptableCount: u64,
ullWEPICVErrorCount: u64,
ullDecryptSuccessCount: u64,
ullDecryptFailureCount: u64,
};
const WLAN_PHY_FRAME_STATISTICS = extern struct {
ullTransmittedFrameCount: u64,
ullMulticastTransmittedFrameCount: u64,
ullFailedCount: u64,
ullRetryCount: u64,
ullMultipleRetryCount: u64,
ullMaxTXLifetimeExceededCount: u64,
ullTransmittedFragmentCount: u64,
ullRTSSuccessCount: u64,
ullRTSFailureCount: u64,
ullACKFailureCount: u64,
ullReceivedFrameCount: u64,
ullMulticastReceivedFrameCount: u64,
ullPromiscuousReceivedFrameCount: u64,
ullMaxRXLifetimeExceededCount: u64,
ullFrameDuplicateCount: u64,
ullReceivedFragmentCount: u64,
ullPromiscuousReceivedFragmentCount: u64,
ullFCSErrorCount: u64,
};
const WLAN_STATISTICS = extern struct {
ullFourWayHandshakeFailures: u64,
ullTKIPCounterMeasuresInvoked: u64,
ullReserved: u64,
MacUcastCounters: WLAN_MAC_FRAME_STATISTICS,
MacMcastCounters: WLAN_MAC_FRAME_STATISTICS,
dwNumberOfPhys: u32,
PhyCounters: [1]WLAN_PHY_FRAME_STATISTICS,
};type
WLAN_MAC_FRAME_STATISTICS {.bycopy.} = object
ullTransmittedFrameCount: uint64
ullReceivedFrameCount: uint64
ullWEPExcludedCount: uint64
ullTKIPLocalMICFailures: uint64
ullTKIPReplays: uint64
ullTKIPICVErrorCount: uint64
ullCCMPReplays: uint64
ullCCMPDecryptErrors: uint64
ullWEPUndecryptableCount: uint64
ullWEPICVErrorCount: uint64
ullDecryptSuccessCount: uint64
ullDecryptFailureCount: uint64
WLAN_PHY_FRAME_STATISTICS {.bycopy.} = object
ullTransmittedFrameCount: uint64
ullMulticastTransmittedFrameCount: uint64
ullFailedCount: uint64
ullRetryCount: uint64
ullMultipleRetryCount: uint64
ullMaxTXLifetimeExceededCount: uint64
ullTransmittedFragmentCount: uint64
ullRTSSuccessCount: uint64
ullRTSFailureCount: uint64
ullACKFailureCount: uint64
ullReceivedFrameCount: uint64
ullMulticastReceivedFrameCount: uint64
ullPromiscuousReceivedFrameCount: uint64
ullMaxRXLifetimeExceededCount: uint64
ullFrameDuplicateCount: uint64
ullReceivedFragmentCount: uint64
ullPromiscuousReceivedFragmentCount: uint64
ullFCSErrorCount: uint64
WLAN_STATISTICS {.bycopy.} = object
ullFourWayHandshakeFailures: uint64
ullTKIPCounterMeasuresInvoked: uint64
ullReserved: uint64
MacUcastCounters: WLAN_MAC_FRAME_STATISTICS
MacMcastCounters: WLAN_MAC_FRAME_STATISTICS
dwNumberOfPhys: uint32
PhyCounters: array[1, WLAN_PHY_FRAME_STATISTICS]struct WLAN_MAC_FRAME_STATISTICS
{
ulong ullTransmittedFrameCount;
ulong ullReceivedFrameCount;
ulong ullWEPExcludedCount;
ulong ullTKIPLocalMICFailures;
ulong ullTKIPReplays;
ulong ullTKIPICVErrorCount;
ulong ullCCMPReplays;
ulong ullCCMPDecryptErrors;
ulong ullWEPUndecryptableCount;
ulong ullWEPICVErrorCount;
ulong ullDecryptSuccessCount;
ulong ullDecryptFailureCount;
}
struct WLAN_PHY_FRAME_STATISTICS
{
ulong ullTransmittedFrameCount;
ulong ullMulticastTransmittedFrameCount;
ulong ullFailedCount;
ulong ullRetryCount;
ulong ullMultipleRetryCount;
ulong ullMaxTXLifetimeExceededCount;
ulong ullTransmittedFragmentCount;
ulong ullRTSSuccessCount;
ulong ullRTSFailureCount;
ulong ullACKFailureCount;
ulong ullReceivedFrameCount;
ulong ullMulticastReceivedFrameCount;
ulong ullPromiscuousReceivedFrameCount;
ulong ullMaxRXLifetimeExceededCount;
ulong ullFrameDuplicateCount;
ulong ullReceivedFragmentCount;
ulong ullPromiscuousReceivedFragmentCount;
ulong ullFCSErrorCount;
}
struct WLAN_STATISTICS
{
ulong ullFourWayHandshakeFailures;
ulong ullTKIPCounterMeasuresInvoked;
ulong ullReserved;
WLAN_MAC_FRAME_STATISTICS MacUcastCounters;
WLAN_MAC_FRAME_STATISTICS MacMcastCounters;
uint dwNumberOfPhys;
WLAN_PHY_FRAME_STATISTICS[1] PhyCounters;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WLAN_STATISTICS サイズ: 368 バイト(x64)
dim st, 92 ; 4byte整数×92(構造体サイズ 368 / 4 切り上げ)
; ullFourWayHandshakeFailures : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; ullTKIPCounterMeasuresInvoked : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ullReserved : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; MacUcastCounters : WLAN_MAC_FRAME_STATISTICS (+24, 96byte) varptr(st)+24 を基点に操作(96byte:入れ子/配列)
; MacMcastCounters : WLAN_MAC_FRAME_STATISTICS (+120, 96byte) varptr(st)+120 を基点に操作(96byte:入れ子/配列)
; dwNumberOfPhys : DWORD (+216, 4byte) st.54 = 値 / 値 = st.54 (lpoke/lpeek も可)
; PhyCounters : WLAN_PHY_FRAME_STATISTICS (+224, 144byte) varptr(st)+224 を基点に操作(144byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global WLAN_MAC_FRAME_STATISTICS
#field int64 ullTransmittedFrameCount
#field int64 ullReceivedFrameCount
#field int64 ullWEPExcludedCount
#field int64 ullTKIPLocalMICFailures
#field int64 ullTKIPReplays
#field int64 ullTKIPICVErrorCount
#field int64 ullCCMPReplays
#field int64 ullCCMPDecryptErrors
#field int64 ullWEPUndecryptableCount
#field int64 ullWEPICVErrorCount
#field int64 ullDecryptSuccessCount
#field int64 ullDecryptFailureCount
#endstruct
#defstruct global WLAN_PHY_FRAME_STATISTICS
#field int64 ullTransmittedFrameCount
#field int64 ullMulticastTransmittedFrameCount
#field int64 ullFailedCount
#field int64 ullRetryCount
#field int64 ullMultipleRetryCount
#field int64 ullMaxTXLifetimeExceededCount
#field int64 ullTransmittedFragmentCount
#field int64 ullRTSSuccessCount
#field int64 ullRTSFailureCount
#field int64 ullACKFailureCount
#field int64 ullReceivedFrameCount
#field int64 ullMulticastReceivedFrameCount
#field int64 ullPromiscuousReceivedFrameCount
#field int64 ullMaxRXLifetimeExceededCount
#field int64 ullFrameDuplicateCount
#field int64 ullReceivedFragmentCount
#field int64 ullPromiscuousReceivedFragmentCount
#field int64 ullFCSErrorCount
#endstruct
#defstruct global WLAN_STATISTICS
#field int64 ullFourWayHandshakeFailures
#field int64 ullTKIPCounterMeasuresInvoked
#field int64 ullReserved
#field WLAN_MAC_FRAME_STATISTICS MacUcastCounters
#field WLAN_MAC_FRAME_STATISTICS MacMcastCounters
#field int dwNumberOfPhys
#field WLAN_PHY_FRAME_STATISTICS PhyCounters 1
#endstruct
stdim st, WLAN_STATISTICS ; NSTRUCT 変数を確保
st->ullFourWayHandshakeFailures = 100
mes "ullFourWayHandshakeFailures=" + st->ullFourWayHandshakeFailures