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