ホーム › NetworkManagement.QoS › SIPAEVENT_REVOCATION_LIST_PAYLOAD
SIPAEVENT_REVOCATION_LIST_PAYLOAD
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| CreationTime | LONGLONG | 8 | +0 | +0 | 失効リストの作成日時を示す64ビット時刻値。 |
| DigestLength | DWORD | 4 | +8 | +8 | ダイジェストのバイト長。 |
| HashAlgID | WORD | 2 | +12 | +12 | ダイジェストのハッシュアルゴリズムIDを示す値。 |
| Digest | BYTE | 1 | +14 | +14 | 失効リストのダイジェスト値を格納するバイト配列の先頭要素。 |
各言語での定義
#include <windows.h>
// SIPAEVENT_REVOCATION_LIST_PAYLOAD (x64 15 / x86 15 バイト)
#pragma pack(push, 1)
typedef struct SIPAEVENT_REVOCATION_LIST_PAYLOAD {
LONGLONG CreationTime;
DWORD DigestLength;
WORD HashAlgID;
BYTE Digest[1];
} SIPAEVENT_REVOCATION_LIST_PAYLOAD;
#pragma pack(pop)using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, Pack = 1, CharSet = CharSet.Unicode)]
public struct SIPAEVENT_REVOCATION_LIST_PAYLOAD
{
public long CreationTime;
public uint DigestLength;
public ushort HashAlgID;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] Digest;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, Pack:=1, CharSet:=CharSet.Unicode)>
Public Structure SIPAEVENT_REVOCATION_LIST_PAYLOAD
Public CreationTime As Long
Public DigestLength As UInteger
Public HashAlgID As UShort
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=1)> Public Digest() As Byte
End Structureimport ctypes
from ctypes import wintypes
class SIPAEVENT_REVOCATION_LIST_PAYLOAD(ctypes.Structure):
_pack_ = 1
_fields_ = [
("CreationTime", ctypes.c_longlong),
("DigestLength", wintypes.DWORD),
("HashAlgID", ctypes.c_ushort),
("Digest", ctypes.c_ubyte * 1),
]#[repr(C, packed(1))]
pub struct SIPAEVENT_REVOCATION_LIST_PAYLOAD {
pub CreationTime: i64,
pub DigestLength: u32,
pub HashAlgID: u16,
pub Digest: [u8; 1],
}import "golang.org/x/sys/windows"
type SIPAEVENT_REVOCATION_LIST_PAYLOAD struct {
CreationTime int64
DigestLength uint32
HashAlgID uint16
Digest [1]byte
}type
SIPAEVENT_REVOCATION_LIST_PAYLOAD = packed record
CreationTime: Int64;
DigestLength: DWORD;
HashAlgID: Word;
Digest: array[0..0] of Byte;
end;const SIPAEVENT_REVOCATION_LIST_PAYLOAD = extern struct {
CreationTime: i64,
DigestLength: u32,
HashAlgID: u16,
Digest: [1]u8,
};type
SIPAEVENT_REVOCATION_LIST_PAYLOAD {.packed.} = object
CreationTime: int64
DigestLength: uint32
HashAlgID: uint16
Digest: array[1, uint8]align(1)
struct SIPAEVENT_REVOCATION_LIST_PAYLOAD
{
long CreationTime;
uint DigestLength;
ushort HashAlgID;
ubyte[1] Digest;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SIPAEVENT_REVOCATION_LIST_PAYLOAD サイズ: 15 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 15 / 4 切り上げ)
; CreationTime : LONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; DigestLength : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; HashAlgID : WORD (+12, 2byte) wpoke st,12,値 / 値 = wpeek(st,12)
; Digest : BYTE (+14, 1byte) varptr(st)+14 を基点に操作(1byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SIPAEVENT_REVOCATION_LIST_PAYLOAD, pack=1
#field int64 CreationTime
#field int DigestLength
#field short HashAlgID
#field byte Digest 1
#endstruct
stdim st, SIPAEVENT_REVOCATION_LIST_PAYLOAD ; NSTRUCT 変数を確保
st->CreationTime = 100
mes "CreationTime=" + st->CreationTime