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

DOT11_MAC_FRAME_STATISTICS

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

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

フィールド

フィールドサイズx64x86説明
ullTransmittedFrameCountULONGLONG8+0+0MAC 層で送信したフレーム総数を表す。
ullReceivedFrameCountULONGLONG8+8+8MAC 層で受信したフレーム総数を表す。
ullTransmittedFailureFrameCountULONGLONG8+16+16送信に失敗したフレーム数を表す。
ullReceivedFailureFrameCountULONGLONG8+24+24受信に失敗したフレーム数を表す。
ullWEPExcludedCountULONGLONG8+32+32暗号化必須なのに非暗号で破棄した受信数を表す。
ullTKIPLocalMICFailuresULONGLONG8+40+40ローカルで検出した TKIP MIC 失敗数を表す。
ullTKIPReplaysULONGLONG8+48+48検出した TKIP リプレイ数を表す。
ullTKIPICVErrorCountULONGLONG8+56+56TKIP の ICV エラー数を表す。
ullCCMPReplaysULONGLONG8+64+64検出した CCMP リプレイ数を表す。
ullCCMPDecryptErrorsULONGLONG8+72+72CCMP 復号エラー数を表す。
ullWEPUndecryptableCountULONGLONG8+80+80WEP で復号できなかった受信数を表す。
ullWEPICVErrorCountULONGLONG8+88+88WEP の ICV エラー数を表す。
ullDecryptSuccessCountULONGLONG8+96+96復号に成功した数を表す。
ullDecryptFailureCountULONGLONG8+104+104復号に失敗した数を表す。

各言語での定義

#include <windows.h>

// 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;
using System;
using System.Runtime.InteropServices;

[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;
}
Imports System.Runtime.InteropServices

<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
import ctypes
from ctypes import wintypes

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),
    ]
#[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,
}
import "golang.org/x/sys/windows"

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_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;
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,
};
type
  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
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;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_MAC_FRAME_STATISTICS サイズ: 112 バイト(x64)
dim st, 28    ; 4byte整数×28(構造体サイズ 112 / 4 切り上げ)
; ullTransmittedFrameCount : ULONGLONG (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; ullReceivedFrameCount : ULONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ullTransmittedFailureFrameCount : ULONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ullReceivedFailureFrameCount : ULONGLONG (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ullWEPExcludedCount : ULONGLONG (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ullTKIPLocalMICFailures : ULONGLONG (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ullTKIPReplays : ULONGLONG (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ullTKIPICVErrorCount : ULONGLONG (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; ullCCMPReplays : ULONGLONG (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ullCCMPDecryptErrors : ULONGLONG (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; ullWEPUndecryptableCount : ULONGLONG (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; ullWEPICVErrorCount : ULONGLONG (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; ullDecryptSuccessCount : ULONGLONG (+96, 8byte)  qpoke st,96,値 / qpeek(st,96)  ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; ullDecryptFailureCount : ULONGLONG (+104, 8byte)  qpoke st,104,値 / qpeek(st,104)  ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#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

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