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受信ウィンドウ制限により送信が制限された状態への遷移回数である。
SndLimTimeRwinDWORD4+4+4受信ウィンドウ制限で送信が制限されていた累計時間(ミリ秒)である。
SndLimBytesRwinUINT_PTR8/4+8+8受信ウィンドウ制限期間中に送信されたバイト数である。
SndLimTransCwndDWORD4+16+12輻輳ウィンドウ制限により送信が制限された状態への遷移回数である。
SndLimTimeCwndDWORD4+20+16輻輳ウィンドウ制限で送信が制限されていた累計時間(ミリ秒)である。
SndLimBytesCwndUINT_PTR8/4+24+20輻輳ウィンドウ制限期間中に送信されたバイト数である。
SndLimTransSndDWORD4+32+24送信側アプリ制限により送信が制限された状態への遷移回数である。
SndLimTimeSndDWORD4+36+28送信側アプリ制限で送信が制限されていた累計時間(ミリ秒)である。
SndLimBytesSndUINT_PTR8/4+40+32送信側アプリ制限期間中に送信されたバイト数である。
SlowStartDWORD4+48+36スロースタートフェーズに入った回数である。
CongAvoidDWORD4+52+40輻輳回避フェーズに入った回数である。
OtherReductionsDWORD4+56+44上記以外の理由による輻輳ウィンドウ縮小の回数である。
CurCwndDWORD4+60+48現在の輻輳ウィンドウサイズ(バイト)である。
MaxSsCwndDWORD4+64+52スロースタート時に観測された最大輻輳ウィンドウサイズである。
MaxCaCwndDWORD4+68+56輻輳回避時に観測された最大輻輳ウィンドウサイズである。
CurSsthreshDWORD4+72+60現在のスロースタート閾値(ssthresh)である。
MaxSsthreshDWORD4+76+64観測された最大のスロースタート閾値である。
MinSsthreshDWORD4+80+68観測された最小のスロースタート閾値である。

各言語での定義

#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