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

DOT11_STATISTICS

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

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

フィールド

フィールドサイズx64x86説明
HeaderNDIS_OBJECT_HEADER4+0+0NDIS オブジェクトのバージョン情報を含むヘッダー。
ullFourWayHandshakeFailuresULONGLONG8+8+84ウェイハンドシェイクの失敗回数を表す。
ullTKIPCounterMeasuresInvokedULONGLONG8+16+16TKIP 対抗措置を発動した回数を表す。
ullReservedULONGLONG8+24+24予約フィールド。ゼロを設定する。
MacUcastCountersDOT11_MAC_FRAME_STATISTICS112+32+32ユニキャスト MAC フレーム統計を保持する構造体。
MacMcastCountersDOT11_MAC_FRAME_STATISTICS112+144+144マルチキャスト MAC フレーム統計を保持する構造体。
PhyCountersDOT11_PHY_FRAME_STATISTICS144+256+256PHY 層フレーム統計を保持する配列。

各言語での定義

#include <windows.h>

// NDIS_OBJECT_HEADER  (x64 4 / x86 4 バイト)
typedef struct NDIS_OBJECT_HEADER {
    BYTE Type;
    BYTE Revision;
    WORD Size;
} NDIS_OBJECT_HEADER;

// DOT11_MAC_FRAME_STATISTICS  (x64 112 / x86 112 バイト)
typedef struct DOT11_MAC_FRAME_STATISTICS {
    ULONGLONG ullTransmittedFrameCount;
    ULONGLONG ullReceivedFrameCount;
    ULONGLONG ullTransmittedFailureFrameCount;
    ULONGLONG ullReceivedFailureFrameCount;
    ULONGLONG ullWEPExcludedCount;
    ULONGLONG ullTKIPLocalMICFailures;
    ULONGLONG ullTKIPReplays;
    ULONGLONG ullTKIPICVErrorCount;
    ULONGLONG ullCCMPReplays;
    ULONGLONG ullCCMPDecryptErrors;
    ULONGLONG ullWEPUndecryptableCount;
    ULONGLONG ullWEPICVErrorCount;
    ULONGLONG ullDecryptSuccessCount;
    ULONGLONG ullDecryptFailureCount;
} DOT11_MAC_FRAME_STATISTICS;

// DOT11_PHY_FRAME_STATISTICS  (x64 144 / x86 144 バイト)
typedef struct DOT11_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;
} DOT11_PHY_FRAME_STATISTICS;

// DOT11_STATISTICS  (x64 400 / x86 400 バイト)
typedef struct DOT11_STATISTICS {
    NDIS_OBJECT_HEADER Header;
    ULONGLONG ullFourWayHandshakeFailures;
    ULONGLONG ullTKIPCounterMeasuresInvoked;
    ULONGLONG ullReserved;
    DOT11_MAC_FRAME_STATISTICS MacUcastCounters;
    DOT11_MAC_FRAME_STATISTICS MacMcastCounters;
    DOT11_PHY_FRAME_STATISTICS PhyCounters[1];
} DOT11_STATISTICS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NDIS_OBJECT_HEADER
{
    public byte Type;
    public byte Revision;
    public ushort Size;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_MAC_FRAME_STATISTICS
{
    public ulong ullTransmittedFrameCount;
    public ulong ullReceivedFrameCount;
    public ulong ullTransmittedFailureFrameCount;
    public ulong ullReceivedFailureFrameCount;
    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 DOT11_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 DOT11_STATISTICS
{
    public NDIS_OBJECT_HEADER Header;
    public ulong ullFourWayHandshakeFailures;
    public ulong ullTKIPCounterMeasuresInvoked;
    public ulong ullReserved;
    public DOT11_MAC_FRAME_STATISTICS MacUcastCounters;
    public DOT11_MAC_FRAME_STATISTICS MacMcastCounters;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public DOT11_PHY_FRAME_STATISTICS[] PhyCounters;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NDIS_OBJECT_HEADER
    Public Type As Byte
    Public Revision As Byte
    Public Size As UShort
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_MAC_FRAME_STATISTICS
    Public ullTransmittedFrameCount As ULong
    Public ullReceivedFrameCount As ULong
    Public ullTransmittedFailureFrameCount As ULong
    Public ullReceivedFailureFrameCount 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 DOT11_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 DOT11_STATISTICS
    Public Header As NDIS_OBJECT_HEADER
    Public ullFourWayHandshakeFailures As ULong
    Public ullTKIPCounterMeasuresInvoked As ULong
    Public ullReserved As ULong
    Public MacUcastCounters As DOT11_MAC_FRAME_STATISTICS
    Public MacMcastCounters As DOT11_MAC_FRAME_STATISTICS
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public PhyCounters() As DOT11_PHY_FRAME_STATISTICS
End Structure
import ctypes
from ctypes import wintypes

class NDIS_OBJECT_HEADER(ctypes.Structure):
    _fields_ = [
        ("Type", ctypes.c_ubyte),
        ("Revision", ctypes.c_ubyte),
        ("Size", ctypes.c_ushort),
    ]

class DOT11_MAC_FRAME_STATISTICS(ctypes.Structure):
    _fields_ = [
        ("ullTransmittedFrameCount", ctypes.c_ulonglong),
        ("ullReceivedFrameCount", ctypes.c_ulonglong),
        ("ullTransmittedFailureFrameCount", ctypes.c_ulonglong),
        ("ullReceivedFailureFrameCount", 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 DOT11_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 DOT11_STATISTICS(ctypes.Structure):
    _fields_ = [
        ("Header", NDIS_OBJECT_HEADER),
        ("ullFourWayHandshakeFailures", ctypes.c_ulonglong),
        ("ullTKIPCounterMeasuresInvoked", ctypes.c_ulonglong),
        ("ullReserved", ctypes.c_ulonglong),
        ("MacUcastCounters", DOT11_MAC_FRAME_STATISTICS),
        ("MacMcastCounters", DOT11_MAC_FRAME_STATISTICS),
        ("PhyCounters", DOT11_PHY_FRAME_STATISTICS * 1),
    ]
#[repr(C)]
pub struct NDIS_OBJECT_HEADER {
    pub Type: u8,
    pub Revision: u8,
    pub Size: u16,
}

#[repr(C)]
pub struct DOT11_MAC_FRAME_STATISTICS {
    pub ullTransmittedFrameCount: u64,
    pub ullReceivedFrameCount: u64,
    pub ullTransmittedFailureFrameCount: u64,
    pub ullReceivedFailureFrameCount: 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 DOT11_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 DOT11_STATISTICS {
    pub Header: NDIS_OBJECT_HEADER,
    pub ullFourWayHandshakeFailures: u64,
    pub ullTKIPCounterMeasuresInvoked: u64,
    pub ullReserved: u64,
    pub MacUcastCounters: DOT11_MAC_FRAME_STATISTICS,
    pub MacMcastCounters: DOT11_MAC_FRAME_STATISTICS,
    pub PhyCounters: [DOT11_PHY_FRAME_STATISTICS; 1],
}
import "golang.org/x/sys/windows"

type NDIS_OBJECT_HEADER struct {
	Type byte
	Revision byte
	Size uint16
}

type DOT11_MAC_FRAME_STATISTICS struct {
	ullTransmittedFrameCount uint64
	ullReceivedFrameCount uint64
	ullTransmittedFailureFrameCount uint64
	ullReceivedFailureFrameCount uint64
	ullWEPExcludedCount uint64
	ullTKIPLocalMICFailures uint64
	ullTKIPReplays uint64
	ullTKIPICVErrorCount uint64
	ullCCMPReplays uint64
	ullCCMPDecryptErrors uint64
	ullWEPUndecryptableCount uint64
	ullWEPICVErrorCount uint64
	ullDecryptSuccessCount uint64
	ullDecryptFailureCount uint64
}

type DOT11_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 DOT11_STATISTICS struct {
	Header NDIS_OBJECT_HEADER
	ullFourWayHandshakeFailures uint64
	ullTKIPCounterMeasuresInvoked uint64
	ullReserved uint64
	MacUcastCounters DOT11_MAC_FRAME_STATISTICS
	MacMcastCounters DOT11_MAC_FRAME_STATISTICS
	PhyCounters [1]DOT11_PHY_FRAME_STATISTICS
}
type
  NDIS_OBJECT_HEADER = record
    Type: Byte;
    Revision: Byte;
    Size: Word;
  end;

  DOT11_MAC_FRAME_STATISTICS = record
    ullTransmittedFrameCount: UInt64;
    ullReceivedFrameCount: UInt64;
    ullTransmittedFailureFrameCount: UInt64;
    ullReceivedFailureFrameCount: UInt64;
    ullWEPExcludedCount: UInt64;
    ullTKIPLocalMICFailures: UInt64;
    ullTKIPReplays: UInt64;
    ullTKIPICVErrorCount: UInt64;
    ullCCMPReplays: UInt64;
    ullCCMPDecryptErrors: UInt64;
    ullWEPUndecryptableCount: UInt64;
    ullWEPICVErrorCount: UInt64;
    ullDecryptSuccessCount: UInt64;
    ullDecryptFailureCount: UInt64;
  end;

  DOT11_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;

  DOT11_STATISTICS = record
    Header: NDIS_OBJECT_HEADER;
    ullFourWayHandshakeFailures: UInt64;
    ullTKIPCounterMeasuresInvoked: UInt64;
    ullReserved: UInt64;
    MacUcastCounters: DOT11_MAC_FRAME_STATISTICS;
    MacMcastCounters: DOT11_MAC_FRAME_STATISTICS;
    PhyCounters: array[0..0] of DOT11_PHY_FRAME_STATISTICS;
  end;
const NDIS_OBJECT_HEADER = extern struct {
    Type: u8,
    Revision: u8,
    Size: u16,
};

const DOT11_MAC_FRAME_STATISTICS = extern struct {
    ullTransmittedFrameCount: u64,
    ullReceivedFrameCount: u64,
    ullTransmittedFailureFrameCount: u64,
    ullReceivedFailureFrameCount: u64,
    ullWEPExcludedCount: u64,
    ullTKIPLocalMICFailures: u64,
    ullTKIPReplays: u64,
    ullTKIPICVErrorCount: u64,
    ullCCMPReplays: u64,
    ullCCMPDecryptErrors: u64,
    ullWEPUndecryptableCount: u64,
    ullWEPICVErrorCount: u64,
    ullDecryptSuccessCount: u64,
    ullDecryptFailureCount: u64,
};

const DOT11_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 DOT11_STATISTICS = extern struct {
    Header: NDIS_OBJECT_HEADER,
    ullFourWayHandshakeFailures: u64,
    ullTKIPCounterMeasuresInvoked: u64,
    ullReserved: u64,
    MacUcastCounters: DOT11_MAC_FRAME_STATISTICS,
    MacMcastCounters: DOT11_MAC_FRAME_STATISTICS,
    PhyCounters: [1]DOT11_PHY_FRAME_STATISTICS,
};
type
  NDIS_OBJECT_HEADER {.bycopy.} = object
    Type: uint8
    Revision: uint8
    Size: uint16

  DOT11_MAC_FRAME_STATISTICS {.bycopy.} = object
    ullTransmittedFrameCount: uint64
    ullReceivedFrameCount: uint64
    ullTransmittedFailureFrameCount: uint64
    ullReceivedFailureFrameCount: uint64
    ullWEPExcludedCount: uint64
    ullTKIPLocalMICFailures: uint64
    ullTKIPReplays: uint64
    ullTKIPICVErrorCount: uint64
    ullCCMPReplays: uint64
    ullCCMPDecryptErrors: uint64
    ullWEPUndecryptableCount: uint64
    ullWEPICVErrorCount: uint64
    ullDecryptSuccessCount: uint64
    ullDecryptFailureCount: uint64

  DOT11_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

  DOT11_STATISTICS {.bycopy.} = object
    Header: NDIS_OBJECT_HEADER
    ullFourWayHandshakeFailures: uint64
    ullTKIPCounterMeasuresInvoked: uint64
    ullReserved: uint64
    MacUcastCounters: DOT11_MAC_FRAME_STATISTICS
    MacMcastCounters: DOT11_MAC_FRAME_STATISTICS
    PhyCounters: array[1, DOT11_PHY_FRAME_STATISTICS]
struct NDIS_OBJECT_HEADER
{
    ubyte Type;
    ubyte Revision;
    ushort Size;
}

struct DOT11_MAC_FRAME_STATISTICS
{
    ulong ullTransmittedFrameCount;
    ulong ullReceivedFrameCount;
    ulong ullTransmittedFailureFrameCount;
    ulong ullReceivedFailureFrameCount;
    ulong ullWEPExcludedCount;
    ulong ullTKIPLocalMICFailures;
    ulong ullTKIPReplays;
    ulong ullTKIPICVErrorCount;
    ulong ullCCMPReplays;
    ulong ullCCMPDecryptErrors;
    ulong ullWEPUndecryptableCount;
    ulong ullWEPICVErrorCount;
    ulong ullDecryptSuccessCount;
    ulong ullDecryptFailureCount;
}

struct DOT11_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 DOT11_STATISTICS
{
    NDIS_OBJECT_HEADER Header;
    ulong ullFourWayHandshakeFailures;
    ulong ullTKIPCounterMeasuresInvoked;
    ulong ullReserved;
    DOT11_MAC_FRAME_STATISTICS MacUcastCounters;
    DOT11_MAC_FRAME_STATISTICS MacMcastCounters;
    DOT11_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 レイアウト)
; DOT11_STATISTICS サイズ: 400 バイト(x64)
dim st, 100    ; 4byte整数×100(構造体サイズ 400 / 4 切り上げ)
; Header : NDIS_OBJECT_HEADER (+0, 4byte)  varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; ullFourWayHandshakeFailures : ULONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ullTKIPCounterMeasuresInvoked : ULONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ullReserved : ULONGLONG (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; MacUcastCounters : DOT11_MAC_FRAME_STATISTICS (+32, 112byte)  varptr(st)+32 を基点に操作(112byte:入れ子/配列)
; MacMcastCounters : DOT11_MAC_FRAME_STATISTICS (+144, 112byte)  varptr(st)+144 を基点に操作(112byte:入れ子/配列)
; PhyCounters : DOT11_PHY_FRAME_STATISTICS (+256, 144byte)  varptr(st)+256 を基点に操作(144byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global NDIS_OBJECT_HEADER
    #field byte Type
    #field byte Revision
    #field short Size
#endstruct

#defstruct global DOT11_MAC_FRAME_STATISTICS
    #field int64 ullTransmittedFrameCount
    #field int64 ullReceivedFrameCount
    #field int64 ullTransmittedFailureFrameCount
    #field int64 ullReceivedFailureFrameCount
    #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 DOT11_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 DOT11_STATISTICS
    #field NDIS_OBJECT_HEADER Header
    #field int64 ullFourWayHandshakeFailures
    #field int64 ullTKIPCounterMeasuresInvoked
    #field int64 ullReserved
    #field DOT11_MAC_FRAME_STATISTICS MacUcastCounters
    #field DOT11_MAC_FRAME_STATISTICS MacMcastCounters
    #field DOT11_PHY_FRAME_STATISTICS PhyCounters 1
#endstruct

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