Win32 API 日本語リファレンス
ホームNetworkManagement.IpHelper › MIB_IPINTERFACE_TABLE

MIB_IPINTERFACE_TABLE

構造体
サイズx64: 176 バイト / x86: 176 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
NumEntriesDWORD4+0+0Table配列に格納されたIPインタフェースエントリの数を示す。
TableMIB_IPINTERFACE_ROW168+8+8IPインタフェース行(MIB_IPINTERFACE_ROW)の可変長配列である。

各言語での定義

#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;

// MIB_IPINTERFACE_TABLE  (x64 176 / x86 176 バイト)
typedef struct MIB_IPINTERFACE_TABLE {
    DWORD NumEntries;
    MIB_IPINTERFACE_ROW Table[1];
} MIB_IPINTERFACE_TABLE;
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;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MIB_IPINTERFACE_TABLE
{
    public uint NumEntries;
    [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public MIB_IPINTERFACE_ROW[] Table;
}
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 Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MIB_IPINTERFACE_TABLE
    Public NumEntries As UInteger
    <MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public Table() As MIB_IPINTERFACE_ROW
End Structure
import 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),
    ]

class MIB_IPINTERFACE_TABLE(ctypes.Structure):
    _fields_ = [
        ("NumEntries", wintypes.DWORD),
        ("Table", MIB_IPINTERFACE_ROW * 1),
    ]
#[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,
}

#[repr(C)]
pub struct MIB_IPINTERFACE_TABLE {
    pub NumEntries: u32,
    pub Table: [MIB_IPINTERFACE_ROW; 1],
}
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 MIB_IPINTERFACE_TABLE struct {
	NumEntries uint32
	Table [1]MIB_IPINTERFACE_ROW
}
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;

  MIB_IPINTERFACE_TABLE = record
    NumEntries: DWORD;
    Table: array[0..0] of MIB_IPINTERFACE_ROW;
  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,
};

const MIB_IPINTERFACE_TABLE = extern struct {
    NumEntries: u32,
    Table: [1]MIB_IPINTERFACE_ROW,
};
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: uint8

  MIB_IPINTERFACE_TABLE {.bycopy.} = object
    NumEntries: uint32
    Table: array[1, MIB_IPINTERFACE_ROW]
struct 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;
}

struct MIB_IPINTERFACE_TABLE
{
    uint NumEntries;
    MIB_IPINTERFACE_ROW[1] Table;
}

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_TABLE サイズ: 176 バイト(x64)
dim st, 44    ; 4byte整数×44(構造体サイズ 176 / 4 切り上げ)
; NumEntries : DWORD (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; Table : MIB_IPINTERFACE_ROW (+8, 168byte)  varptr(st)+8 を基点に操作(168byte:入れ子/配列)
; ※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

#defstruct global MIB_IPINTERFACE_TABLE
    #field int NumEntries
    #field MIB_IPINTERFACE_ROW Table 1
#endstruct

stdim st, MIB_IPINTERFACE_TABLE        ; NSTRUCT 変数を確保
st->NumEntries = 100
mes "NumEntries=" + st->NumEntries