ホーム › NetworkManagement.IpHelper › MIB_IF_ROW2
MIB_IF_ROW2
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| InterfaceLuid | NET_LUID_LH | 8 | +0 | +0 | インタフェースのローカル一意識別子(NET_LUID_LH)である。 |
| InterfaceIndex | DWORD | 4 | +8 | +8 | インタフェースのインデックスである。 |
| InterfaceGuid | GUID | 16 | +12 | +12 | インタフェースのGUIDである。 |
| Alias | WCHAR | 514 | +28 | +28 | インタフェースのエイリアス(別名)を保持するワイド文字列バッファである。 |
| Description | WCHAR | 514 | +542 | +542 | インタフェースの説明文を保持するワイド文字列バッファである。 |
| PhysicalAddressLength | DWORD | 4 | +1056 | +1056 | PhysicalAddressの有効長(バイト数)である。 |
| PhysicalAddress | BYTE | 32 | +1060 | +1060 | インタフェースの物理(MAC)アドレスを保持するバイト配列である。 |
| PermanentPhysicalAddress | BYTE | 32 | +1092 | +1092 | インタフェースの永続的な物理アドレスを保持するバイト配列である。 |
| Mtu | DWORD | 4 | +1124 | +1124 | インタフェースの最大伝送単位(MTU)をバイト単位で示す。 |
| Type | DWORD | 4 | +1128 | +1128 | インタフェースの種別(IANA ifType値)を示す。 |
| TunnelType | TUNNEL_TYPE | 4 | +1132 | +1132 | トンネルの種別を示す列挙値である。 |
| MediaType | NDIS_MEDIUM | 4 | +1136 | +1136 | NDISメディア種別(NDIS_MEDIUM)を示す。 |
| PhysicalMediumType | NDIS_PHYSICAL_MEDIUM | 4 | +1140 | +1140 | 物理メディア種別(NDIS_PHYSICAL_MEDIUM)を示す。 |
| AccessType | NET_IF_ACCESS_TYPE | 4 | +1144 | +1144 | インタフェースのアクセス種別を示す列挙値である。 |
| DirectionType | NET_IF_DIRECTION_TYPE | 4 | +1148 | +1148 | インタフェースの方向種別(送受信/送信のみ等)を示す列挙値である。 |
| InterfaceAndOperStatusFlags | _InterfaceAndOperStatusFlags_e__Struct | 1 | +1152 | +1152 | インタフェースの各種状態フラグを保持するビットフィールド構造体である。 |
| OperStatus | IF_OPER_STATUS | 4 | +1156 | +1156 | インタフェースの運用状態(IF_OPER_STATUS)を示す。 |
| AdminStatus | NET_IF_ADMIN_STATUS | 4 | +1160 | +1160 | インタフェースの管理状態(NET_IF_ADMIN_STATUS)を示す。 |
| MediaConnectState | NET_IF_MEDIA_CONNECT_STATE | 4 | +1164 | +1164 | メディアの接続状態(接続/切断)を示す列挙値である。 |
| NetworkGuid | GUID | 16 | +1168 | +1168 | このインタフェースが接続するネットワークのGUIDである。 |
| ConnectionType | NET_IF_CONNECTION_TYPE | 4 | +1184 | +1184 | 接続種別(専用/要求時/パッシブ等)を示す列挙値である。 |
| TransmitLinkSpeed | ULONGLONG | 8 | +1192 | +1192 | 送信リンク速度をビット毎秒で示す。 |
| ReceiveLinkSpeed | ULONGLONG | 8 | +1200 | +1200 | 受信リンク速度をビット毎秒で示す。 |
| InOctets | ULONGLONG | 8 | +1208 | +1208 | 受信した総バイト数である。 |
| InUcastPkts | ULONGLONG | 8 | +1216 | +1216 | 受信したユニキャストパケット数である。 |
| InNUcastPkts | ULONGLONG | 8 | +1224 | +1224 | 受信した非ユニキャスト(ブロードキャスト/マルチキャスト)パケット数である。 |
| InDiscards | ULONGLONG | 8 | +1232 | +1232 | 受信側で破棄されたパケット数(誤りなし)である。 |
| InErrors | ULONGLONG | 8 | +1240 | +1240 | 誤りにより破棄された受信パケット数である。 |
| InUnknownProtos | ULONGLONG | 8 | +1248 | +1248 | 不明なプロトコルのため破棄された受信パケット数である。 |
| InUcastOctets | ULONGLONG | 8 | +1256 | +1256 | 受信したユニキャストバイト数である。 |
| InMulticastOctets | ULONGLONG | 8 | +1264 | +1264 | 受信したマルチキャストバイト数である。 |
| InBroadcastOctets | ULONGLONG | 8 | +1272 | +1272 | 受信したブロードキャストバイト数である。 |
| OutOctets | ULONGLONG | 8 | +1280 | +1280 | 送信した総バイト数である。 |
| OutUcastPkts | ULONGLONG | 8 | +1288 | +1288 | 送信したユニキャストパケット数である。 |
| OutNUcastPkts | ULONGLONG | 8 | +1296 | +1296 | 送信した非ユニキャストパケット数である。 |
| OutDiscards | ULONGLONG | 8 | +1304 | +1304 | 送信側で破棄されたパケット数(誤りなし)である。 |
| OutErrors | ULONGLONG | 8 | +1312 | +1312 | 誤りにより破棄された送信パケット数である。 |
| OutUcastOctets | ULONGLONG | 8 | +1320 | +1320 | 送信したユニキャストバイト数である。 |
| OutMulticastOctets | ULONGLONG | 8 | +1328 | +1328 | 送信したマルチキャストバイト数である。 |
| OutBroadcastOctets | ULONGLONG | 8 | +1336 | +1336 | 送信したブロードキャストバイト数である。 |
| OutQLen | ULONGLONG | 8 | +1344 | +1344 | 送信パケットキューの長さである。 |
構造体: _InterfaceAndOperStatusFlags_e__Struct x64 1B / x86 1B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| _bitfield | BYTE | 1 | +0 | +0 |
各言語での定義
#include <windows.h>
// NET_LUID_LH (x64 8 / x86 8 バイト)
typedef struct NET_LUID_LH {
ULONGLONG Value;
_Info_e__Struct Info;
} NET_LUID_LH;
// MIB_IF_ROW2 (x64 1352 / x86 1352 バイト)
typedef struct MIB_IF_ROW2 {
NET_LUID_LH InterfaceLuid;
DWORD InterfaceIndex;
GUID InterfaceGuid;
WCHAR Alias[257];
WCHAR Description[257];
DWORD PhysicalAddressLength;
BYTE PhysicalAddress[32];
BYTE PermanentPhysicalAddress[32];
DWORD Mtu;
DWORD Type;
TUNNEL_TYPE TunnelType;
NDIS_MEDIUM MediaType;
NDIS_PHYSICAL_MEDIUM PhysicalMediumType;
NET_IF_ACCESS_TYPE AccessType;
NET_IF_DIRECTION_TYPE DirectionType;
_InterfaceAndOperStatusFlags_e__Struct InterfaceAndOperStatusFlags;
IF_OPER_STATUS OperStatus;
NET_IF_ADMIN_STATUS AdminStatus;
NET_IF_MEDIA_CONNECT_STATE MediaConnectState;
GUID NetworkGuid;
NET_IF_CONNECTION_TYPE ConnectionType;
ULONGLONG TransmitLinkSpeed;
ULONGLONG ReceiveLinkSpeed;
ULONGLONG InOctets;
ULONGLONG InUcastPkts;
ULONGLONG InNUcastPkts;
ULONGLONG InDiscards;
ULONGLONG InErrors;
ULONGLONG InUnknownProtos;
ULONGLONG InUcastOctets;
ULONGLONG InMulticastOctets;
ULONGLONG InBroadcastOctets;
ULONGLONG OutOctets;
ULONGLONG OutUcastPkts;
ULONGLONG OutNUcastPkts;
ULONGLONG OutDiscards;
ULONGLONG OutErrors;
ULONGLONG OutUcastOctets;
ULONGLONG OutMulticastOctets;
ULONGLONG OutBroadcastOctets;
ULONGLONG OutQLen;
} MIB_IF_ROW2;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 MIB_IF_ROW2
{
public NET_LUID_LH InterfaceLuid;
public uint InterfaceIndex;
public Guid InterfaceGuid;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 257)] public string Alias;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 257)] public string Description;
public uint PhysicalAddressLength;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public byte[] PhysicalAddress;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public byte[] PermanentPhysicalAddress;
public uint Mtu;
public uint Type;
public int TunnelType;
public int MediaType;
public int PhysicalMediumType;
public int AccessType;
public int DirectionType;
public _InterfaceAndOperStatusFlags_e__Struct InterfaceAndOperStatusFlags;
public int OperStatus;
public int AdminStatus;
public int MediaConnectState;
public Guid NetworkGuid;
public int ConnectionType;
public ulong TransmitLinkSpeed;
public ulong ReceiveLinkSpeed;
public ulong InOctets;
public ulong InUcastPkts;
public ulong InNUcastPkts;
public ulong InDiscards;
public ulong InErrors;
public ulong InUnknownProtos;
public ulong InUcastOctets;
public ulong InMulticastOctets;
public ulong InBroadcastOctets;
public ulong OutOctets;
public ulong OutUcastPkts;
public ulong OutNUcastPkts;
public ulong OutDiscards;
public ulong OutErrors;
public ulong OutUcastOctets;
public ulong OutMulticastOctets;
public ulong OutBroadcastOctets;
public ulong OutQLen;
}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 MIB_IF_ROW2
Public InterfaceLuid As NET_LUID_LH
Public InterfaceIndex As UInteger
Public InterfaceGuid As Guid
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=257)> Public Alias As String
<MarshalAs(UnmanagedType.ByValTStr, SizeConst:=257)> Public Description As String
Public PhysicalAddressLength As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> Public PhysicalAddress() As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> Public PermanentPhysicalAddress() As Byte
Public Mtu As UInteger
Public Type As UInteger
Public TunnelType As Integer
Public MediaType As Integer
Public PhysicalMediumType As Integer
Public AccessType As Integer
Public DirectionType As Integer
Public InterfaceAndOperStatusFlags As _InterfaceAndOperStatusFlags_e__Struct
Public OperStatus As Integer
Public AdminStatus As Integer
Public MediaConnectState As Integer
Public NetworkGuid As Guid
Public ConnectionType As Integer
Public TransmitLinkSpeed As ULong
Public ReceiveLinkSpeed As ULong
Public InOctets As ULong
Public InUcastPkts As ULong
Public InNUcastPkts As ULong
Public InDiscards As ULong
Public InErrors As ULong
Public InUnknownProtos As ULong
Public InUcastOctets As ULong
Public InMulticastOctets As ULong
Public InBroadcastOctets As ULong
Public OutOctets As ULong
Public OutUcastPkts As ULong
Public OutNUcastPkts As ULong
Public OutDiscards As ULong
Public OutErrors As ULong
Public OutUcastOctets As ULong
Public OutMulticastOctets As ULong
Public OutBroadcastOctets As ULong
Public OutQLen As ULong
End Structureimport ctypes
from ctypes import wintypes
class NET_LUID_LH(ctypes.Structure):
_fields_ = [
("Value", ctypes.c_ulonglong),
("Info", _Info_e__Struct),
]
class MIB_IF_ROW2(ctypes.Structure):
_fields_ = [
("InterfaceLuid", NET_LUID_LH),
("InterfaceIndex", wintypes.DWORD),
("InterfaceGuid", GUID),
("Alias", ctypes.c_wchar * 257),
("Description", ctypes.c_wchar * 257),
("PhysicalAddressLength", wintypes.DWORD),
("PhysicalAddress", ctypes.c_ubyte * 32),
("PermanentPhysicalAddress", ctypes.c_ubyte * 32),
("Mtu", wintypes.DWORD),
("Type", wintypes.DWORD),
("TunnelType", ctypes.c_int),
("MediaType", ctypes.c_int),
("PhysicalMediumType", ctypes.c_int),
("AccessType", ctypes.c_int),
("DirectionType", ctypes.c_int),
("InterfaceAndOperStatusFlags", _InterfaceAndOperStatusFlags_e__Struct),
("OperStatus", ctypes.c_int),
("AdminStatus", ctypes.c_int),
("MediaConnectState", ctypes.c_int),
("NetworkGuid", GUID),
("ConnectionType", ctypes.c_int),
("TransmitLinkSpeed", ctypes.c_ulonglong),
("ReceiveLinkSpeed", ctypes.c_ulonglong),
("InOctets", ctypes.c_ulonglong),
("InUcastPkts", ctypes.c_ulonglong),
("InNUcastPkts", ctypes.c_ulonglong),
("InDiscards", ctypes.c_ulonglong),
("InErrors", ctypes.c_ulonglong),
("InUnknownProtos", ctypes.c_ulonglong),
("InUcastOctets", ctypes.c_ulonglong),
("InMulticastOctets", ctypes.c_ulonglong),
("InBroadcastOctets", ctypes.c_ulonglong),
("OutOctets", ctypes.c_ulonglong),
("OutUcastPkts", ctypes.c_ulonglong),
("OutNUcastPkts", ctypes.c_ulonglong),
("OutDiscards", ctypes.c_ulonglong),
("OutErrors", ctypes.c_ulonglong),
("OutUcastOctets", ctypes.c_ulonglong),
("OutMulticastOctets", ctypes.c_ulonglong),
("OutBroadcastOctets", ctypes.c_ulonglong),
("OutQLen", ctypes.c_ulonglong),
]#[repr(C)]
pub struct NET_LUID_LH {
pub Value: u64,
pub Info: _Info_e__Struct,
}
#[repr(C)]
pub struct MIB_IF_ROW2 {
pub InterfaceLuid: NET_LUID_LH,
pub InterfaceIndex: u32,
pub InterfaceGuid: GUID,
pub Alias: [u16; 257],
pub Description: [u16; 257],
pub PhysicalAddressLength: u32,
pub PhysicalAddress: [u8; 32],
pub PermanentPhysicalAddress: [u8; 32],
pub Mtu: u32,
pub Type: u32,
pub TunnelType: i32,
pub MediaType: i32,
pub PhysicalMediumType: i32,
pub AccessType: i32,
pub DirectionType: i32,
pub InterfaceAndOperStatusFlags: _InterfaceAndOperStatusFlags_e__Struct,
pub OperStatus: i32,
pub AdminStatus: i32,
pub MediaConnectState: i32,
pub NetworkGuid: GUID,
pub ConnectionType: i32,
pub TransmitLinkSpeed: u64,
pub ReceiveLinkSpeed: u64,
pub InOctets: u64,
pub InUcastPkts: u64,
pub InNUcastPkts: u64,
pub InDiscards: u64,
pub InErrors: u64,
pub InUnknownProtos: u64,
pub InUcastOctets: u64,
pub InMulticastOctets: u64,
pub InBroadcastOctets: u64,
pub OutOctets: u64,
pub OutUcastPkts: u64,
pub OutNUcastPkts: u64,
pub OutDiscards: u64,
pub OutErrors: u64,
pub OutUcastOctets: u64,
pub OutMulticastOctets: u64,
pub OutBroadcastOctets: u64,
pub OutQLen: u64,
}import "golang.org/x/sys/windows"
type NET_LUID_LH struct {
Value uint64
Info _Info_e__Struct
}
type MIB_IF_ROW2 struct {
InterfaceLuid NET_LUID_LH
InterfaceIndex uint32
InterfaceGuid windows.GUID
Alias [257]uint16
Description [257]uint16
PhysicalAddressLength uint32
PhysicalAddress [32]byte
PermanentPhysicalAddress [32]byte
Mtu uint32
Type uint32
TunnelType int32
MediaType int32
PhysicalMediumType int32
AccessType int32
DirectionType int32
InterfaceAndOperStatusFlags _InterfaceAndOperStatusFlags_e__Struct
OperStatus int32
AdminStatus int32
MediaConnectState int32
NetworkGuid windows.GUID
ConnectionType int32
TransmitLinkSpeed uint64
ReceiveLinkSpeed uint64
InOctets uint64
InUcastPkts uint64
InNUcastPkts uint64
InDiscards uint64
InErrors uint64
InUnknownProtos uint64
InUcastOctets uint64
InMulticastOctets uint64
InBroadcastOctets uint64
OutOctets uint64
OutUcastPkts uint64
OutNUcastPkts uint64
OutDiscards uint64
OutErrors uint64
OutUcastOctets uint64
OutMulticastOctets uint64
OutBroadcastOctets uint64
OutQLen uint64
}type
NET_LUID_LH = record
Value: UInt64;
Info: _Info_e__Struct;
end;
MIB_IF_ROW2 = record
InterfaceLuid: NET_LUID_LH;
InterfaceIndex: DWORD;
InterfaceGuid: TGUID;
Alias: array[0..256] of WideChar;
Description: array[0..256] of WideChar;
PhysicalAddressLength: DWORD;
PhysicalAddress: array[0..31] of Byte;
PermanentPhysicalAddress: array[0..31] of Byte;
Mtu: DWORD;
Type: DWORD;
TunnelType: Integer;
MediaType: Integer;
PhysicalMediumType: Integer;
AccessType: Integer;
DirectionType: Integer;
InterfaceAndOperStatusFlags: _InterfaceAndOperStatusFlags_e__Struct;
OperStatus: Integer;
AdminStatus: Integer;
MediaConnectState: Integer;
NetworkGuid: TGUID;
ConnectionType: Integer;
TransmitLinkSpeed: UInt64;
ReceiveLinkSpeed: UInt64;
InOctets: UInt64;
InUcastPkts: UInt64;
InNUcastPkts: UInt64;
InDiscards: UInt64;
InErrors: UInt64;
InUnknownProtos: UInt64;
InUcastOctets: UInt64;
InMulticastOctets: UInt64;
InBroadcastOctets: UInt64;
OutOctets: UInt64;
OutUcastPkts: UInt64;
OutNUcastPkts: UInt64;
OutDiscards: UInt64;
OutErrors: UInt64;
OutUcastOctets: UInt64;
OutMulticastOctets: UInt64;
OutBroadcastOctets: UInt64;
OutQLen: UInt64;
end;const NET_LUID_LH = extern struct {
Value: u64,
Info: _Info_e__Struct,
};
const MIB_IF_ROW2 = extern struct {
InterfaceLuid: NET_LUID_LH,
InterfaceIndex: u32,
InterfaceGuid: GUID,
Alias: [257]u16,
Description: [257]u16,
PhysicalAddressLength: u32,
PhysicalAddress: [32]u8,
PermanentPhysicalAddress: [32]u8,
Mtu: u32,
Type: u32,
TunnelType: i32,
MediaType: i32,
PhysicalMediumType: i32,
AccessType: i32,
DirectionType: i32,
InterfaceAndOperStatusFlags: _InterfaceAndOperStatusFlags_e__Struct,
OperStatus: i32,
AdminStatus: i32,
MediaConnectState: i32,
NetworkGuid: GUID,
ConnectionType: i32,
TransmitLinkSpeed: u64,
ReceiveLinkSpeed: u64,
InOctets: u64,
InUcastPkts: u64,
InNUcastPkts: u64,
InDiscards: u64,
InErrors: u64,
InUnknownProtos: u64,
InUcastOctets: u64,
InMulticastOctets: u64,
InBroadcastOctets: u64,
OutOctets: u64,
OutUcastPkts: u64,
OutNUcastPkts: u64,
OutDiscards: u64,
OutErrors: u64,
OutUcastOctets: u64,
OutMulticastOctets: u64,
OutBroadcastOctets: u64,
OutQLen: u64,
};type
NET_LUID_LH {.bycopy.} = object
Value: uint64
Info: _Info_e__Struct
MIB_IF_ROW2 {.bycopy.} = object
InterfaceLuid: NET_LUID_LH
InterfaceIndex: uint32
InterfaceGuid: GUID
Alias: array[257, uint16]
Description: array[257, uint16]
PhysicalAddressLength: uint32
PhysicalAddress: array[32, uint8]
PermanentPhysicalAddress: array[32, uint8]
Mtu: uint32
Type: uint32
TunnelType: int32
MediaType: int32
PhysicalMediumType: int32
AccessType: int32
DirectionType: int32
InterfaceAndOperStatusFlags: _InterfaceAndOperStatusFlags_e__Struct
OperStatus: int32
AdminStatus: int32
MediaConnectState: int32
NetworkGuid: GUID
ConnectionType: int32
TransmitLinkSpeed: uint64
ReceiveLinkSpeed: uint64
InOctets: uint64
InUcastPkts: uint64
InNUcastPkts: uint64
InDiscards: uint64
InErrors: uint64
InUnknownProtos: uint64
InUcastOctets: uint64
InMulticastOctets: uint64
InBroadcastOctets: uint64
OutOctets: uint64
OutUcastPkts: uint64
OutNUcastPkts: uint64
OutDiscards: uint64
OutErrors: uint64
OutUcastOctets: uint64
OutMulticastOctets: uint64
OutBroadcastOctets: uint64
OutQLen: uint64struct NET_LUID_LH
{
ulong Value;
_Info_e__Struct Info;
}
struct MIB_IF_ROW2
{
NET_LUID_LH InterfaceLuid;
uint InterfaceIndex;
GUID InterfaceGuid;
wchar[257] Alias;
wchar[257] Description;
uint PhysicalAddressLength;
ubyte[32] PhysicalAddress;
ubyte[32] PermanentPhysicalAddress;
uint Mtu;
uint Type;
int TunnelType;
int MediaType;
int PhysicalMediumType;
int AccessType;
int DirectionType;
_InterfaceAndOperStatusFlags_e__Struct InterfaceAndOperStatusFlags;
int OperStatus;
int AdminStatus;
int MediaConnectState;
GUID NetworkGuid;
int ConnectionType;
ulong TransmitLinkSpeed;
ulong ReceiveLinkSpeed;
ulong InOctets;
ulong InUcastPkts;
ulong InNUcastPkts;
ulong InDiscards;
ulong InErrors;
ulong InUnknownProtos;
ulong InUcastOctets;
ulong InMulticastOctets;
ulong InBroadcastOctets;
ulong OutOctets;
ulong OutUcastPkts;
ulong OutNUcastPkts;
ulong OutDiscards;
ulong OutErrors;
ulong OutUcastOctets;
ulong OutMulticastOctets;
ulong OutBroadcastOctets;
ulong OutQLen;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MIB_IF_ROW2 サイズ: 1352 バイト(x64)
dim st, 338 ; 4byte整数×338(構造体サイズ 1352 / 4 切り上げ)
; InterfaceLuid : NET_LUID_LH (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; InterfaceIndex : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; InterfaceGuid : GUID (+12, 16byte) varptr(st)+12 を基点に操作(16byte:入れ子/配列)
; Alias : WCHAR (+28, 514byte) varptr(st)+28 を基点に操作(514byte:入れ子/配列)
; Description : WCHAR (+542, 514byte) varptr(st)+542 を基点に操作(514byte:入れ子/配列)
; PhysicalAddressLength : DWORD (+1056, 4byte) st.264 = 値 / 値 = st.264 (lpoke/lpeek も可)
; PhysicalAddress : BYTE (+1060, 32byte) varptr(st)+1060 を基点に操作(32byte:入れ子/配列)
; PermanentPhysicalAddress : BYTE (+1092, 32byte) varptr(st)+1092 を基点に操作(32byte:入れ子/配列)
; Mtu : DWORD (+1124, 4byte) st.281 = 値 / 値 = st.281 (lpoke/lpeek も可)
; Type : DWORD (+1128, 4byte) st.282 = 値 / 値 = st.282 (lpoke/lpeek も可)
; TunnelType : TUNNEL_TYPE (+1132, 4byte) st.283 = 値 / 値 = st.283 (lpoke/lpeek も可)
; MediaType : NDIS_MEDIUM (+1136, 4byte) st.284 = 値 / 値 = st.284 (lpoke/lpeek も可)
; PhysicalMediumType : NDIS_PHYSICAL_MEDIUM (+1140, 4byte) st.285 = 値 / 値 = st.285 (lpoke/lpeek も可)
; AccessType : NET_IF_ACCESS_TYPE (+1144, 4byte) st.286 = 値 / 値 = st.286 (lpoke/lpeek も可)
; DirectionType : NET_IF_DIRECTION_TYPE (+1148, 4byte) st.287 = 値 / 値 = st.287 (lpoke/lpeek も可)
; InterfaceAndOperStatusFlags : _InterfaceAndOperStatusFlags_e__Struct (+1152, 1byte) varptr(st)+1152 を基点に操作(1byte:入れ子/配列)
; OperStatus : IF_OPER_STATUS (+1156, 4byte) st.289 = 値 / 値 = st.289 (lpoke/lpeek も可)
; AdminStatus : NET_IF_ADMIN_STATUS (+1160, 4byte) st.290 = 値 / 値 = st.290 (lpoke/lpeek も可)
; MediaConnectState : NET_IF_MEDIA_CONNECT_STATE (+1164, 4byte) st.291 = 値 / 値 = st.291 (lpoke/lpeek も可)
; NetworkGuid : GUID (+1168, 16byte) varptr(st)+1168 を基点に操作(16byte:入れ子/配列)
; ConnectionType : NET_IF_CONNECTION_TYPE (+1184, 4byte) st.296 = 値 / 値 = st.296 (lpoke/lpeek も可)
; TransmitLinkSpeed : ULONGLONG (+1192, 8byte) qpoke st,1192,値 / qpeek(st,1192) ※IronHSPのみ。3.7/3.8は lpoke st,1192,下位 : lpoke st,1196,上位
; ReceiveLinkSpeed : ULONGLONG (+1200, 8byte) qpoke st,1200,値 / qpeek(st,1200) ※IronHSPのみ。3.7/3.8は lpoke st,1200,下位 : lpoke st,1204,上位
; InOctets : ULONGLONG (+1208, 8byte) qpoke st,1208,値 / qpeek(st,1208) ※IronHSPのみ。3.7/3.8は lpoke st,1208,下位 : lpoke st,1212,上位
; InUcastPkts : ULONGLONG (+1216, 8byte) qpoke st,1216,値 / qpeek(st,1216) ※IronHSPのみ。3.7/3.8は lpoke st,1216,下位 : lpoke st,1220,上位
; InNUcastPkts : ULONGLONG (+1224, 8byte) qpoke st,1224,値 / qpeek(st,1224) ※IronHSPのみ。3.7/3.8は lpoke st,1224,下位 : lpoke st,1228,上位
; InDiscards : ULONGLONG (+1232, 8byte) qpoke st,1232,値 / qpeek(st,1232) ※IronHSPのみ。3.7/3.8は lpoke st,1232,下位 : lpoke st,1236,上位
; InErrors : ULONGLONG (+1240, 8byte) qpoke st,1240,値 / qpeek(st,1240) ※IronHSPのみ。3.7/3.8は lpoke st,1240,下位 : lpoke st,1244,上位
; InUnknownProtos : ULONGLONG (+1248, 8byte) qpoke st,1248,値 / qpeek(st,1248) ※IronHSPのみ。3.7/3.8は lpoke st,1248,下位 : lpoke st,1252,上位
; InUcastOctets : ULONGLONG (+1256, 8byte) qpoke st,1256,値 / qpeek(st,1256) ※IronHSPのみ。3.7/3.8は lpoke st,1256,下位 : lpoke st,1260,上位
; InMulticastOctets : ULONGLONG (+1264, 8byte) qpoke st,1264,値 / qpeek(st,1264) ※IronHSPのみ。3.7/3.8は lpoke st,1264,下位 : lpoke st,1268,上位
; InBroadcastOctets : ULONGLONG (+1272, 8byte) qpoke st,1272,値 / qpeek(st,1272) ※IronHSPのみ。3.7/3.8は lpoke st,1272,下位 : lpoke st,1276,上位
; OutOctets : ULONGLONG (+1280, 8byte) qpoke st,1280,値 / qpeek(st,1280) ※IronHSPのみ。3.7/3.8は lpoke st,1280,下位 : lpoke st,1284,上位
; OutUcastPkts : ULONGLONG (+1288, 8byte) qpoke st,1288,値 / qpeek(st,1288) ※IronHSPのみ。3.7/3.8は lpoke st,1288,下位 : lpoke st,1292,上位
; OutNUcastPkts : ULONGLONG (+1296, 8byte) qpoke st,1296,値 / qpeek(st,1296) ※IronHSPのみ。3.7/3.8は lpoke st,1296,下位 : lpoke st,1300,上位
; OutDiscards : ULONGLONG (+1304, 8byte) qpoke st,1304,値 / qpeek(st,1304) ※IronHSPのみ。3.7/3.8は lpoke st,1304,下位 : lpoke st,1308,上位
; OutErrors : ULONGLONG (+1312, 8byte) qpoke st,1312,値 / qpeek(st,1312) ※IronHSPのみ。3.7/3.8は lpoke st,1312,下位 : lpoke st,1316,上位
; OutUcastOctets : ULONGLONG (+1320, 8byte) qpoke st,1320,値 / qpeek(st,1320) ※IronHSPのみ。3.7/3.8は lpoke st,1320,下位 : lpoke st,1324,上位
; OutMulticastOctets : ULONGLONG (+1328, 8byte) qpoke st,1328,値 / qpeek(st,1328) ※IronHSPのみ。3.7/3.8は lpoke st,1328,下位 : lpoke st,1332,上位
; OutBroadcastOctets : ULONGLONG (+1336, 8byte) qpoke st,1336,値 / qpeek(st,1336) ※IronHSPのみ。3.7/3.8は lpoke st,1336,下位 : lpoke st,1340,上位
; OutQLen : ULONGLONG (+1344, 8byte) qpoke st,1344,値 / qpeek(st,1344) ※IronHSPのみ。3.7/3.8は lpoke st,1344,下位 : lpoke st,1348,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global MIB_IF_ROW2
#field byte InterfaceLuid 8
#field int InterfaceIndex
#field GUID InterfaceGuid
#field wchar Alias 257
#field wchar Description 257
#field int PhysicalAddressLength
#field byte PhysicalAddress 32
#field byte PermanentPhysicalAddress 32
#field int Mtu
#field int Type
#field int TunnelType
#field int MediaType
#field int PhysicalMediumType
#field int AccessType
#field int DirectionType
#field _InterfaceAndOperStatusFlags_e__Struct InterfaceAndOperStatusFlags
#field int OperStatus
#field int AdminStatus
#field int MediaConnectState
#field GUID NetworkGuid
#field int ConnectionType
#field int64 TransmitLinkSpeed
#field int64 ReceiveLinkSpeed
#field int64 InOctets
#field int64 InUcastPkts
#field int64 InNUcastPkts
#field int64 InDiscards
#field int64 InErrors
#field int64 InUnknownProtos
#field int64 InUcastOctets
#field int64 InMulticastOctets
#field int64 InBroadcastOctets
#field int64 OutOctets
#field int64 OutUcastPkts
#field int64 OutNUcastPkts
#field int64 OutDiscards
#field int64 OutErrors
#field int64 OutUcastOctets
#field int64 OutMulticastOctets
#field int64 OutBroadcastOctets
#field int64 OutQLen
#endstruct
stdim st, MIB_IF_ROW2 ; NSTRUCT 変数を確保
st->InterfaceIndex = 100
mes "InterfaceIndex=" + st->InterfaceIndex
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。