ホーム › NetworkManagement.IpHelper › TCP_ESTATS_SEND_BUFF_ROD_v0
TCP_ESTATS_SEND_BUFF_ROD_v0
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| CurRetxQueue | UINT_PTR | 8/4 | +0 | +0 | 現在の再送キューのサイズ(バイト)である。 |
| MaxRetxQueue | UINT_PTR | 8/4 | +8 | +4 | 観測された再送キューの最大サイズ(バイト)である。 |
| CurAppWQueue | UINT_PTR | 8/4 | +16 | +8 | 現在のアプリ書き込みキューのサイズ(バイト)である。 |
| MaxAppWQueue | UINT_PTR | 8/4 | +24 | +12 | 観測されたアプリ書き込みキューの最大サイズ(バイト)である。 |
各言語での定義
#include <windows.h>
// TCP_ESTATS_SEND_BUFF_ROD_v0 (x64 32 / x86 16 バイト)
typedef struct TCP_ESTATS_SEND_BUFF_ROD_v0 {
UINT_PTR CurRetxQueue;
UINT_PTR MaxRetxQueue;
UINT_PTR CurAppWQueue;
UINT_PTR MaxAppWQueue;
} TCP_ESTATS_SEND_BUFF_ROD_v0;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct TCP_ESTATS_SEND_BUFF_ROD_v0
{
public UIntPtr CurRetxQueue;
public UIntPtr MaxRetxQueue;
public UIntPtr CurAppWQueue;
public UIntPtr MaxAppWQueue;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure TCP_ESTATS_SEND_BUFF_ROD_v0
Public CurRetxQueue As UIntPtr
Public MaxRetxQueue As UIntPtr
Public CurAppWQueue As UIntPtr
Public MaxAppWQueue As UIntPtr
End Structureimport ctypes
from ctypes import wintypes
class TCP_ESTATS_SEND_BUFF_ROD_v0(ctypes.Structure):
_fields_ = [
("CurRetxQueue", ctypes.c_size_t),
("MaxRetxQueue", ctypes.c_size_t),
("CurAppWQueue", ctypes.c_size_t),
("MaxAppWQueue", ctypes.c_size_t),
]#[repr(C)]
pub struct TCP_ESTATS_SEND_BUFF_ROD_v0 {
pub CurRetxQueue: usize,
pub MaxRetxQueue: usize,
pub CurAppWQueue: usize,
pub MaxAppWQueue: usize,
}import "golang.org/x/sys/windows"
type TCP_ESTATS_SEND_BUFF_ROD_v0 struct {
CurRetxQueue uintptr
MaxRetxQueue uintptr
CurAppWQueue uintptr
MaxAppWQueue uintptr
}type
TCP_ESTATS_SEND_BUFF_ROD_v0 = record
CurRetxQueue: NativeUInt;
MaxRetxQueue: NativeUInt;
CurAppWQueue: NativeUInt;
MaxAppWQueue: NativeUInt;
end;const TCP_ESTATS_SEND_BUFF_ROD_v0 = extern struct {
CurRetxQueue: usize,
MaxRetxQueue: usize,
CurAppWQueue: usize,
MaxAppWQueue: usize,
};type
TCP_ESTATS_SEND_BUFF_ROD_v0 {.bycopy.} = object
CurRetxQueue: uint
MaxRetxQueue: uint
CurAppWQueue: uint
MaxAppWQueue: uintstruct TCP_ESTATS_SEND_BUFF_ROD_v0
{
size_t CurRetxQueue;
size_t MaxRetxQueue;
size_t CurAppWQueue;
size_t MaxAppWQueue;
}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_SEND_BUFF_ROD_v0 サイズ: 16 バイト(x86)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; CurRetxQueue : UINT_PTR (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; MaxRetxQueue : UINT_PTR (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; CurAppWQueue : UINT_PTR (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; MaxAppWQueue : UINT_PTR (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; TCP_ESTATS_SEND_BUFF_ROD_v0 サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; CurRetxQueue : UINT_PTR (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; MaxRetxQueue : UINT_PTR (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; CurAppWQueue : UINT_PTR (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; MaxAppWQueue : UINT_PTR (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global TCP_ESTATS_SEND_BUFF_ROD_v0
#field intptr CurRetxQueue
#field intptr MaxRetxQueue
#field intptr CurAppWQueue
#field intptr MaxAppWQueue
#endstruct
stdim st, TCP_ESTATS_SEND_BUFF_ROD_v0 ; NSTRUCT 変数を確保
st->CurRetxQueue = 100
mes "CurRetxQueue=" + st->CurRetxQueue