ホーム › NetworkManagement.WindowsFilteringPlatform › IPSEC_DOSP_STATE0
IPSEC_DOSP_STATE0
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| publicHostV6Addr | BYTE | 16 | +0 | +0 | 公衆側ホストのIPv6アドレス(16バイト)。 |
| internalHostV6Addr | BYTE | 16 | +16 | +16 | 内部側ホストのIPv6アドレス(16バイト)。 |
| totalInboundIPv6IPsecAuthPackets | ULONGLONG | 8 | +32 | +32 | この状態で受信した認証済みIPv6 IPsecパケットの累計。 |
| totalOutboundIPv6IPsecAuthPackets | ULONGLONG | 8 | +40 | +40 | この状態で送信した認証済みIPv6 IPsecパケットの累計。 |
| durationSecs | DWORD | 4 | +48 | +48 | この状態エントリが存在している継続時間(秒)。 |
各言語での定義
#include <windows.h>
// IPSEC_DOSP_STATE0 (x64 56 / x86 56 バイト)
typedef struct IPSEC_DOSP_STATE0 {
BYTE publicHostV6Addr[16];
BYTE internalHostV6Addr[16];
ULONGLONG totalInboundIPv6IPsecAuthPackets;
ULONGLONG totalOutboundIPv6IPsecAuthPackets;
DWORD durationSecs;
} IPSEC_DOSP_STATE0;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct IPSEC_DOSP_STATE0
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] publicHostV6Addr;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] public byte[] internalHostV6Addr;
public ulong totalInboundIPv6IPsecAuthPackets;
public ulong totalOutboundIPv6IPsecAuthPackets;
public uint durationSecs;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure IPSEC_DOSP_STATE0
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=16)> Public publicHostV6Addr() As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=16)> Public internalHostV6Addr() As Byte
Public totalInboundIPv6IPsecAuthPackets As ULong
Public totalOutboundIPv6IPsecAuthPackets As ULong
Public durationSecs As UInteger
End Structureimport ctypes
from ctypes import wintypes
class IPSEC_DOSP_STATE0(ctypes.Structure):
_fields_ = [
("publicHostV6Addr", ctypes.c_ubyte * 16),
("internalHostV6Addr", ctypes.c_ubyte * 16),
("totalInboundIPv6IPsecAuthPackets", ctypes.c_ulonglong),
("totalOutboundIPv6IPsecAuthPackets", ctypes.c_ulonglong),
("durationSecs", wintypes.DWORD),
]#[repr(C)]
pub struct IPSEC_DOSP_STATE0 {
pub publicHostV6Addr: [u8; 16],
pub internalHostV6Addr: [u8; 16],
pub totalInboundIPv6IPsecAuthPackets: u64,
pub totalOutboundIPv6IPsecAuthPackets: u64,
pub durationSecs: u32,
}import "golang.org/x/sys/windows"
type IPSEC_DOSP_STATE0 struct {
publicHostV6Addr [16]byte
internalHostV6Addr [16]byte
totalInboundIPv6IPsecAuthPackets uint64
totalOutboundIPv6IPsecAuthPackets uint64
durationSecs uint32
}type
IPSEC_DOSP_STATE0 = record
publicHostV6Addr: array[0..15] of Byte;
internalHostV6Addr: array[0..15] of Byte;
totalInboundIPv6IPsecAuthPackets: UInt64;
totalOutboundIPv6IPsecAuthPackets: UInt64;
durationSecs: DWORD;
end;const IPSEC_DOSP_STATE0 = extern struct {
publicHostV6Addr: [16]u8,
internalHostV6Addr: [16]u8,
totalInboundIPv6IPsecAuthPackets: u64,
totalOutboundIPv6IPsecAuthPackets: u64,
durationSecs: u32,
};type
IPSEC_DOSP_STATE0 {.bycopy.} = object
publicHostV6Addr: array[16, uint8]
internalHostV6Addr: array[16, uint8]
totalInboundIPv6IPsecAuthPackets: uint64
totalOutboundIPv6IPsecAuthPackets: uint64
durationSecs: uint32struct IPSEC_DOSP_STATE0
{
ubyte[16] publicHostV6Addr;
ubyte[16] internalHostV6Addr;
ulong totalInboundIPv6IPsecAuthPackets;
ulong totalOutboundIPv6IPsecAuthPackets;
uint durationSecs;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; IPSEC_DOSP_STATE0 サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; publicHostV6Addr : BYTE (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; internalHostV6Addr : BYTE (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; totalInboundIPv6IPsecAuthPackets : ULONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; totalOutboundIPv6IPsecAuthPackets : ULONGLONG (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; durationSecs : DWORD (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global IPSEC_DOSP_STATE0
#field byte publicHostV6Addr 16
#field byte internalHostV6Addr 16
#field int64 totalInboundIPv6IPsecAuthPackets
#field int64 totalOutboundIPv6IPsecAuthPackets
#field int durationSecs
#endstruct
stdim st, IPSEC_DOSP_STATE0 ; NSTRUCT 変数を確保
st->totalInboundIPv6IPsecAuthPackets = 100
mes "totalInboundIPv6IPsecAuthPackets=" + st->totalInboundIPv6IPsecAuthPackets