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

TCP_ESTATS_REC_ROD_v0

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

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

フィールド

フィールドサイズx64x86説明
CurRwinSentDWORD4+0+0相手へ通知中の現在の受信ウィンドウサイズ(バイト)である。
MaxRwinSentDWORD4+4+4通知した受信ウィンドウサイズの最大値(バイト)である。
MinRwinSentDWORD4+8+8通知した受信ウィンドウサイズの最小値(バイト)である。
LimRwinDWORD4+12+12受信ウィンドウの上限値(バイト)である。
DupAckEpisodesDWORD4+16+16重複ACKを送信したエピソードの数である。
DupAcksOutDWORD4+20+20送信した重複ACKの数である。
CeRcvdDWORD4+24+24CE(輻輳経験)マーク付きで受信したパケット数である。
EcnSentDWORD4+28+28ECNフラグを設定して送信したパケット数である。
EcnNoncesRcvdDWORD4+32+32受信したECNノンスの数である。
CurReasmQueueDWORD4+36+36現在の再構成キューのサイズ(バイト)である。
MaxReasmQueueDWORD4+40+40観測された再構成キューの最大サイズ(バイト)である。
CurAppRQueueUINT_PTR8/4+48+44現在のアプリ読み取りキューのサイズ(バイト)である。
MaxAppRQueueUINT_PTR8/4+56+48観測されたアプリ読み取りキューの最大サイズ(バイト)である。
WinScaleSentBYTE1+64+52送信したウィンドウスケールオプションの値である。

各言語での定義

#include <windows.h>

// TCP_ESTATS_REC_ROD_v0  (x64 72 / x86 56 バイト)
typedef struct TCP_ESTATS_REC_ROD_v0 {
    DWORD CurRwinSent;
    DWORD MaxRwinSent;
    DWORD MinRwinSent;
    DWORD LimRwin;
    DWORD DupAckEpisodes;
    DWORD DupAcksOut;
    DWORD CeRcvd;
    DWORD EcnSent;
    DWORD EcnNoncesRcvd;
    DWORD CurReasmQueue;
    DWORD MaxReasmQueue;
    UINT_PTR CurAppRQueue;
    UINT_PTR MaxAppRQueue;
    BYTE WinScaleSent;
} TCP_ESTATS_REC_ROD_v0;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TCP_ESTATS_REC_ROD_v0
{
    public uint CurRwinSent;
    public uint MaxRwinSent;
    public uint MinRwinSent;
    public uint LimRwin;
    public uint DupAckEpisodes;
    public uint DupAcksOut;
    public uint CeRcvd;
    public uint EcnSent;
    public uint EcnNoncesRcvd;
    public uint CurReasmQueue;
    public uint MaxReasmQueue;
    public UIntPtr CurAppRQueue;
    public UIntPtr MaxAppRQueue;
    public byte WinScaleSent;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TCP_ESTATS_REC_ROD_v0
    Public CurRwinSent As UInteger
    Public MaxRwinSent As UInteger
    Public MinRwinSent As UInteger
    Public LimRwin As UInteger
    Public DupAckEpisodes As UInteger
    Public DupAcksOut As UInteger
    Public CeRcvd As UInteger
    Public EcnSent As UInteger
    Public EcnNoncesRcvd As UInteger
    Public CurReasmQueue As UInteger
    Public MaxReasmQueue As UInteger
    Public CurAppRQueue As UIntPtr
    Public MaxAppRQueue As UIntPtr
    Public WinScaleSent As Byte
End Structure
import ctypes
from ctypes import wintypes

class TCP_ESTATS_REC_ROD_v0(ctypes.Structure):
    _fields_ = [
        ("CurRwinSent", wintypes.DWORD),
        ("MaxRwinSent", wintypes.DWORD),
        ("MinRwinSent", wintypes.DWORD),
        ("LimRwin", wintypes.DWORD),
        ("DupAckEpisodes", wintypes.DWORD),
        ("DupAcksOut", wintypes.DWORD),
        ("CeRcvd", wintypes.DWORD),
        ("EcnSent", wintypes.DWORD),
        ("EcnNoncesRcvd", wintypes.DWORD),
        ("CurReasmQueue", wintypes.DWORD),
        ("MaxReasmQueue", wintypes.DWORD),
        ("CurAppRQueue", ctypes.c_size_t),
        ("MaxAppRQueue", ctypes.c_size_t),
        ("WinScaleSent", ctypes.c_ubyte),
    ]
#[repr(C)]
pub struct TCP_ESTATS_REC_ROD_v0 {
    pub CurRwinSent: u32,
    pub MaxRwinSent: u32,
    pub MinRwinSent: u32,
    pub LimRwin: u32,
    pub DupAckEpisodes: u32,
    pub DupAcksOut: u32,
    pub CeRcvd: u32,
    pub EcnSent: u32,
    pub EcnNoncesRcvd: u32,
    pub CurReasmQueue: u32,
    pub MaxReasmQueue: u32,
    pub CurAppRQueue: usize,
    pub MaxAppRQueue: usize,
    pub WinScaleSent: u8,
}
import "golang.org/x/sys/windows"

type TCP_ESTATS_REC_ROD_v0 struct {
	CurRwinSent uint32
	MaxRwinSent uint32
	MinRwinSent uint32
	LimRwin uint32
	DupAckEpisodes uint32
	DupAcksOut uint32
	CeRcvd uint32
	EcnSent uint32
	EcnNoncesRcvd uint32
	CurReasmQueue uint32
	MaxReasmQueue uint32
	CurAppRQueue uintptr
	MaxAppRQueue uintptr
	WinScaleSent byte
}
type
  TCP_ESTATS_REC_ROD_v0 = record
    CurRwinSent: DWORD;
    MaxRwinSent: DWORD;
    MinRwinSent: DWORD;
    LimRwin: DWORD;
    DupAckEpisodes: DWORD;
    DupAcksOut: DWORD;
    CeRcvd: DWORD;
    EcnSent: DWORD;
    EcnNoncesRcvd: DWORD;
    CurReasmQueue: DWORD;
    MaxReasmQueue: DWORD;
    CurAppRQueue: NativeUInt;
    MaxAppRQueue: NativeUInt;
    WinScaleSent: Byte;
  end;
const TCP_ESTATS_REC_ROD_v0 = extern struct {
    CurRwinSent: u32,
    MaxRwinSent: u32,
    MinRwinSent: u32,
    LimRwin: u32,
    DupAckEpisodes: u32,
    DupAcksOut: u32,
    CeRcvd: u32,
    EcnSent: u32,
    EcnNoncesRcvd: u32,
    CurReasmQueue: u32,
    MaxReasmQueue: u32,
    CurAppRQueue: usize,
    MaxAppRQueue: usize,
    WinScaleSent: u8,
};
type
  TCP_ESTATS_REC_ROD_v0 {.bycopy.} = object
    CurRwinSent: uint32
    MaxRwinSent: uint32
    MinRwinSent: uint32
    LimRwin: uint32
    DupAckEpisodes: uint32
    DupAcksOut: uint32
    CeRcvd: uint32
    EcnSent: uint32
    EcnNoncesRcvd: uint32
    CurReasmQueue: uint32
    MaxReasmQueue: uint32
    CurAppRQueue: uint
    MaxAppRQueue: uint
    WinScaleSent: uint8
struct TCP_ESTATS_REC_ROD_v0
{
    uint CurRwinSent;
    uint MaxRwinSent;
    uint MinRwinSent;
    uint LimRwin;
    uint DupAckEpisodes;
    uint DupAcksOut;
    uint CeRcvd;
    uint EcnSent;
    uint EcnNoncesRcvd;
    uint CurReasmQueue;
    uint MaxReasmQueue;
    size_t CurAppRQueue;
    size_t MaxAppRQueue;
    ubyte WinScaleSent;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; TCP_ESTATS_REC_ROD_v0 サイズ: 56 バイト(x86)
dim st, 14    ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; CurRwinSent : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; MaxRwinSent : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; MinRwinSent : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; LimRwin : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; DupAckEpisodes : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; DupAcksOut : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; CeRcvd : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; EcnSent : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; EcnNoncesRcvd : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; CurReasmQueue : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; MaxReasmQueue : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; CurAppRQueue : UINT_PTR (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; MaxAppRQueue : UINT_PTR (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; WinScaleSent : BYTE (+52, 1byte)  poke st,52,値  /  値 = peek(st,52)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TCP_ESTATS_REC_ROD_v0 サイズ: 72 バイト(x64)
dim st, 18    ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; CurRwinSent : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; MaxRwinSent : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; MinRwinSent : DWORD (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; LimRwin : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; DupAckEpisodes : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; DupAcksOut : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; CeRcvd : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; EcnSent : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; EcnNoncesRcvd : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; CurReasmQueue : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; MaxReasmQueue : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; CurAppRQueue : UINT_PTR (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; MaxAppRQueue : UINT_PTR (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; WinScaleSent : BYTE (+64, 1byte)  poke st,64,値  /  値 = peek(st,64)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global TCP_ESTATS_REC_ROD_v0
    #field int CurRwinSent
    #field int MaxRwinSent
    #field int MinRwinSent
    #field int LimRwin
    #field int DupAckEpisodes
    #field int DupAcksOut
    #field int CeRcvd
    #field int EcnSent
    #field int EcnNoncesRcvd
    #field int CurReasmQueue
    #field int MaxReasmQueue
    #field intptr CurAppRQueue
    #field intptr MaxAppRQueue
    #field byte WinScaleSent
#endstruct

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