ホーム › NetworkManagement.IpHelper › MIB_IPINTERFACE_ROW
MIB_IPINTERFACE_ROW
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Family | ADDRESS_FAMILY | 2 | +0 | +0 | アドレスファミリ(AF_INET/AF_INET6)を示す。 |
| InterfaceLuid | NET_LUID_LH | 8 | +8 | +8 | インタフェースのローカル一意識別子(NET_LUID_LH)である。 |
| InterfaceIndex | DWORD | 4 | +16 | +16 | インタフェースのインデックスである。 |
| MaxReassemblySize | DWORD | 4 | +20 | +20 | 再構成可能なIPデータグラムの最大サイズ(バイト)である。 |
| InterfaceIdentifier | ULONGLONG | 8 | +24 | +24 | IPv6インタフェース識別子(64ビット)である。 |
| MinRouterAdvertisementInterval | DWORD | 4 | +32 | +32 | ルーターアドバタイズメント送信の最小間隔(秒)である。 |
| MaxRouterAdvertisementInterval | DWORD | 4 | +36 | +36 | ルーターアドバタイズメント送信の最大間隔(秒)である。 |
| AdvertisingEnabled | BOOLEAN | 1 | +40 | +40 | ルーターアドバタイズメントの送信が有効かを示すブール値である。 |
| ForwardingEnabled | BOOLEAN | 1 | +41 | +41 | このインタフェースでIP転送が有効かを示すブール値である。 |
| WeakHostSend | BOOLEAN | 1 | +42 | +42 | ウィークホストモデルでの送信が有効かを示すブール値である。 |
| WeakHostReceive | BOOLEAN | 1 | +43 | +43 | ウィークホストモデルでの受信が有効かを示すブール値である。 |
| UseAutomaticMetric | BOOLEAN | 1 | +44 | +44 | メトリックを自動計算するかを示すブール値である。 |
| UseNeighborUnreachabilityDetection | BOOLEAN | 1 | +45 | +45 | 近隣到達不能検出(NUD)を使用するかを示すブール値である。 |
| ManagedAddressConfigurationSupported | BOOLEAN | 1 | +46 | +46 | 管理されたアドレス構成(DHCP)に対応するかを示すブール値である。 |
| OtherStatefulConfigurationSupported | BOOLEAN | 1 | +47 | +47 | その他のステートフル構成に対応するかを示すブール値である。 |
| AdvertiseDefaultRoute | BOOLEAN | 1 | +48 | +48 | デフォルトルートをアドバタイズするかを示すブール値である。 |
| RouterDiscoveryBehavior | NL_ROUTER_DISCOVERY_BEHAVIOR | 4 | +52 | +52 | ルーター探索の動作(NL_ROUTER_DISCOVERY_BEHAVIOR)を示す。 |
| DadTransmits | DWORD | 4 | +56 | +56 | 重複アドレス検出(DAD)の送信回数である。 |
| BaseReachableTime | DWORD | 4 | +60 | +60 | 近隣が到達可能とみなされる基準時間(ミリ秒)である。 |
| RetransmitTime | DWORD | 4 | +64 | +64 | 近隣要請の再送間隔(ミリ秒)である。 |
| PathMtuDiscoveryTimeout | DWORD | 4 | +68 | +68 | パスMTU探索のタイムアウト(ミリ秒)である。 |
| LinkLocalAddressBehavior | NL_LINK_LOCAL_ADDRESS_BEHAVIOR | 4 | +72 | +72 | リンクローカルアドレスの動作(NL_LINK_LOCAL_ADDRESS_BEHAVIOR)を示す。 |
| LinkLocalAddressTimeout | DWORD | 4 | +76 | +76 | リンクローカルアドレス構成のタイムアウト(ミリ秒)である。 |
| ZoneIndices | DWORD | 64 | +80 | +80 | 各スコープレベルに対応するゾーンインデックスの配列である。 |
| SitePrefixLength | DWORD | 4 | +144 | +144 | サイトプレフィックスの長さ(ビット数)である。 |
| Metric | DWORD | 4 | +148 | +148 | インタフェースのメトリック値である。 |
| NlMtu | DWORD | 4 | +152 | +152 | ネットワーク層のMTU(バイト)である。 |
| Connected | BOOLEAN | 1 | +156 | +156 | インタフェースが接続中かどうかを示すブール値である。 |
| SupportsWakeUpPatterns | BOOLEAN | 1 | +157 | +157 | ウェイクアップパターンに対応するかを示すブール値である。 |
| SupportsNeighborDiscovery | BOOLEAN | 1 | +158 | +158 | 近隣探索に対応するかを示すブール値である。 |
| SupportsRouterDiscovery | BOOLEAN | 1 | +159 | +159 | ルーター探索に対応するかを示すブール値である。 |
| ReachableTime | DWORD | 4 | +160 | +160 | 近隣が到達可能とみなされる実際の時間(ミリ秒)である。 |
| TransmitOffload | NL_INTERFACE_OFFLOAD_ROD | 1 | +164 | +164 | 送信オフロード機能の状態(NL_INTERFACE_OFFLOAD_ROD)である。 |
| ReceiveOffload | NL_INTERFACE_OFFLOAD_ROD | 1 | +165 | +165 | 受信オフロード機能の状態(NL_INTERFACE_OFFLOAD_ROD)である。 |
| DisableDefaultRoutes | BOOLEAN | 1 | +166 | +166 | このインタフェースでデフォルトルートを無効化するかを示すブール値である。 |
各言語での定義
#include <windows.h>
// NET_LUID_LH (x64 8 / x86 8 バイト)
typedef struct NET_LUID_LH {
ULONGLONG Value;
_Info_e__Struct Info;
} NET_LUID_LH;
// NL_INTERFACE_OFFLOAD_ROD (x64 1 / x86 1 バイト)
typedef struct NL_INTERFACE_OFFLOAD_ROD {
BYTE _bitfield;
} NL_INTERFACE_OFFLOAD_ROD;
// MIB_IPINTERFACE_ROW (x64 168 / x86 168 バイト)
typedef struct MIB_IPINTERFACE_ROW {
ADDRESS_FAMILY Family;
NET_LUID_LH InterfaceLuid;
DWORD InterfaceIndex;
DWORD MaxReassemblySize;
ULONGLONG InterfaceIdentifier;
DWORD MinRouterAdvertisementInterval;
DWORD MaxRouterAdvertisementInterval;
BOOLEAN AdvertisingEnabled;
BOOLEAN ForwardingEnabled;
BOOLEAN WeakHostSend;
BOOLEAN WeakHostReceive;
BOOLEAN UseAutomaticMetric;
BOOLEAN UseNeighborUnreachabilityDetection;
BOOLEAN ManagedAddressConfigurationSupported;
BOOLEAN OtherStatefulConfigurationSupported;
BOOLEAN AdvertiseDefaultRoute;
NL_ROUTER_DISCOVERY_BEHAVIOR RouterDiscoveryBehavior;
DWORD DadTransmits;
DWORD BaseReachableTime;
DWORD RetransmitTime;
DWORD PathMtuDiscoveryTimeout;
NL_LINK_LOCAL_ADDRESS_BEHAVIOR LinkLocalAddressBehavior;
DWORD LinkLocalAddressTimeout;
DWORD ZoneIndices[16];
DWORD SitePrefixLength;
DWORD Metric;
DWORD NlMtu;
BOOLEAN Connected;
BOOLEAN SupportsWakeUpPatterns;
BOOLEAN SupportsNeighborDiscovery;
BOOLEAN SupportsRouterDiscovery;
DWORD ReachableTime;
NL_INTERFACE_OFFLOAD_ROD TransmitOffload;
NL_INTERFACE_OFFLOAD_ROD ReceiveOffload;
BOOLEAN DisableDefaultRoutes;
} MIB_IPINTERFACE_ROW;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NET_LUID_LH
{
public ulong Value;
public _Info_e__Struct Info;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct NL_INTERFACE_OFFLOAD_ROD
{
public byte _bitfield;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MIB_IPINTERFACE_ROW
{
public ushort Family;
public NET_LUID_LH InterfaceLuid;
public uint InterfaceIndex;
public uint MaxReassemblySize;
public ulong InterfaceIdentifier;
public uint MinRouterAdvertisementInterval;
public uint MaxRouterAdvertisementInterval;
[MarshalAs(UnmanagedType.U1)] public bool AdvertisingEnabled;
[MarshalAs(UnmanagedType.U1)] public bool ForwardingEnabled;
[MarshalAs(UnmanagedType.U1)] public bool WeakHostSend;
[MarshalAs(UnmanagedType.U1)] public bool WeakHostReceive;
[MarshalAs(UnmanagedType.U1)] public bool UseAutomaticMetric;
[MarshalAs(UnmanagedType.U1)] public bool UseNeighborUnreachabilityDetection;
[MarshalAs(UnmanagedType.U1)] public bool ManagedAddressConfigurationSupported;
[MarshalAs(UnmanagedType.U1)] public bool OtherStatefulConfigurationSupported;
[MarshalAs(UnmanagedType.U1)] public bool AdvertiseDefaultRoute;
public int RouterDiscoveryBehavior;
public uint DadTransmits;
public uint BaseReachableTime;
public uint RetransmitTime;
public uint PathMtuDiscoveryTimeout;
public int LinkLocalAddressBehavior;
public uint LinkLocalAddressTimeout;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public uint[] ZoneIndices;
public uint SitePrefixLength;
public uint Metric;
public uint NlMtu;
[MarshalAs(UnmanagedType.U1)] public bool Connected;
[MarshalAs(UnmanagedType.U1)] public bool SupportsWakeUpPatterns;
[MarshalAs(UnmanagedType.U1)] public bool SupportsNeighborDiscovery;
[MarshalAs(UnmanagedType.U1)] public bool SupportsRouterDiscovery;
public uint ReachableTime;
public NL_INTERFACE_OFFLOAD_ROD TransmitOffload;
public NL_INTERFACE_OFFLOAD_ROD ReceiveOffload;
[MarshalAs(UnmanagedType.U1)] public bool DisableDefaultRoutes;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NET_LUID_LH
Public Value As ULong
Public Info As _Info_e__Struct
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure NL_INTERFACE_OFFLOAD_ROD
Public _bitfield As Byte
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MIB_IPINTERFACE_ROW
Public Family As UShort
Public InterfaceLuid As NET_LUID_LH
Public InterfaceIndex As UInteger
Public MaxReassemblySize As UInteger
Public InterfaceIdentifier As ULong
Public MinRouterAdvertisementInterval As UInteger
Public MaxRouterAdvertisementInterval As UInteger
<MarshalAs(UnmanagedType.U1)> Public AdvertisingEnabled As Boolean
<MarshalAs(UnmanagedType.U1)> Public ForwardingEnabled As Boolean
<MarshalAs(UnmanagedType.U1)> Public WeakHostSend As Boolean
<MarshalAs(UnmanagedType.U1)> Public WeakHostReceive As Boolean
<MarshalAs(UnmanagedType.U1)> Public UseAutomaticMetric As Boolean
<MarshalAs(UnmanagedType.U1)> Public UseNeighborUnreachabilityDetection As Boolean
<MarshalAs(UnmanagedType.U1)> Public ManagedAddressConfigurationSupported As Boolean
<MarshalAs(UnmanagedType.U1)> Public OtherStatefulConfigurationSupported As Boolean
<MarshalAs(UnmanagedType.U1)> Public AdvertiseDefaultRoute As Boolean
Public RouterDiscoveryBehavior As Integer
Public DadTransmits As UInteger
Public BaseReachableTime As UInteger
Public RetransmitTime As UInteger
Public PathMtuDiscoveryTimeout As UInteger
Public LinkLocalAddressBehavior As Integer
Public LinkLocalAddressTimeout As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=16)> Public ZoneIndices() As UInteger
Public SitePrefixLength As UInteger
Public Metric As UInteger
Public NlMtu As UInteger
<MarshalAs(UnmanagedType.U1)> Public Connected As Boolean
<MarshalAs(UnmanagedType.U1)> Public SupportsWakeUpPatterns As Boolean
<MarshalAs(UnmanagedType.U1)> Public SupportsNeighborDiscovery As Boolean
<MarshalAs(UnmanagedType.U1)> Public SupportsRouterDiscovery As Boolean
Public ReachableTime As UInteger
Public TransmitOffload As NL_INTERFACE_OFFLOAD_ROD
Public ReceiveOffload As NL_INTERFACE_OFFLOAD_ROD
<MarshalAs(UnmanagedType.U1)> Public DisableDefaultRoutes As Boolean
End Structureimport ctypes
from ctypes import wintypes
class NET_LUID_LH(ctypes.Structure):
_fields_ = [
("Value", ctypes.c_ulonglong),
("Info", _Info_e__Struct),
]
class NL_INTERFACE_OFFLOAD_ROD(ctypes.Structure):
_fields_ = [
("_bitfield", ctypes.c_ubyte),
]
class MIB_IPINTERFACE_ROW(ctypes.Structure):
_fields_ = [
("Family", ctypes.c_ushort),
("InterfaceLuid", NET_LUID_LH),
("InterfaceIndex", wintypes.DWORD),
("MaxReassemblySize", wintypes.DWORD),
("InterfaceIdentifier", ctypes.c_ulonglong),
("MinRouterAdvertisementInterval", wintypes.DWORD),
("MaxRouterAdvertisementInterval", wintypes.DWORD),
("AdvertisingEnabled", ctypes.c_byte),
("ForwardingEnabled", ctypes.c_byte),
("WeakHostSend", ctypes.c_byte),
("WeakHostReceive", ctypes.c_byte),
("UseAutomaticMetric", ctypes.c_byte),
("UseNeighborUnreachabilityDetection", ctypes.c_byte),
("ManagedAddressConfigurationSupported", ctypes.c_byte),
("OtherStatefulConfigurationSupported", ctypes.c_byte),
("AdvertiseDefaultRoute", ctypes.c_byte),
("RouterDiscoveryBehavior", ctypes.c_int),
("DadTransmits", wintypes.DWORD),
("BaseReachableTime", wintypes.DWORD),
("RetransmitTime", wintypes.DWORD),
("PathMtuDiscoveryTimeout", wintypes.DWORD),
("LinkLocalAddressBehavior", ctypes.c_int),
("LinkLocalAddressTimeout", wintypes.DWORD),
("ZoneIndices", wintypes.DWORD * 16),
("SitePrefixLength", wintypes.DWORD),
("Metric", wintypes.DWORD),
("NlMtu", wintypes.DWORD),
("Connected", ctypes.c_byte),
("SupportsWakeUpPatterns", ctypes.c_byte),
("SupportsNeighborDiscovery", ctypes.c_byte),
("SupportsRouterDiscovery", ctypes.c_byte),
("ReachableTime", wintypes.DWORD),
("TransmitOffload", NL_INTERFACE_OFFLOAD_ROD),
("ReceiveOffload", NL_INTERFACE_OFFLOAD_ROD),
("DisableDefaultRoutes", ctypes.c_byte),
]#[repr(C)]
pub struct NET_LUID_LH {
pub Value: u64,
pub Info: _Info_e__Struct,
}
#[repr(C)]
pub struct NL_INTERFACE_OFFLOAD_ROD {
pub _bitfield: u8,
}
#[repr(C)]
pub struct MIB_IPINTERFACE_ROW {
pub Family: u16,
pub InterfaceLuid: NET_LUID_LH,
pub InterfaceIndex: u32,
pub MaxReassemblySize: u32,
pub InterfaceIdentifier: u64,
pub MinRouterAdvertisementInterval: u32,
pub MaxRouterAdvertisementInterval: u32,
pub AdvertisingEnabled: u8,
pub ForwardingEnabled: u8,
pub WeakHostSend: u8,
pub WeakHostReceive: u8,
pub UseAutomaticMetric: u8,
pub UseNeighborUnreachabilityDetection: u8,
pub ManagedAddressConfigurationSupported: u8,
pub OtherStatefulConfigurationSupported: u8,
pub AdvertiseDefaultRoute: u8,
pub RouterDiscoveryBehavior: i32,
pub DadTransmits: u32,
pub BaseReachableTime: u32,
pub RetransmitTime: u32,
pub PathMtuDiscoveryTimeout: u32,
pub LinkLocalAddressBehavior: i32,
pub LinkLocalAddressTimeout: u32,
pub ZoneIndices: [u32; 16],
pub SitePrefixLength: u32,
pub Metric: u32,
pub NlMtu: u32,
pub Connected: u8,
pub SupportsWakeUpPatterns: u8,
pub SupportsNeighborDiscovery: u8,
pub SupportsRouterDiscovery: u8,
pub ReachableTime: u32,
pub TransmitOffload: NL_INTERFACE_OFFLOAD_ROD,
pub ReceiveOffload: NL_INTERFACE_OFFLOAD_ROD,
pub DisableDefaultRoutes: u8,
}import "golang.org/x/sys/windows"
type NET_LUID_LH struct {
Value uint64
Info _Info_e__Struct
}
type NL_INTERFACE_OFFLOAD_ROD struct {
_bitfield byte
}
type MIB_IPINTERFACE_ROW struct {
Family uint16
InterfaceLuid NET_LUID_LH
InterfaceIndex uint32
MaxReassemblySize uint32
InterfaceIdentifier uint64
MinRouterAdvertisementInterval uint32
MaxRouterAdvertisementInterval uint32
AdvertisingEnabled byte
ForwardingEnabled byte
WeakHostSend byte
WeakHostReceive byte
UseAutomaticMetric byte
UseNeighborUnreachabilityDetection byte
ManagedAddressConfigurationSupported byte
OtherStatefulConfigurationSupported byte
AdvertiseDefaultRoute byte
RouterDiscoveryBehavior int32
DadTransmits uint32
BaseReachableTime uint32
RetransmitTime uint32
PathMtuDiscoveryTimeout uint32
LinkLocalAddressBehavior int32
LinkLocalAddressTimeout uint32
ZoneIndices [16]uint32
SitePrefixLength uint32
Metric uint32
NlMtu uint32
Connected byte
SupportsWakeUpPatterns byte
SupportsNeighborDiscovery byte
SupportsRouterDiscovery byte
ReachableTime uint32
TransmitOffload NL_INTERFACE_OFFLOAD_ROD
ReceiveOffload NL_INTERFACE_OFFLOAD_ROD
DisableDefaultRoutes byte
}type
NET_LUID_LH = record
Value: UInt64;
Info: _Info_e__Struct;
end;
NL_INTERFACE_OFFLOAD_ROD = record
_bitfield: Byte;
end;
MIB_IPINTERFACE_ROW = record
Family: Word;
InterfaceLuid: NET_LUID_LH;
InterfaceIndex: DWORD;
MaxReassemblySize: DWORD;
InterfaceIdentifier: UInt64;
MinRouterAdvertisementInterval: DWORD;
MaxRouterAdvertisementInterval: DWORD;
AdvertisingEnabled: ByteBool;
ForwardingEnabled: ByteBool;
WeakHostSend: ByteBool;
WeakHostReceive: ByteBool;
UseAutomaticMetric: ByteBool;
UseNeighborUnreachabilityDetection: ByteBool;
ManagedAddressConfigurationSupported: ByteBool;
OtherStatefulConfigurationSupported: ByteBool;
AdvertiseDefaultRoute: ByteBool;
RouterDiscoveryBehavior: Integer;
DadTransmits: DWORD;
BaseReachableTime: DWORD;
RetransmitTime: DWORD;
PathMtuDiscoveryTimeout: DWORD;
LinkLocalAddressBehavior: Integer;
LinkLocalAddressTimeout: DWORD;
ZoneIndices: array[0..15] of DWORD;
SitePrefixLength: DWORD;
Metric: DWORD;
NlMtu: DWORD;
Connected: ByteBool;
SupportsWakeUpPatterns: ByteBool;
SupportsNeighborDiscovery: ByteBool;
SupportsRouterDiscovery: ByteBool;
ReachableTime: DWORD;
TransmitOffload: NL_INTERFACE_OFFLOAD_ROD;
ReceiveOffload: NL_INTERFACE_OFFLOAD_ROD;
DisableDefaultRoutes: ByteBool;
end;const NET_LUID_LH = extern struct {
Value: u64,
Info: _Info_e__Struct,
};
const NL_INTERFACE_OFFLOAD_ROD = extern struct {
_bitfield: u8,
};
const MIB_IPINTERFACE_ROW = extern struct {
Family: u16,
InterfaceLuid: NET_LUID_LH,
InterfaceIndex: u32,
MaxReassemblySize: u32,
InterfaceIdentifier: u64,
MinRouterAdvertisementInterval: u32,
MaxRouterAdvertisementInterval: u32,
AdvertisingEnabled: u8,
ForwardingEnabled: u8,
WeakHostSend: u8,
WeakHostReceive: u8,
UseAutomaticMetric: u8,
UseNeighborUnreachabilityDetection: u8,
ManagedAddressConfigurationSupported: u8,
OtherStatefulConfigurationSupported: u8,
AdvertiseDefaultRoute: u8,
RouterDiscoveryBehavior: i32,
DadTransmits: u32,
BaseReachableTime: u32,
RetransmitTime: u32,
PathMtuDiscoveryTimeout: u32,
LinkLocalAddressBehavior: i32,
LinkLocalAddressTimeout: u32,
ZoneIndices: [16]u32,
SitePrefixLength: u32,
Metric: u32,
NlMtu: u32,
Connected: u8,
SupportsWakeUpPatterns: u8,
SupportsNeighborDiscovery: u8,
SupportsRouterDiscovery: u8,
ReachableTime: u32,
TransmitOffload: NL_INTERFACE_OFFLOAD_ROD,
ReceiveOffload: NL_INTERFACE_OFFLOAD_ROD,
DisableDefaultRoutes: u8,
};type
NET_LUID_LH {.bycopy.} = object
Value: uint64
Info: _Info_e__Struct
NL_INTERFACE_OFFLOAD_ROD {.bycopy.} = object
_bitfield: uint8
MIB_IPINTERFACE_ROW {.bycopy.} = object
Family: uint16
InterfaceLuid: NET_LUID_LH
InterfaceIndex: uint32
MaxReassemblySize: uint32
InterfaceIdentifier: uint64
MinRouterAdvertisementInterval: uint32
MaxRouterAdvertisementInterval: uint32
AdvertisingEnabled: uint8
ForwardingEnabled: uint8
WeakHostSend: uint8
WeakHostReceive: uint8
UseAutomaticMetric: uint8
UseNeighborUnreachabilityDetection: uint8
ManagedAddressConfigurationSupported: uint8
OtherStatefulConfigurationSupported: uint8
AdvertiseDefaultRoute: uint8
RouterDiscoveryBehavior: int32
DadTransmits: uint32
BaseReachableTime: uint32
RetransmitTime: uint32
PathMtuDiscoveryTimeout: uint32
LinkLocalAddressBehavior: int32
LinkLocalAddressTimeout: uint32
ZoneIndices: array[16, uint32]
SitePrefixLength: uint32
Metric: uint32
NlMtu: uint32
Connected: uint8
SupportsWakeUpPatterns: uint8
SupportsNeighborDiscovery: uint8
SupportsRouterDiscovery: uint8
ReachableTime: uint32
TransmitOffload: NL_INTERFACE_OFFLOAD_ROD
ReceiveOffload: NL_INTERFACE_OFFLOAD_ROD
DisableDefaultRoutes: uint8struct NET_LUID_LH
{
ulong Value;
_Info_e__Struct Info;
}
struct NL_INTERFACE_OFFLOAD_ROD
{
ubyte _bitfield;
}
struct MIB_IPINTERFACE_ROW
{
ushort Family;
NET_LUID_LH InterfaceLuid;
uint InterfaceIndex;
uint MaxReassemblySize;
ulong InterfaceIdentifier;
uint MinRouterAdvertisementInterval;
uint MaxRouterAdvertisementInterval;
ubyte AdvertisingEnabled;
ubyte ForwardingEnabled;
ubyte WeakHostSend;
ubyte WeakHostReceive;
ubyte UseAutomaticMetric;
ubyte UseNeighborUnreachabilityDetection;
ubyte ManagedAddressConfigurationSupported;
ubyte OtherStatefulConfigurationSupported;
ubyte AdvertiseDefaultRoute;
int RouterDiscoveryBehavior;
uint DadTransmits;
uint BaseReachableTime;
uint RetransmitTime;
uint PathMtuDiscoveryTimeout;
int LinkLocalAddressBehavior;
uint LinkLocalAddressTimeout;
uint[16] ZoneIndices;
uint SitePrefixLength;
uint Metric;
uint NlMtu;
ubyte Connected;
ubyte SupportsWakeUpPatterns;
ubyte SupportsNeighborDiscovery;
ubyte SupportsRouterDiscovery;
uint ReachableTime;
NL_INTERFACE_OFFLOAD_ROD TransmitOffload;
NL_INTERFACE_OFFLOAD_ROD ReceiveOffload;
ubyte DisableDefaultRoutes;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MIB_IPINTERFACE_ROW サイズ: 168 バイト(x64)
dim st, 42 ; 4byte整数×42(構造体サイズ 168 / 4 切り上げ)
; Family : ADDRESS_FAMILY (+0, 2byte) wpoke st,0,値 / 値 = wpeek(st,0)
; InterfaceLuid : NET_LUID_LH (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; InterfaceIndex : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; MaxReassemblySize : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; InterfaceIdentifier : ULONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; MinRouterAdvertisementInterval : DWORD (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; MaxRouterAdvertisementInterval : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; AdvertisingEnabled : BOOLEAN (+40, 1byte) poke st,40,値 / 値 = peek(st,40)
; ForwardingEnabled : BOOLEAN (+41, 1byte) poke st,41,値 / 値 = peek(st,41)
; WeakHostSend : BOOLEAN (+42, 1byte) poke st,42,値 / 値 = peek(st,42)
; WeakHostReceive : BOOLEAN (+43, 1byte) poke st,43,値 / 値 = peek(st,43)
; UseAutomaticMetric : BOOLEAN (+44, 1byte) poke st,44,値 / 値 = peek(st,44)
; UseNeighborUnreachabilityDetection : BOOLEAN (+45, 1byte) poke st,45,値 / 値 = peek(st,45)
; ManagedAddressConfigurationSupported : BOOLEAN (+46, 1byte) poke st,46,値 / 値 = peek(st,46)
; OtherStatefulConfigurationSupported : BOOLEAN (+47, 1byte) poke st,47,値 / 値 = peek(st,47)
; AdvertiseDefaultRoute : BOOLEAN (+48, 1byte) poke st,48,値 / 値 = peek(st,48)
; RouterDiscoveryBehavior : NL_ROUTER_DISCOVERY_BEHAVIOR (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; DadTransmits : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; BaseReachableTime : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; RetransmitTime : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; PathMtuDiscoveryTimeout : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; LinkLocalAddressBehavior : NL_LINK_LOCAL_ADDRESS_BEHAVIOR (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; LinkLocalAddressTimeout : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (lpoke/lpeek も可)
; ZoneIndices : DWORD (+80, 64byte) varptr(st)+80 を基点に操作(64byte:入れ子/配列)
; SitePrefixLength : DWORD (+144, 4byte) st.36 = 値 / 値 = st.36 (lpoke/lpeek も可)
; Metric : DWORD (+148, 4byte) st.37 = 値 / 値 = st.37 (lpoke/lpeek も可)
; NlMtu : DWORD (+152, 4byte) st.38 = 値 / 値 = st.38 (lpoke/lpeek も可)
; Connected : BOOLEAN (+156, 1byte) poke st,156,値 / 値 = peek(st,156)
; SupportsWakeUpPatterns : BOOLEAN (+157, 1byte) poke st,157,値 / 値 = peek(st,157)
; SupportsNeighborDiscovery : BOOLEAN (+158, 1byte) poke st,158,値 / 値 = peek(st,158)
; SupportsRouterDiscovery : BOOLEAN (+159, 1byte) poke st,159,値 / 値 = peek(st,159)
; ReachableTime : DWORD (+160, 4byte) st.40 = 値 / 値 = st.40 (lpoke/lpeek も可)
; TransmitOffload : NL_INTERFACE_OFFLOAD_ROD (+164, 1byte) varptr(st)+164 を基点に操作(1byte:入れ子/配列)
; ReceiveOffload : NL_INTERFACE_OFFLOAD_ROD (+165, 1byte) varptr(st)+165 を基点に操作(1byte:入れ子/配列)
; DisableDefaultRoutes : BOOLEAN (+166, 1byte) poke st,166,値 / 値 = peek(st,166)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global NL_INTERFACE_OFFLOAD_ROD
#field byte _bitfield
#endstruct
#defstruct global MIB_IPINTERFACE_ROW
#field short Family
#field byte InterfaceLuid 8
#field int InterfaceIndex
#field int MaxReassemblySize
#field int64 InterfaceIdentifier
#field int MinRouterAdvertisementInterval
#field int MaxRouterAdvertisementInterval
#field bool1 AdvertisingEnabled
#field bool1 ForwardingEnabled
#field bool1 WeakHostSend
#field bool1 WeakHostReceive
#field bool1 UseAutomaticMetric
#field bool1 UseNeighborUnreachabilityDetection
#field bool1 ManagedAddressConfigurationSupported
#field bool1 OtherStatefulConfigurationSupported
#field bool1 AdvertiseDefaultRoute
#field int RouterDiscoveryBehavior
#field int DadTransmits
#field int BaseReachableTime
#field int RetransmitTime
#field int PathMtuDiscoveryTimeout
#field int LinkLocalAddressBehavior
#field int LinkLocalAddressTimeout
#field int ZoneIndices 16
#field int SitePrefixLength
#field int Metric
#field int NlMtu
#field bool1 Connected
#field bool1 SupportsWakeUpPatterns
#field bool1 SupportsNeighborDiscovery
#field bool1 SupportsRouterDiscovery
#field int ReachableTime
#field NL_INTERFACE_OFFLOAD_ROD TransmitOffload
#field NL_INTERFACE_OFFLOAD_ROD ReceiveOffload
#field bool1 DisableDefaultRoutes
#endstruct
stdim st, MIB_IPINTERFACE_ROW ; NSTRUCT 変数を確保
st->Family = 100
mes "Family=" + st->Family
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。