TCP_ESTATS_REC_ROD_v0
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| CurRwinSent | DWORD | 4 | +0 | +0 | 送信された最新のウィンドウ通知 (バイト単位)。 |
| MaxRwinSent | DWORD | 4 | +4 | +4 | 送信されたウィンドウ通知の最大値 (バイト単位)。 |
| MinRwinSent | DWORD | 4 | +8 | +8 | 送信されたウィンドウ通知の最小値 (バイト単位)。 |
| LimRwin | DWORD | 4 | +12 | +12 | 送信可能なウィンドウ通知の最大値 (バイト単位)。 |
| DupAckEpisodes | DWORD | 4 | +16 | +16 | 直前の ACK が重複でなかった状態で重複 ACK が送信された回数です。これは、連続した一連の重複確認応答が送信された回数を表します。 これは、リモート TCP エンドポイントから近端の TCP エンドポイントへの経路上で、損失または順序の入れ替えが発生したデータセグメントの数を示す指標となります。 |
| DupAcksOut | DWORD | 4 | +20 | +20 | 送信された重複 ACK の数です。 DupAcksOut メンバーの変化量と DupAckEpisodes メンバーの変化量との比は、一定期間における順序の入れ替え距離または回復距離を示す指標となります。 |
| CeRcvd | DWORD | 4 | +24 | +24 | IP ヘッダーに Congestion Experienced (CE) マークが付与された状態で受信されたセグメントの数。 |
| EcnSent | DWORD | 4 | +28 | +28 | 将来の使用のために予約済みです。このメンバーは常に 0 に設定されます。 |
| EcnNoncesRcvd | DWORD | 4 | +32 | +32 | 将来の使用のために予約済みです。このメンバーは常に 0 に設定されます。 |
| CurReasmQueue | DWORD | 4 | +36 | +36 | 再構成キューがまたがるシーケンス空間の現在のバイト数。 これは通常、rcv.nxt と再構成キューの右端のシーケンス番号との差です。 |
| MaxReasmQueue | DWORD | 4 | +40 | +40 | 再構成キューがまたがるシーケンス空間の最大バイト数。 これは CurReasmQueue メンバーの最大値です。 |
| CurAppRQueue | UINT_PTR | 8/4 | +48 | +44 | TCP によって確認応答されたものの、まだアプリケーションに配信されていないアプリケーションデータの現在のバイト数。 |
| MaxAppRQueue | UINT_PTR | 8/4 | +56 | +48 | TCP によって確認応答されたものの、まだアプリケーションに配信されていないアプリケーションデータの最大バイト数。 |
| WinScaleSent | BYTE | 1 | +64 | +52 | ウィンドウスケールオプションが送信された場合はその値。送信されていない場合は -1 です。 WinScaleSent メンバーと TCP_ESTATS_OBS_REC_ROD_v0 構造体の WinScaleRcvd メンバーがいずれも -1 でない場合、Rcv.Wind.Scale はこの値と同じになり、ローカルホストからリモートホストへの受信ウィンドウ通知のスケーリングに使用されます。 |
公式ドキュメント
TCP_ESTATS_REC_ROD_v0 構造体は、TCP 接続におけるローカル受信側の TCP 拡張統計について、読み取り専用の動的情報を格納します。
解説(Remarks)
TCP_ESTATS_REC_ROD_v0 構造体は、Windows Vista 以降で利用できる TCP 拡張統計機能の一部として使用されます。
TCP_ESTATS_REC_ROD_v0 は、TCP 接続におけるローカル受信側の TCP 拡張統計に関する読み取り専用の動的情報を表す構造体のバージョン 0 として定義されています。この情報は、接続が確立された後に利用できます。
TCP_ESTATS_REC_ROD_v0 構造体は、EstatsType パラメーターに TcpConnectionEstatsRec を渡して GetPerTcp6ConnectionEStats 関数または GetPerTcpConnectionEStats 関数を呼び出すことで取得します。この構造体を取得するには、TCP 拡張統計を有効にしておく必要があります。
TCP の輻輳制御および輻輳制御アルゴリズムについては、TCP Congestion Control に関する IETF RFC 2581 で詳しく説明されています。詳細については、http://www.ietf.org/rfc/rfc2581.txt を参照してください。
IP における明示的輻輳通知 (ECN) については、The Addition of Explicit Congestion Notification (ECN) to IP に関する IETF RFC 2581 で詳しく説明されています。詳細については、http://www.ietf.org/rfc/rfc3168.txt を参照してください。
この構造体のメンバーは、TCP Extended Statistics MIB に関する IETF RFC で定義されています。詳細については、http://www.ietf.org/rfc/rfc4898.txt を参照してください。
次の表は、TCP_ESTATS_REC_ROD_v0 構造体のメンバーと、TCP 拡張統計に関する RFC 4898 で定義されている項目との対応を示しています。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#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 Structureimport 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: uint8struct 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