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>
116 lines
3.6 KiB
C#
116 lines
3.6 KiB
C#
namespace MxNativeClient;
|
|
|
|
public static class NmxProcedureMetadata
|
|
{
|
|
public static readonly Guid INmxService2 = new("2630A513-A974-4B1A-8025-457A9A7C56B8");
|
|
public static readonly Guid INmxSvcCallback = new("B49F92F7-C748-4169-8ECA-A0670B012746");
|
|
|
|
public static readonly NdrProcedureDescriptor RegisterEngine = new(
|
|
InterfaceId: INmxService2,
|
|
Name: nameof(RegisterEngine),
|
|
Opnum: 3,
|
|
X86StackSize: 20,
|
|
ClientBufferSize: 8,
|
|
ServerBufferSize: 8,
|
|
ParameterCountIncludingReturn: 4);
|
|
|
|
public static readonly NdrProcedureDescriptor UnRegisterEngine = new(
|
|
InterfaceId: INmxService2,
|
|
Name: nameof(UnRegisterEngine),
|
|
Opnum: 4,
|
|
X86StackSize: 12,
|
|
ClientBufferSize: 8,
|
|
ServerBufferSize: 8,
|
|
ParameterCountIncludingReturn: 2);
|
|
|
|
public static readonly NdrProcedureDescriptor Connect = new(
|
|
InterfaceId: INmxService2,
|
|
Name: nameof(Connect),
|
|
Opnum: 5,
|
|
X86StackSize: 24,
|
|
ClientBufferSize: 32,
|
|
ServerBufferSize: 8,
|
|
ParameterCountIncludingReturn: 5);
|
|
|
|
public static readonly NdrProcedureDescriptor TransferData = new(
|
|
InterfaceId: INmxService2,
|
|
Name: nameof(TransferData),
|
|
Opnum: 6,
|
|
X86StackSize: 28,
|
|
ClientBufferSize: 32,
|
|
ServerBufferSize: 8,
|
|
ParameterCountIncludingReturn: 6);
|
|
|
|
public static readonly NdrProcedureDescriptor AddSubscriberEngine = new(
|
|
InterfaceId: INmxService2,
|
|
Name: nameof(AddSubscriberEngine),
|
|
Opnum: 7,
|
|
X86StackSize: 24,
|
|
ClientBufferSize: 32,
|
|
ServerBufferSize: 8,
|
|
ParameterCountIncludingReturn: 5);
|
|
|
|
public static readonly NdrProcedureDescriptor RemoveSubscriberEngine = new(
|
|
InterfaceId: INmxService2,
|
|
Name: nameof(RemoveSubscriberEngine),
|
|
Opnum: 8,
|
|
X86StackSize: 24,
|
|
ClientBufferSize: 32,
|
|
ServerBufferSize: 8,
|
|
ParameterCountIncludingReturn: 5);
|
|
|
|
public static readonly NdrProcedureDescriptor SetHeartbeatSendInterval = new(
|
|
InterfaceId: INmxService2,
|
|
Name: nameof(SetHeartbeatSendInterval),
|
|
Opnum: 9,
|
|
X86StackSize: 16,
|
|
ClientBufferSize: 16,
|
|
ServerBufferSize: 8,
|
|
ParameterCountIncludingReturn: 3);
|
|
|
|
public static readonly NdrProcedureDescriptor RegisterEngine2 = new(
|
|
InterfaceId: INmxService2,
|
|
Name: nameof(RegisterEngine2),
|
|
Opnum: 10,
|
|
X86StackSize: 24,
|
|
ClientBufferSize: 16,
|
|
ServerBufferSize: 8,
|
|
ParameterCountIncludingReturn: 5);
|
|
|
|
public static readonly NdrProcedureDescriptor GetPartnerVersion = new(
|
|
InterfaceId: INmxService2,
|
|
Name: nameof(GetPartnerVersion),
|
|
Opnum: 11,
|
|
X86StackSize: 24,
|
|
ClientBufferSize: 24,
|
|
ServerBufferSize: 36,
|
|
ParameterCountIncludingReturn: 5);
|
|
|
|
public static readonly NdrProcedureDescriptor DataReceived = new(
|
|
InterfaceId: INmxSvcCallback,
|
|
Name: nameof(DataReceived),
|
|
Opnum: 3,
|
|
X86StackSize: 16,
|
|
ClientBufferSize: 8,
|
|
ServerBufferSize: 8,
|
|
ParameterCountIncludingReturn: 3);
|
|
|
|
public static readonly NdrProcedureDescriptor StatusReceived = new(
|
|
InterfaceId: INmxSvcCallback,
|
|
Name: nameof(StatusReceived),
|
|
Opnum: 4,
|
|
X86StackSize: 16,
|
|
ClientBufferSize: 8,
|
|
ServerBufferSize: 8,
|
|
ParameterCountIncludingReturn: 3);
|
|
}
|
|
|
|
public sealed record NdrProcedureDescriptor(
|
|
Guid InterfaceId,
|
|
string Name,
|
|
int Opnum,
|
|
int X86StackSize,
|
|
int ClientBufferSize,
|
|
int ServerBufferSize,
|
|
int ParameterCountIncludingReturn);
|