ホーム › NetworkManagement.WiFi › WLAN_MAC_FRAME_STATISTICS
WLAN_MAC_FRAME_STATISTICS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| ullTransmittedFrameCount | ULONGLONG | 8 | +0 | +0 | 正常に送信された MSDU/MMPDU の数を格納します。 |
| ullReceivedFrameCount | ULONGLONG | 8 | +8 | +8 | 正常に受信された MSDU/MMPDU の数を格納します。 |
| ullWEPExcludedCount | ULONGLONG | 8 | +16 | +16 | フレーム制御フィールドで "Protected" 状態が示されていたために破棄されたフレームの数を格納します。 |
| ullTKIPLocalMICFailures | ULONGLONG | 8 | +24 | +24 | AP またはピア ステーションから受信したパケットの整合性を検査する際に発生した MIC エラーの数を格納します。 |
| ullTKIPReplays | ULONGLONG | 8 | +32 | +32 | 検出された TKIP リプレイ エラーの数を格納します。 |
| ullTKIPICVErrorCount | ULONGLONG | 8 | +40 | +40 | NIC が復号に失敗した TKIP で保護されたパケットの数を格納します。 |
| ullCCMPReplays | ULONGLONG | 8 | +48 | +48 | リプレイ検出機構によって破棄された、受信済みユニキャスト フラグメントの数を格納します。 |
| ullCCMPDecryptErrors | ULONGLONG | 8 | +56 | +56 | CCMP 復号アルゴリズムによって破棄された、受信済みフラグメントの数を格納します。 |
| ullWEPUndecryptableCount | ULONGLONG | 8 | +64 | +64 | NIC 上に復号キーが存在しなかったために復号できなかった、WEP で保護された受信パケットの数を格納します。 |
| ullWEPICVErrorCount | ULONGLONG | 8 | +72 | +72 | NIC が復号に失敗した WEP で保護されたパケットの数を格納します。 |
| ullDecryptSuccessCount | ULONGLONG | 8 | +80 | +80 | NIC が正常に復号した暗号化パケットの数を格納します。 |
| ullDecryptFailureCount | ULONGLONG | 8 | +88 | +88 | NIC が復号に失敗した暗号化パケットの数を格納します。 |
公式ドキュメント
WLAN_MAC_FRAME_STATISTICS 構造体は、送受信された MAC フレームに関する情報を格納します。
出典・ライセンス: 上記「公式ドキュメント」の内容は 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>
// 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;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;
}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 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),
]#[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,
}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_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;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,
};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: uint64struct 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;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; WLAN_MAC_FRAME_STATISTICS サイズ: 96 バイト(x64)
dim st, 24 ; 4byte整数×24(構造体サイズ 96 / 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,上位
; ullWEPExcludedCount : ULONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ullTKIPLocalMICFailures : ULONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ullTKIPReplays : ULONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ullTKIPICVErrorCount : ULONGLONG (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ullCCMPReplays : ULONGLONG (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ullCCMPDecryptErrors : ULONGLONG (+56, 8byte) qpoke st,56,値 / qpeek(st,56) ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; ullWEPUndecryptableCount : ULONGLONG (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ullWEPICVErrorCount : ULONGLONG (+72, 8byte) qpoke st,72,値 / qpeek(st,72) ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; ullDecryptSuccessCount : ULONGLONG (+80, 8byte) qpoke st,80,値 / qpeek(st,80) ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; ullDecryptFailureCount : ULONGLONG (+88, 8byte) qpoke st,88,値 / qpeek(st,88) ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#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
stdim st, WLAN_MAC_FRAME_STATISTICS ; NSTRUCT 変数を確保
st->ullTransmittedFrameCount = 100
mes "ullTransmittedFrameCount=" + st->ullTransmittedFrameCount