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

DOT11_PER_MSDU_COUNTERS

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

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

フィールド

フィールドサイズx64x86説明
uTransmittedFragmentCountDWORD4+0+0当該 MSDU の送信フラグメント数を表す。
uRetryCountDWORD4+4+4再送が発生した回数を表す。
uRTSSuccessCountDWORD4+8+8成功した RTS の数を表す。
uRTSFailureCountDWORD4+12+12失敗した RTS の数を表す。
uACKFailureCountDWORD4+16+16ACK を受信できなかった数を表す。

各言語での定義

#include <windows.h>

// DOT11_PER_MSDU_COUNTERS  (x64 20 / x86 20 バイト)
typedef struct DOT11_PER_MSDU_COUNTERS {
    DWORD uTransmittedFragmentCount;
    DWORD uRetryCount;
    DWORD uRTSSuccessCount;
    DWORD uRTSFailureCount;
    DWORD uACKFailureCount;
} DOT11_PER_MSDU_COUNTERS;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DOT11_PER_MSDU_COUNTERS
{
    public uint uTransmittedFragmentCount;
    public uint uRetryCount;
    public uint uRTSSuccessCount;
    public uint uRTSFailureCount;
    public uint uACKFailureCount;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DOT11_PER_MSDU_COUNTERS
    Public uTransmittedFragmentCount As UInteger
    Public uRetryCount As UInteger
    Public uRTSSuccessCount As UInteger
    Public uRTSFailureCount As UInteger
    Public uACKFailureCount As UInteger
End Structure
import ctypes
from ctypes import wintypes

class DOT11_PER_MSDU_COUNTERS(ctypes.Structure):
    _fields_ = [
        ("uTransmittedFragmentCount", wintypes.DWORD),
        ("uRetryCount", wintypes.DWORD),
        ("uRTSSuccessCount", wintypes.DWORD),
        ("uRTSFailureCount", wintypes.DWORD),
        ("uACKFailureCount", wintypes.DWORD),
    ]
#[repr(C)]
pub struct DOT11_PER_MSDU_COUNTERS {
    pub uTransmittedFragmentCount: u32,
    pub uRetryCount: u32,
    pub uRTSSuccessCount: u32,
    pub uRTSFailureCount: u32,
    pub uACKFailureCount: u32,
}
import "golang.org/x/sys/windows"

type DOT11_PER_MSDU_COUNTERS struct {
	uTransmittedFragmentCount uint32
	uRetryCount uint32
	uRTSSuccessCount uint32
	uRTSFailureCount uint32
	uACKFailureCount uint32
}
type
  DOT11_PER_MSDU_COUNTERS = record
    uTransmittedFragmentCount: DWORD;
    uRetryCount: DWORD;
    uRTSSuccessCount: DWORD;
    uRTSFailureCount: DWORD;
    uACKFailureCount: DWORD;
  end;
const DOT11_PER_MSDU_COUNTERS = extern struct {
    uTransmittedFragmentCount: u32,
    uRetryCount: u32,
    uRTSSuccessCount: u32,
    uRTSFailureCount: u32,
    uACKFailureCount: u32,
};
type
  DOT11_PER_MSDU_COUNTERS {.bycopy.} = object
    uTransmittedFragmentCount: uint32
    uRetryCount: uint32
    uRTSSuccessCount: uint32
    uRTSFailureCount: uint32
    uACKFailureCount: uint32
struct DOT11_PER_MSDU_COUNTERS
{
    uint uTransmittedFragmentCount;
    uint uRetryCount;
    uint uRTSSuccessCount;
    uint uRTSFailureCount;
    uint uACKFailureCount;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DOT11_PER_MSDU_COUNTERS サイズ: 20 バイト(x64)
dim st, 5    ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; uTransmittedFragmentCount : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; uRetryCount : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; uRTSSuccessCount : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; uRTSFailureCount : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; uACKFailureCount : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DOT11_PER_MSDU_COUNTERS
    #field int uTransmittedFragmentCount
    #field int uRetryCount
    #field int uRTSSuccessCount
    #field int uRTSFailureCount
    #field int uACKFailureCount
#endstruct

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