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

TCP_ESTATS_SND_CONG_ROD_v0

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

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

フィールド

フィールドサイズx64x86説明
SndLimTransRwinDWORD4+0+0「Congestion Limited」状態または「Sender Limited」状態から「Receiver Limited」状態へ遷移した回数です。この状態には、送信側が通知された受信ウィンドウを埋め尽くしたために TCP の送信が停止したときに入ります。
SndLimTimeRwinDWORD4+4+4送信側が通知された受信ウィンドウを埋め尽くしたために TCP の送信が停止する「Receiver Limited」状態で費やされた累積時間 (ミリ秒単位) です。
SndLimBytesRwinUINT_PTR8/4+8+8「Receiver Limited」状態で送信された総バイト数です。
SndLimTransCwndDWORD4+16+12「Receiver Limited」状態または「Sender Limited」状態から「Congestion Limited」状態へ遷移した回数です。この状態には、TCP の輻輳制御によって定義される何らかの制限 (輻輳ウィンドウなど) や、ネットワーク トラフィックを制御するために設計されたその他のアルゴリズム (再送タイムアウト) による制限に送信側が達したために TCP の送信が停止したときに入ります。
SndLimTimeCwndDWORD4+20+16「Congestion Limited」状態で費やされた累積時間 (ミリ秒単位) です。再送タイムアウトが発生した場合、その時間は他の状態の累積時間ではなく、このメンバーに計上されます。
SndLimBytesCwndUINT_PTR8/4+24+20「Congestion Limited」状態で送信された総バイト数です。
SndLimTransSndDWORD4+32+24「Receiver Limited」状態または「Congestion Limited」状態から「Sender Limited」状態へ遷移した回数です。この状態には、アプリケーション データやその他のリソースの枯渇、Karn アルゴリズムなど、送信側の何らかの制限によって TCP の送信が停止したときに入ります。「Receiver Limited」にも「Congestion Limited」にも分類できない理由で TCP がデータの送信を停止した場合は、「Sender Limited」として扱われます。
SndLimTimeSndDWORD4+36+28「Sender Limited」状態で費やされた累積時間 (ミリ秒単位) です。
SndLimBytesSndUINT_PTR8/4+40+32「Sender Limited」状態で送信された総バイト数です。
SlowStartDWORD4+48+36「Slow Start」アルゴリズムによって輻輳ウィンドウが増加した回数です。
CongAvoidDWORD4+52+40「Congestion Avoidance」アルゴリズムによって輻輳ウィンドウが増加した回数です。
OtherReductionsDWORD4+56+44「Slow Start」および「Congestion Avoidance」以外の輻輳制御アルゴリズム以外の要因によって行われた、輻輳ウィンドウの縮小回数です。
CurCwndDWORD4+60+48現在の輻輳ウィンドウのサイズ (バイト単位) です。
MaxSsCwndDWORD4+64+52「Slow Start」中に使用された輻輳ウィンドウ サイズの最大値 (バイト単位) です。
MaxCaCwndDWORD4+68+56「Congestion Avoidance」中に使用された輻輳ウィンドウの最大サイズ (バイト単位) です。
CurSsthreshDWORD4+72+60スロー スタートしきい値の現在のサイズ (バイト単位) です。
MaxSsthreshDWORD4+76+64初期値を除く、スロー スタートしきい値の最大サイズ (バイト単位) です。
MinSsthreshDWORD4+80+68スロー スタートしきい値の最小サイズ (バイト単位) です。

公式ドキュメント

TCP_ESTATS_SND_CONG_ROD_v0 構造体は、TCP 接続における送信側の輻輳に関連するデータについて、拡張 TCP 統計の読み取り専用の動的情報を格納します。

解説(Remarks)

TCP_ESTATS_SND_CONG_ROD_v0 構造体は、Windows Vista 以降で利用できる TCP 拡張統計機能の一部として使用されます。

TCP_ESTATS_SND_CONG_ROD_v0 は、TCP 接続における送信側の輻輳に関連するデータの読み取り専用の動的情報を表す構造体のバージョン 0 として定義されています。この情報は、接続が確立された後に利用できます。

TCP_ESTATS_SND_CONG_ROD_v0 構造体は、EstatsType パラメーターに TcpConnectionEstatsSndCong を渡して GetPerTcp6ConnectionEStats 関数または GetPerTcpConnectionEStats 関数を呼び出すことで取得します。この構造体を取得するには、拡張 TCP 統計を有効にする必要があります。

TCP の輻輳制御と輻輳制御アルゴリズムについては、TCP Congestion Control に関する IETF RFC で詳しく説明されています。詳細については、http://www.ietf.org/rfc/rfc2581.txt を参照してください。

この構造体のメンバーは、TCP Extended Statistics MIB に関する IETF RFC で定義されています。詳細については、http://www.ietf.org/rfc/rfc4898.txt を参照してください。

以下は、TCP_ESTATS_SND_CONG_ROD_v0 構造体のメンバーと、拡張 TCP 統計について RFC 4898 で定義されているエントリとの対応です。

用語 説明
SndLimTransRwin tcpEStatsPerfSndLimTransRwin
SndLimTimeRwin tcpEStatsPerfSndLimTimeRwin
SndLimBytesRwin このメンバーに対応するものはありません。
SndLimTransCwnd tcpEStatsPerfSndLimTransCwnd
SndLimTimeCwnd tcpEStatsPerfSndLimTimeCwnd
SndLimBytesCwnd このメンバーに対応するものはありません。
SndLimTransSnd tcpEStatsPerfSndLimTransSnd
SndLimTimeSnd tcpEStatsPerfSndLimTimeSnd
SndLimBytesSnd このメンバーに対応するものはありません。
SlowStart tcpEStatsStackSlowStart
CongAvoid tcpEStatsStackCongAvoid
OtherReductions tcpEStatsStackOtherReductions
CurCwnd tcpEStatsPerfCurCwnd
MaxSsCwnd tcpEStatsStackMaxSsCwnd
MaxCaCwnd tcpEStatsStackMaxCaCwnd
CurSsthresh tcpEStatsPerfCurSsthresh
MaxSsthresh tcpEStatsStackMaxSsthresh
MinSsthresh tcpEStatsStackMinSsthresh
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)

各言語での定義

#include <windows.h>

// TCP_ESTATS_SND_CONG_ROD_v0  (x64 88 / x86 72 バイト)
typedef struct TCP_ESTATS_SND_CONG_ROD_v0 {
    DWORD SndLimTransRwin;
    DWORD SndLimTimeRwin;
    UINT_PTR SndLimBytesRwin;
    DWORD SndLimTransCwnd;
    DWORD SndLimTimeCwnd;
    UINT_PTR SndLimBytesCwnd;
    DWORD SndLimTransSnd;
    DWORD SndLimTimeSnd;
    UINT_PTR SndLimBytesSnd;
    DWORD SlowStart;
    DWORD CongAvoid;
    DWORD OtherReductions;
    DWORD CurCwnd;
    DWORD MaxSsCwnd;
    DWORD MaxCaCwnd;
    DWORD CurSsthresh;
    DWORD MaxSsthresh;
    DWORD MinSsthresh;
} TCP_ESTATS_SND_CONG_ROD_v0;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TCP_ESTATS_SND_CONG_ROD_v0
{
    public uint SndLimTransRwin;
    public uint SndLimTimeRwin;
    public UIntPtr SndLimBytesRwin;
    public uint SndLimTransCwnd;
    public uint SndLimTimeCwnd;
    public UIntPtr SndLimBytesCwnd;
    public uint SndLimTransSnd;
    public uint SndLimTimeSnd;
    public UIntPtr SndLimBytesSnd;
    public uint SlowStart;
    public uint CongAvoid;
    public uint OtherReductions;
    public uint CurCwnd;
    public uint MaxSsCwnd;
    public uint MaxCaCwnd;
    public uint CurSsthresh;
    public uint MaxSsthresh;
    public uint MinSsthresh;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TCP_ESTATS_SND_CONG_ROD_v0
    Public SndLimTransRwin As UInteger
    Public SndLimTimeRwin As UInteger
    Public SndLimBytesRwin As UIntPtr
    Public SndLimTransCwnd As UInteger
    Public SndLimTimeCwnd As UInteger
    Public SndLimBytesCwnd As UIntPtr
    Public SndLimTransSnd As UInteger
    Public SndLimTimeSnd As UInteger
    Public SndLimBytesSnd As UIntPtr
    Public SlowStart As UInteger
    Public CongAvoid As UInteger
    Public OtherReductions As UInteger
    Public CurCwnd As UInteger
    Public MaxSsCwnd As UInteger
    Public MaxCaCwnd As UInteger
    Public CurSsthresh As UInteger
    Public MaxSsthresh As UInteger
    Public MinSsthresh As UInteger
End Structure
import ctypes
from ctypes import wintypes

class TCP_ESTATS_SND_CONG_ROD_v0(ctypes.Structure):
    _fields_ = [
        ("SndLimTransRwin", wintypes.DWORD),
        ("SndLimTimeRwin", wintypes.DWORD),
        ("SndLimBytesRwin", ctypes.c_size_t),
        ("SndLimTransCwnd", wintypes.DWORD),
        ("SndLimTimeCwnd", wintypes.DWORD),
        ("SndLimBytesCwnd", ctypes.c_size_t),
        ("SndLimTransSnd", wintypes.DWORD),
        ("SndLimTimeSnd", wintypes.DWORD),
        ("SndLimBytesSnd", ctypes.c_size_t),
        ("SlowStart", wintypes.DWORD),
        ("CongAvoid", wintypes.DWORD),
        ("OtherReductions", wintypes.DWORD),
        ("CurCwnd", wintypes.DWORD),
        ("MaxSsCwnd", wintypes.DWORD),
        ("MaxCaCwnd", wintypes.DWORD),
        ("CurSsthresh", wintypes.DWORD),
        ("MaxSsthresh", wintypes.DWORD),
        ("MinSsthresh", wintypes.DWORD),
    ]
#[repr(C)]
pub struct TCP_ESTATS_SND_CONG_ROD_v0 {
    pub SndLimTransRwin: u32,
    pub SndLimTimeRwin: u32,
    pub SndLimBytesRwin: usize,
    pub SndLimTransCwnd: u32,
    pub SndLimTimeCwnd: u32,
    pub SndLimBytesCwnd: usize,
    pub SndLimTransSnd: u32,
    pub SndLimTimeSnd: u32,
    pub SndLimBytesSnd: usize,
    pub SlowStart: u32,
    pub CongAvoid: u32,
    pub OtherReductions: u32,
    pub CurCwnd: u32,
    pub MaxSsCwnd: u32,
    pub MaxCaCwnd: u32,
    pub CurSsthresh: u32,
    pub MaxSsthresh: u32,
    pub MinSsthresh: u32,
}
import "golang.org/x/sys/windows"

type TCP_ESTATS_SND_CONG_ROD_v0 struct {
	SndLimTransRwin uint32
	SndLimTimeRwin uint32
	SndLimBytesRwin uintptr
	SndLimTransCwnd uint32
	SndLimTimeCwnd uint32
	SndLimBytesCwnd uintptr
	SndLimTransSnd uint32
	SndLimTimeSnd uint32
	SndLimBytesSnd uintptr
	SlowStart uint32
	CongAvoid uint32
	OtherReductions uint32
	CurCwnd uint32
	MaxSsCwnd uint32
	MaxCaCwnd uint32
	CurSsthresh uint32
	MaxSsthresh uint32
	MinSsthresh uint32
}
type
  TCP_ESTATS_SND_CONG_ROD_v0 = record
    SndLimTransRwin: DWORD;
    SndLimTimeRwin: DWORD;
    SndLimBytesRwin: NativeUInt;
    SndLimTransCwnd: DWORD;
    SndLimTimeCwnd: DWORD;
    SndLimBytesCwnd: NativeUInt;
    SndLimTransSnd: DWORD;
    SndLimTimeSnd: DWORD;
    SndLimBytesSnd: NativeUInt;
    SlowStart: DWORD;
    CongAvoid: DWORD;
    OtherReductions: DWORD;
    CurCwnd: DWORD;
    MaxSsCwnd: DWORD;
    MaxCaCwnd: DWORD;
    CurSsthresh: DWORD;
    MaxSsthresh: DWORD;
    MinSsthresh: DWORD;
  end;
const TCP_ESTATS_SND_CONG_ROD_v0 = extern struct {
    SndLimTransRwin: u32,
    SndLimTimeRwin: u32,
    SndLimBytesRwin: usize,
    SndLimTransCwnd: u32,
    SndLimTimeCwnd: u32,
    SndLimBytesCwnd: usize,
    SndLimTransSnd: u32,
    SndLimTimeSnd: u32,
    SndLimBytesSnd: usize,
    SlowStart: u32,
    CongAvoid: u32,
    OtherReductions: u32,
    CurCwnd: u32,
    MaxSsCwnd: u32,
    MaxCaCwnd: u32,
    CurSsthresh: u32,
    MaxSsthresh: u32,
    MinSsthresh: u32,
};
type
  TCP_ESTATS_SND_CONG_ROD_v0 {.bycopy.} = object
    SndLimTransRwin: uint32
    SndLimTimeRwin: uint32
    SndLimBytesRwin: uint
    SndLimTransCwnd: uint32
    SndLimTimeCwnd: uint32
    SndLimBytesCwnd: uint
    SndLimTransSnd: uint32
    SndLimTimeSnd: uint32
    SndLimBytesSnd: uint
    SlowStart: uint32
    CongAvoid: uint32
    OtherReductions: uint32
    CurCwnd: uint32
    MaxSsCwnd: uint32
    MaxCaCwnd: uint32
    CurSsthresh: uint32
    MaxSsthresh: uint32
    MinSsthresh: uint32
struct TCP_ESTATS_SND_CONG_ROD_v0
{
    uint SndLimTransRwin;
    uint SndLimTimeRwin;
    size_t SndLimBytesRwin;
    uint SndLimTransCwnd;
    uint SndLimTimeCwnd;
    size_t SndLimBytesCwnd;
    uint SndLimTransSnd;
    uint SndLimTimeSnd;
    size_t SndLimBytesSnd;
    uint SlowStart;
    uint CongAvoid;
    uint OtherReductions;
    uint CurCwnd;
    uint MaxSsCwnd;
    uint MaxCaCwnd;
    uint CurSsthresh;
    uint MaxSsthresh;
    uint MinSsthresh;
}

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_SND_CONG_ROD_v0 サイズ: 72 バイト(x86)
dim st, 18    ; 4byte整数×18(構造体サイズ 72 / 4 切り上げ)
; SndLimTransRwin : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; SndLimTimeRwin : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; SndLimBytesRwin : UINT_PTR (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; SndLimTransCwnd : DWORD (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; SndLimTimeCwnd : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; SndLimBytesCwnd : UINT_PTR (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; SndLimTransSnd : DWORD (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; SndLimTimeSnd : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; SndLimBytesSnd : UINT_PTR (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; SlowStart : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; CongAvoid : DWORD (+40, 4byte)  st.10 = 値  /  値 = st.10   (lpoke/lpeek も可)
; OtherReductions : DWORD (+44, 4byte)  st.11 = 値  /  値 = st.11   (lpoke/lpeek も可)
; CurCwnd : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; MaxSsCwnd : DWORD (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; MaxCaCwnd : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; CurSsthresh : DWORD (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; MaxSsthresh : DWORD (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; MinSsthresh : DWORD (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TCP_ESTATS_SND_CONG_ROD_v0 サイズ: 88 バイト(x64)
dim st, 22    ; 4byte整数×22(構造体サイズ 88 / 4 切り上げ)
; SndLimTransRwin : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; SndLimTimeRwin : DWORD (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; SndLimBytesRwin : UINT_PTR (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; SndLimTransCwnd : DWORD (+16, 4byte)  st.4 = 値  /  値 = st.4   (lpoke/lpeek も可)
; SndLimTimeCwnd : DWORD (+20, 4byte)  st.5 = 値  /  値 = st.5   (lpoke/lpeek も可)
; SndLimBytesCwnd : UINT_PTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; SndLimTransSnd : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; SndLimTimeSnd : DWORD (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; SndLimBytesSnd : UINT_PTR (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; SlowStart : DWORD (+48, 4byte)  st.12 = 値  /  値 = st.12   (lpoke/lpeek も可)
; CongAvoid : DWORD (+52, 4byte)  st.13 = 値  /  値 = st.13   (lpoke/lpeek も可)
; OtherReductions : DWORD (+56, 4byte)  st.14 = 値  /  値 = st.14   (lpoke/lpeek も可)
; CurCwnd : DWORD (+60, 4byte)  st.15 = 値  /  値 = st.15   (lpoke/lpeek も可)
; MaxSsCwnd : DWORD (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; MaxCaCwnd : DWORD (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; CurSsthresh : DWORD (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; MaxSsthresh : DWORD (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; MinSsthresh : DWORD (+80, 4byte)  st.20 = 値  /  値 = st.20   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global TCP_ESTATS_SND_CONG_ROD_v0
    #field int SndLimTransRwin
    #field int SndLimTimeRwin
    #field intptr SndLimBytesRwin
    #field int SndLimTransCwnd
    #field int SndLimTimeCwnd
    #field intptr SndLimBytesCwnd
    #field int SndLimTransSnd
    #field int SndLimTimeSnd
    #field intptr SndLimBytesSnd
    #field int SlowStart
    #field int CongAvoid
    #field int OtherReductions
    #field int CurCwnd
    #field int MaxSsCwnd
    #field int MaxCaCwnd
    #field int CurSsthresh
    #field int MaxSsthresh
    #field int MinSsthresh
#endstruct

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