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

DOT11_PHY_FRAME_STATISTICS

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

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

フィールド

フィールドサイズx64x86説明
ullTransmittedFrameCountULONGLONG8+0+0送信フレーム総数を表す。
ullMulticastTransmittedFrameCountULONGLONG8+8+8送信マルチキャストフレーム数を表す。
ullFailedCountULONGLONG8+16+16送信失敗フレーム数を表す。
ullRetryCountULONGLONG8+24+24再送が発生したフレーム数を表す。
ullMultipleRetryCountULONGLONG8+32+32複数回再送が発生したフレーム数を表す。
ullMaxTXLifetimeExceededCountULONGLONG8+40+40送信寿命超過で破棄したフレーム数を表す。
ullTransmittedFragmentCountULONGLONG8+48+48送信フラグメント数を表す。
ullRTSSuccessCountULONGLONG8+56+56成功した RTS の数を表す。
ullRTSFailureCountULONGLONG8+64+64失敗した RTS の数を表す。
ullACKFailureCountULONGLONG8+72+72ACK を受信できなかった数を表す。
ullReceivedFrameCountULONGLONG8+80+80受信フレーム総数を表す。
ullMulticastReceivedFrameCountULONGLONG8+88+88受信マルチキャストフレーム数を表す。
ullPromiscuousReceivedFrameCountULONGLONG8+96+96プロミスキャスモードで受信したフレーム数を表す。
ullMaxRXLifetimeExceededCountULONGLONG8+104+104受信寿命超過で破棄したフレーム数を表す。
ullFrameDuplicateCountULONGLONG8+112+112重複受信したフレーム数を表す。
ullReceivedFragmentCountULONGLONG8+120+120受信フラグメント数を表す。
ullPromiscuousReceivedFragmentCountULONGLONG8+128+128プロミスキャスモードで受信したフラグメント数を表す。
ullFCSErrorCountULONGLONG8+136+136FCS エラーが検出されたフレーム数を表す。

各言語での定義

#include <windows.h>

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

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

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

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

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

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_PHY_FRAME_STATISTICS サイズ: 144 バイト(x64)
dim st, 36    ; 4byte整数×36(構造体サイズ 144 / 4 切り上げ)
; ullTransmittedFrameCount : ULONGLONG (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; ullMulticastTransmittedFrameCount : ULONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ullFailedCount : ULONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; ullRetryCount : ULONGLONG (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ullMultipleRetryCount : ULONGLONG (+32, 8byte)  qpoke st,32,値 / qpeek(st,32)  ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; ullMaxTXLifetimeExceededCount : ULONGLONG (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ullTransmittedFragmentCount : ULONGLONG (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ullRTSSuccessCount : ULONGLONG (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; ullRTSFailureCount : ULONGLONG (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ullACKFailureCount : ULONGLONG (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; ullReceivedFrameCount : ULONGLONG (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; ullMulticastReceivedFrameCount : ULONGLONG (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; ullPromiscuousReceivedFrameCount : ULONGLONG (+96, 8byte)  qpoke st,96,値 / qpeek(st,96)  ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; ullMaxRXLifetimeExceededCount : ULONGLONG (+104, 8byte)  qpoke st,104,値 / qpeek(st,104)  ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; ullFrameDuplicateCount : ULONGLONG (+112, 8byte)  qpoke st,112,値 / qpeek(st,112)  ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; ullReceivedFragmentCount : ULONGLONG (+120, 8byte)  qpoke st,120,値 / qpeek(st,120)  ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; ullPromiscuousReceivedFragmentCount : ULONGLONG (+128, 8byte)  qpoke st,128,値 / qpeek(st,128)  ※IronHSPのみ。3.7/3.8は lpoke st,128,下位 : lpoke st,132,上位
; ullFCSErrorCount : ULONGLONG (+136, 8byte)  qpoke st,136,値 / qpeek(st,136)  ※IronHSPのみ。3.7/3.8は lpoke st,136,下位 : lpoke st,140,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#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

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