ホーム › NetworkManagement.Dhcp › DHCPV6PrefixLeaseInformation
DHCPV6PrefixLeaseInformation
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| nPrefixes | DWORD | 4 | +0 | +0 | prefixArrayに含まれるプレフィックス要素の個数を示す。 |
| prefixArray | DHCPV6Prefix* | 8/4 | +8 | +4 | 委任された各IPv6プレフィックス情報を保持するDHCPV6Prefix配列へのポインタ。 |
| iaid | DWORD | 4 | +16 | +8 | プレフィックス委任に用いるIA識別子(Identity Association ID)。 |
| T1 | LONGLONG | 8 | +24 | +16 | リース更新(Renew)を開始するまでの時間を示す。LONGLONG値。 |
| T2 | LONGLONG | 8 | +32 | +24 | リース再バインド(Rebind)を開始するまでの時間を示す。 |
| MaxLeaseExpirationTime | LONGLONG | 8 | +40 | +32 | リース全体の最大満了時刻を示す。 |
| LastRenewalTime | LONGLONG | 8 | +48 | +40 | 最後にリース更新を行った時刻を示す。 |
| status | StatusCode | 4 | +56 | +48 | リース取得処理の結果を示すStatusCode値。 |
| ServerId | BYTE* | 8/4 | +64 | +52 | 応答したDHCPv6サーバーのDUIDを指すバイト列ポインタ。NULL可。 |
| ServerIdLen | DWORD | 4 | +72 | +56 | ServerIdが指すサーバー識別子のバイト数を示す。 |
各言語での定義
#include <windows.h>
// DHCPV6PrefixLeaseInformation (x64 80 / x86 64 バイト)
typedef struct DHCPV6PrefixLeaseInformation {
DWORD nPrefixes;
DHCPV6Prefix* prefixArray;
DWORD iaid;
LONGLONG T1;
LONGLONG T2;
LONGLONG MaxLeaseExpirationTime;
LONGLONG LastRenewalTime;
StatusCode status;
BYTE* ServerId;
DWORD ServerIdLen;
} DHCPV6PrefixLeaseInformation;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DHCPV6PrefixLeaseInformation
{
public uint nPrefixes;
public IntPtr prefixArray;
public uint iaid;
public long T1;
public long T2;
public long MaxLeaseExpirationTime;
public long LastRenewalTime;
public int status;
public IntPtr ServerId;
public uint ServerIdLen;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DHCPV6PrefixLeaseInformation
Public nPrefixes As UInteger
Public prefixArray As IntPtr
Public iaid As UInteger
Public T1 As Long
Public T2 As Long
Public MaxLeaseExpirationTime As Long
Public LastRenewalTime As Long
Public status As Integer
Public ServerId As IntPtr
Public ServerIdLen As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DHCPV6PrefixLeaseInformation(ctypes.Structure):
_fields_ = [
("nPrefixes", wintypes.DWORD),
("prefixArray", ctypes.c_void_p),
("iaid", wintypes.DWORD),
("T1", ctypes.c_longlong),
("T2", ctypes.c_longlong),
("MaxLeaseExpirationTime", ctypes.c_longlong),
("LastRenewalTime", ctypes.c_longlong),
("status", ctypes.c_int),
("ServerId", ctypes.c_void_p),
("ServerIdLen", wintypes.DWORD),
]#[repr(C)]
pub struct DHCPV6PrefixLeaseInformation {
pub nPrefixes: u32,
pub prefixArray: *mut core::ffi::c_void,
pub iaid: u32,
pub T1: i64,
pub T2: i64,
pub MaxLeaseExpirationTime: i64,
pub LastRenewalTime: i64,
pub status: i32,
pub ServerId: *mut core::ffi::c_void,
pub ServerIdLen: u32,
}import "golang.org/x/sys/windows"
type DHCPV6PrefixLeaseInformation struct {
nPrefixes uint32
prefixArray uintptr
iaid uint32
T1 int64
T2 int64
MaxLeaseExpirationTime int64
LastRenewalTime int64
status int32
ServerId uintptr
ServerIdLen uint32
}type
DHCPV6PrefixLeaseInformation = record
nPrefixes: DWORD;
prefixArray: Pointer;
iaid: DWORD;
T1: Int64;
T2: Int64;
MaxLeaseExpirationTime: Int64;
LastRenewalTime: Int64;
status: Integer;
ServerId: Pointer;
ServerIdLen: DWORD;
end;const DHCPV6PrefixLeaseInformation = extern struct {
nPrefixes: u32,
prefixArray: ?*anyopaque,
iaid: u32,
T1: i64,
T2: i64,
MaxLeaseExpirationTime: i64,
LastRenewalTime: i64,
status: i32,
ServerId: ?*anyopaque,
ServerIdLen: u32,
};type
DHCPV6PrefixLeaseInformation {.bycopy.} = object
nPrefixes: uint32
prefixArray: pointer
iaid: uint32
T1: int64
T2: int64
MaxLeaseExpirationTime: int64
LastRenewalTime: int64
status: int32
ServerId: pointer
ServerIdLen: uint32struct DHCPV6PrefixLeaseInformation
{
uint nPrefixes;
void* prefixArray;
uint iaid;
long T1;
long T2;
long MaxLeaseExpirationTime;
long LastRenewalTime;
int status;
void* ServerId;
uint ServerIdLen;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DHCPV6PrefixLeaseInformation サイズ: 64 バイト(x86)
dim st, 16 ; 4byte整数×16(構造体サイズ 64 / 4 切り上げ)
; nPrefixes : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; prefixArray : DHCPV6Prefix* (+4, 4byte) varptr(st)+4 を基点に操作(4byte:入れ子/配列)
; iaid : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; T1 : LONGLONG (+16, 8byte) qpoke st,16,値 / qpeek(st,16) ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; T2 : LONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; MaxLeaseExpirationTime : LONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; LastRenewalTime : LONGLONG (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; status : StatusCode (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ServerId : BYTE* (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; ServerIdLen : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DHCPV6PrefixLeaseInformation サイズ: 80 バイト(x64)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; nPrefixes : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; prefixArray : DHCPV6Prefix* (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; iaid : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; T1 : LONGLONG (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; T2 : LONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; MaxLeaseExpirationTime : LONGLONG (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; LastRenewalTime : LONGLONG (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; status : StatusCode (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; ServerId : BYTE* (+64, 8byte) qpoke st,64,値 / qpeek(st,64) ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ServerIdLen : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DHCPV6PrefixLeaseInformation
#field int nPrefixes
#field intptr prefixArray
#field int iaid
#field int64 T1
#field int64 T2
#field int64 MaxLeaseExpirationTime
#field int64 LastRenewalTime
#field int status
#field intptr ServerId
#field int ServerIdLen
#endstruct
stdim st, DHCPV6PrefixLeaseInformation ; NSTRUCT 変数を確保
st->nPrefixes = 100
mes "nPrefixes=" + st->nPrefixes