ホーム › NetworkManagement.IpHelper › MIB_IPMCAST_IF_ENTRY
MIB_IPMCAST_IF_ENTRY
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| dwIfIndex | DWORD | 4 | +0 | +0 | このインターフェイスのインデックスです。 |
| dwTtl | DWORD | 4 | +4 | +4 | このインターフェイスの time-to-live (TTL) 値です。 |
| dwProtocol | DWORD | 4 | +8 | +8 | このインターフェイスを所有するマルチキャストルーティングプロトコルです。 |
| dwRateLimit | DWORD | 4 | +12 | +12 | このインターフェイスのレート制限です。 |
| ulInMcastOctets | DWORD | 4 | +16 | +16 | このインターフェイスを通じて受信したマルチキャストデータのオクテット数です。 |
| ulOutMcastOctets | DWORD | 4 | +20 | +20 | このインターフェイスを通じて送信したマルチキャストデータのオクテット数です。 |
公式ドキュメント
MIB_IPMCAST_IF_ENTRY 構造体は、IP マルチキャストインターフェイスに関する情報を格納します。
解説(Remarks)
Windows Vista 以降向けにリリースされた Microsoft Windows Software Development Kit (SDK) では、ヘッダーファイルの構成が変更されています。この構造体は Iprtrmib.h ヘッダーファイルではなく、Ipmib.h ヘッダーファイルで定義されています。なお、Ipmib.h ヘッダーファイルは Iprtrmib.h に自動的にインクルードされ、Iprtrmib.h は Iphlpapi.h ヘッダーファイルに自動的にインクルードされます。Ipmib.h および Iprtrmib.h ヘッダーファイルを直接使用しないでください。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// MIB_IPMCAST_IF_ENTRY (x64 24 / x86 24 バイト)
typedef struct MIB_IPMCAST_IF_ENTRY {
DWORD dwIfIndex;
DWORD dwTtl;
DWORD dwProtocol;
DWORD dwRateLimit;
DWORD ulInMcastOctets;
DWORD ulOutMcastOctets;
} MIB_IPMCAST_IF_ENTRY;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MIB_IPMCAST_IF_ENTRY
{
public uint dwIfIndex;
public uint dwTtl;
public uint dwProtocol;
public uint dwRateLimit;
public uint ulInMcastOctets;
public uint ulOutMcastOctets;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MIB_IPMCAST_IF_ENTRY
Public dwIfIndex As UInteger
Public dwTtl As UInteger
Public dwProtocol As UInteger
Public dwRateLimit As UInteger
Public ulInMcastOctets As UInteger
Public ulOutMcastOctets As UInteger
End Structureimport ctypes
from ctypes import wintypes
class MIB_IPMCAST_IF_ENTRY(ctypes.Structure):
_fields_ = [
("dwIfIndex", wintypes.DWORD),
("dwTtl", wintypes.DWORD),
("dwProtocol", wintypes.DWORD),
("dwRateLimit", wintypes.DWORD),
("ulInMcastOctets", wintypes.DWORD),
("ulOutMcastOctets", wintypes.DWORD),
]#[repr(C)]
pub struct MIB_IPMCAST_IF_ENTRY {
pub dwIfIndex: u32,
pub dwTtl: u32,
pub dwProtocol: u32,
pub dwRateLimit: u32,
pub ulInMcastOctets: u32,
pub ulOutMcastOctets: u32,
}import "golang.org/x/sys/windows"
type MIB_IPMCAST_IF_ENTRY struct {
dwIfIndex uint32
dwTtl uint32
dwProtocol uint32
dwRateLimit uint32
ulInMcastOctets uint32
ulOutMcastOctets uint32
}type
MIB_IPMCAST_IF_ENTRY = record
dwIfIndex: DWORD;
dwTtl: DWORD;
dwProtocol: DWORD;
dwRateLimit: DWORD;
ulInMcastOctets: DWORD;
ulOutMcastOctets: DWORD;
end;const MIB_IPMCAST_IF_ENTRY = extern struct {
dwIfIndex: u32,
dwTtl: u32,
dwProtocol: u32,
dwRateLimit: u32,
ulInMcastOctets: u32,
ulOutMcastOctets: u32,
};type
MIB_IPMCAST_IF_ENTRY {.bycopy.} = object
dwIfIndex: uint32
dwTtl: uint32
dwProtocol: uint32
dwRateLimit: uint32
ulInMcastOctets: uint32
ulOutMcastOctets: uint32struct MIB_IPMCAST_IF_ENTRY
{
uint dwIfIndex;
uint dwTtl;
uint dwProtocol;
uint dwRateLimit;
uint ulInMcastOctets;
uint ulOutMcastOctets;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MIB_IPMCAST_IF_ENTRY サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; dwIfIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwTtl : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; dwProtocol : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; dwRateLimit : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ulInMcastOctets : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; ulOutMcastOctets : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MIB_IPMCAST_IF_ENTRY
#field int dwIfIndex
#field int dwTtl
#field int dwProtocol
#field int dwRateLimit
#field int ulInMcastOctets
#field int ulOutMcastOctets
#endstruct
stdim st, MIB_IPMCAST_IF_ENTRY ; NSTRUCT 変数を確保
st->dwIfIndex = 100
mes "dwIfIndex=" + st->dwIfIndex