ホーム › NetworkManagement.Ndis › NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1
NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| IPv4 | _IPv4_e__Struct | 20 | +0 | +0 | WMI用LSOv1のIPv4能力を示す入れ子構造体。 |
構造体: _IPv4_e__Struct x64 20B / x86 20B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| Encapsulation | DWORD | 4 | +0 | +0 |
| MaxOffLoadSize | DWORD | 4 | +4 | +4 |
| MinSegmentCount | DWORD | 4 | +8 | +8 |
| TcpOptions | DWORD | 4 | +12 | +12 |
| IpOptions | DWORD | 4 | +16 | +16 |
各言語での定義
#include <windows.h>
// NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 (x64 20 / x86 20 バイト)
typedef struct NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 {
_IPv4_e__Struct IPv4;
} NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1
{
public _IPv4_e__Struct IPv4;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1
Public IPv4 As _IPv4_e__Struct
End Structureimport ctypes
from ctypes import wintypes
class NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1(ctypes.Structure):
_fields_ = [
("IPv4", _IPv4_e__Struct),
]#[repr(C)]
pub struct NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 {
pub IPv4: _IPv4_e__Struct,
}import "golang.org/x/sys/windows"
type NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 struct {
IPv4 _IPv4_e__Struct
}type
NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 = record
IPv4: _IPv4_e__Struct;
end;const NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 = extern struct {
IPv4: _IPv4_e__Struct,
};type
NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 {.bycopy.} = object
IPv4: _IPv4_e__Structstruct NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1
{
_IPv4_e__Struct IPv4;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 サイズ: 20 バイト(x64)
dim st, 5 ; 4byte整数×5(構造体サイズ 20 / 4 切り上げ)
; IPv4 : _IPv4_e__Struct (+0, 20byte) varptr(st)+0 を基点に操作(20byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1
#field _IPv4_e__Struct IPv4
#endstruct
stdim st, NDIS_WMI_TCP_LARGE_SEND_OFFLOAD_V1 ; NSTRUCT 変数を確保