fe2a6db786
rust / build / test / clippy / fmt (push) Has been cancelled
Layout:
- src/ .NET 10 x64 reference: MxNativeCodec, MxNativeClient,
MxAsbClient, probes, tests, harnesses. Executable spec.
- design/ Architectural plan for the Rust port (M0–M6), error
model, protocol invariants, risks (R1–R16), adversarial
review log (review.md).
- rust/ Rust workspace. M0 skeleton + M1 codec parity.
mxaccess-codec: 215 unit tests + 2 cross-implementation
parity tests (byte-identical against .NET reference).
Other crates are M0 stubs awaiting M2+.
- captures/ Frida + netsh + pcap evidence per CLAUDE.md
("captures are evidence, not throwaway logs").
- analysis/ Decompiled C# (frida/proxy/decompiled-*),
Ghidra exports for native DLLs (`exports/` only —
working state at `projects/` and AVEVA's input
binaries at `input/` are gitignored).
- docs/ Reverse-engineering reference docs.
- tools/ Setup-LiveProbeEnv.ps1 (Infisical credential fetcher),
Compute-Crc.ps1 (.NET parity helper).
- .github/workflows/ Rust CI: fmt + build + test + clippy on Windows.
- LICENSE MIT (Joseph Doherty, 2026).
Verified:
- cargo test --workspace → 217 passed (215 unit + 2 .NET parity), 0 failed
- cargo clippy --workspace -- -D warnings → clean
- cargo fmt --all -- --check → clean
- cargo publish --dry-run -p mxaccess-codec → packages cleanly
Excluded from history (see .gitignore):
- **/bin, **/obj, **/target — build artifacts
- analysis/ghidra/projects/ — Ghidra working state (regenerable)
- analysis/ghidra/input/ — AVEVA proprietary DLLs (vendor IP)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
96 lines
7.3 KiB
C#
96 lines
7.3 KiB
C#
using System;
|
|
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Interop.Lmx;
|
|
|
|
[ComImport]
|
|
[Guid("5C7C1C94-09C1-4E0A-9DCE-ECA53FBCDE04")]
|
|
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
|
public interface IRedundancyService2 : IRedundancyService
|
|
{
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void Initialize([In] Guid guidGalaxyId, [In] int lPlatformId, [In][MarshalAs(UnmanagedType.BStr)] string bstrPrimaryAddress, [In] int lPrimaryPort, [In][MarshalAs(UnmanagedType.BStr)] string bstrSecondaryAddress, [In] int lSecondaryPort, [In][MarshalAs(UnmanagedType.BStr)] string bstrMulticastGroup, [In] int lMultiCastPort = 5001);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void TransferData([In] int lEngineId, [In] int lType, [In] int lReference, [In] ref byte pBuffer, [In] int lLength, [In] int lTimeOut = 0);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void UpdateSubscriberInfo([In] int lEngineId, [In] int lToAddCount, [In] ref tagEngineSubscriberInformation pToAdd, [In] int lToDeleteCount, [In] ref tagEngineSubscriberInformation pToDelete);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void RegisterRedundancyNotification([In] int lEngineId, [In][MarshalAs(UnmanagedType.Interface)] IRedundancyNotify pNotify, out int pCookie);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void UnregisterRedundancyNotification([In] int lCookie);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void RegisterRedundancyStatusNotification([In] int lTargetPlatformId, [In] int lTargetEngineId, [In][MarshalAs(UnmanagedType.Interface)] IRedundancyNotify pNotify, out int pCookie);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void UnregisterRedundancyStatusNotification([In] int lTargetPlatformId, [In] int lTargetEngineId, [In] int lCookie);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void UnregisterRedundantEngine([In] int lEngineId);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void SetHeartbeatRateForRedundantPartner([In] int lEngineId, [In] int lTicks, [In] int lMaxMissedTicks);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void SetHeartbeatRate([In] int lEngineId, [In] int lTicks, [In] int lMaxMissedTicks);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void SetIndirectDetectTimeoutForRedundantPartner([In] int lEngineId, [In] int lTimeOut, [In] int bEnableStandbyDetect);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void SetIndirectDetectTimeout([In] int lEngineId, [In] int lTimeOut, [In] int bEnableStandbyDetect);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void UpdateRedundancyStatus([In] int lEngineId, [In] tagRedundancyStatus eFailoverStatus, [In] tagRedundancySubStatus subStatus);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void GetRedundancyStatus([In] int lPlatformId, [In] int lEngineId, out tagRedundancyStatus eFailoverStatus, out tagRedundancySubStatus subStatus);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void GetRedundancyStatusBlock([In] int lPlatformId, [In] int lEngineId, [In] int lTimeOut, out tagRedundancyStatus eFailoverStatus, out tagRedundancySubStatus subStatus);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void GetEngineRedundancyInfo([In] int lPlatformId, [In] int lEngineId, out tagEngineRedundancyInformation pFailoverEngineInfo);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void GetHeartbeatConsecMissCount([In] int lEngineId, [In] tagRedundancyChannel eChannel, out int plTotalHeartbeatMissed, out int plConsecHeartbeatMissed);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void UpdateRemotePlatform([In] int lPlatformId, [In][MarshalAs(UnmanagedType.BStr)] string bstrPrimaryAddress, [In] int lPrimaryPort, [In][MarshalAs(UnmanagedType.BStr)] string bstrFailoverAddress, [In] int lFailoverPort);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void RemoveRemotePlatform([In] int lPlatformId);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void RegisterRedundantEngine([In] int lEngineId, [In] int lPartnerPlatformId, [In][MarshalAs(UnmanagedType.BStr)] string partnerPMCAddress, [In] int partnerPMCPort, [In][MarshalAs(UnmanagedType.BStr)] string partnerRMCAddress, [In] int partnerRMCPort, [In] int timeToDiscoverPartner, [In][MarshalAs(UnmanagedType.BStr)] string engineName, [In] tagRedundancyIdentity eFailoverConfig);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void UpdatePartnerRMCAddress([In] int lEngineId, [In][MarshalAs(UnmanagedType.BStr)] string partnerRMCAddress, [In] int partnerRMCPort);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void UpdateTimeToDiscoverRedundantPartner([In] int engineId, [In] int timeToDiscoverPartner);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void SetMaxTimeForStandbyToBecomeActive([In] int engineId, [In] int timeToBecomeActive);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void GetPartnerRedundancyStatus([In] int engineId, out tagRedundancyStatus status, out tagRedundancySubStatus subStatus, out tagRedundancyStatus partnerStatus);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void GetPartnerRMCAddress([In] int engineId, [MarshalAs(UnmanagedType.BStr)] out string partnerRMCAddress, out int partnerRMCPort);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void Dump([In] int dumpmsg, [In][MarshalAs(UnmanagedType.Struct)] ref object parm1, [In][MarshalAs(UnmanagedType.Struct)] ref object parm2);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
new void GetRedundancyStatusBlockEx([In] tagRedundancyChannel lMessageChannelId, [In] int lPlatformId, [In] int lEngineId, [In] int lTimeOut, out tagRedundancyStatus eStatus, out int partnerPlatform, out int partnerEngine, [ComAliasName("Interop.Lmx.eRedundancyStatusBlockExResult")] out eRedundancyStatusBlockExResult result);
|
|
|
|
[MethodImpl(MethodImplOptions.InternalCall, MethodCodeType = MethodCodeType.Runtime)]
|
|
void GetRedundancyStatusBlockEx2([In] tagRedundancyChannel eMessageChannel, [In] int lPlatformId, [In] int lEngineId, [In] int lTimeOut, [In] tagRedundancyChannel ePartnerStatusMessageChannel, out tagRedundancyStatus peStatus, out tagRedundancySubStatus peSubStatus, out tagRedundancyStatus pePartnerStatus, out tagRedundancySubStatus pePartnerSubStatus, out int plPartnerPlatform, out int plPartnerEngine, [ComAliasName("Interop.Lmx.eRedundancyStatusBlockExResult")] out eRedundancyStatusBlockExResult peResult);
|
|
}
|