Files
Joseph Doherty fe2a6db786
rust / build / test / clippy / fmt (push) Has been cancelled
Initial project state: .NET reference, design, Rust port (M0+M1), evidence
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>
2026-05-05 06:21:00 -04:00

225 lines
12 KiB
C#

using System.Runtime.InteropServices;
namespace Interop.Lmx;
[Guid("D57DCACA-E4C9-4AC6-8739-8E58955B2571")]
public enum EOPCUAStatusCode
{
OPCUA_STATUSCODE_Good = 0,
OPCUA_STATUSCODE_Uncertain = 1073741824,
OPCUA_STATUSCODE_Bad = int.MinValue,
OPCUA_STATUSCODE_BadUnexpectedError = -2147418112,
OPCUA_STATUSCODE_BadInternalError = -2147352576,
OPCUA_STATUSCODE_BadOutOfMemory = -2147287040,
OPCUA_STATUSCODE_BadResourceUnavailable = -2147221504,
OPCUA_STATUSCODE_BadCommunicationError = -2147155968,
OPCUA_STATUSCODE_BadEncodingError = -2147090432,
OPCUA_STATUSCODE_BadDecodingError = -2147024896,
OPCUA_STATUSCODE_BadEncodingLimitsExceeded = -2146959360,
OPCUA_STATUSCODE_BadRequestTooLarge = -2135425024,
OPCUA_STATUSCODE_BadResponseTooLarge = -2135359488,
OPCUA_STATUSCODE_BadUnknownResponse = -2146893824,
OPCUA_STATUSCODE_BadTimeout = -2146828288,
OPCUA_STATUSCODE_BadServiceUnsupported = -2146762752,
OPCUA_STATUSCODE_BadShutdown = -2146697216,
OPCUA_STATUSCODE_BadServerNotConnected = -2146631680,
OPCUA_STATUSCODE_BadServerHalted = -2146566144,
OPCUA_STATUSCODE_BadNothingToDo = -2146500608,
OPCUA_STATUSCODE_BadTooManyOperations = -2146435072,
OPCUA_STATUSCODE_BadDataTypeIdUnknown = -2146369536,
OPCUA_STATUSCODE_BadCertificateInvalid = -2146304000,
OPCUA_STATUSCODE_BadSecurityChecksFailed = -2146238464,
OPCUA_STATUSCODE_BadCertificateTimeInvalid = -2146172928,
OPCUA_STATUSCODE_BadCertificateIssuerTimeInvalid = -2146107392,
OPCUA_STATUSCODE_BadCertificateHostNameInvalid = -2146041856,
OPCUA_STATUSCODE_BadCertificateUriInvalid = -2145976320,
OPCUA_STATUSCODE_BadCertificateUseNotAllowed = -2145910784,
OPCUA_STATUSCODE_BadCertificateIssuerUseNotAllowed = -2145845248,
OPCUA_STATUSCODE_BadCertificateUntrusted = -2145779712,
OPCUA_STATUSCODE_BadCertificateRevocationUnknown = -2145714176,
OPCUA_STATUSCODE_BadCertificateIssuerRevocationUnknown = -2145648640,
OPCUA_STATUSCODE_BadCertificateRevoked = -2145583104,
OPCUA_STATUSCODE_BadCertificateIssuerRevoked = -2145517568,
OPCUA_STATUSCODE_BadUserAccessDenied = -2145452032,
OPCUA_STATUSCODE_BadIdentityTokenInvalid = -2145386496,
OPCUA_STATUSCODE_BadIdentityTokenRejected = -2145320960,
OPCUA_STATUSCODE_BadSecureChannelIdInvalid = -2145255424,
OPCUA_STATUSCODE_BadInvalidTimestamp = -2145189888,
OPCUA_STATUSCODE_BadNonceInvalid = -2145124352,
OPCUA_STATUSCODE_BadSessionIdInvalid = -2145058816,
OPCUA_STATUSCODE_BadSessionClosed = -2144993280,
OPCUA_STATUSCODE_BadSessionNotActivated = -2144927744,
OPCUA_STATUSCODE_BadSubscriptionIdInvalid = -2144862208,
OPCUA_STATUSCODE_BadRequestHeaderInvalid = -2144731136,
OPCUA_STATUSCODE_BadTimestampsToReturnInvalid = -2144665600,
OPCUA_STATUSCODE_BadRequestCanceledByClient = -2144600064,
OPCUA_STATUSCODE_GoodSubscriptionTransferred = 2949120,
OPCUA_STATUSCODE_GoodCompletesAsynchronously = 3014656,
OPCUA_STATUSCODE_GoodOverload = 3080192,
OPCUA_STATUSCODE_GoodClamped = 3145728,
OPCUA_STATUSCODE_BadNoCommunication = -2144272384,
OPCUA_STATUSCODE_BadWaitingForInitialData = -2144206848,
OPCUA_STATUSCODE_BadNodeIdInvalid = -2144141312,
OPCUA_STATUSCODE_BadNodeIdUnknown = -2144075776,
OPCUA_STATUSCODE_BadAttributeIdInvalid = -2144010240,
OPCUA_STATUSCODE_BadIndexRangeInvalid = -2143944704,
OPCUA_STATUSCODE_BadIndexRangeNoData = -2143879168,
OPCUA_STATUSCODE_BadDataEncodingInvalid = -2143813632,
OPCUA_STATUSCODE_BadDataEncodingUnsupported = -2143748096,
OPCUA_STATUSCODE_BadNotReadable = -2143682560,
OPCUA_STATUSCODE_BadNotWritable = -2143617024,
OPCUA_STATUSCODE_BadOutOfRange = -2143551488,
OPCUA_STATUSCODE_BadNotSupported = -2143485952,
OPCUA_STATUSCODE_BadNotFound = -2143420416,
OPCUA_STATUSCODE_BadObjectDeleted = -2143354880,
OPCUA_STATUSCODE_BadNotImplemented = -2143289344,
OPCUA_STATUSCODE_BadMonitoringModeInvalid = -2143223808,
OPCUA_STATUSCODE_BadMonitoredItemIdInvalid = -2143158272,
OPCUA_STATUSCODE_BadMonitoredItemFilterInvalid = -2143092736,
OPCUA_STATUSCODE_BadMonitoredItemFilterUnsupported = -2143027200,
OPCUA_STATUSCODE_BadFilterNotAllowed = -2142961664,
OPCUA_STATUSCODE_BadStructureMissing = -2142896128,
OPCUA_STATUSCODE_BadEventFilterInvalid = -2142830592,
OPCUA_STATUSCODE_BadContentFilterInvalid = -2142765056,
OPCUA_STATUSCODE_BadFilterOperatorInvalid = -2134835200,
OPCUA_STATUSCODE_BadFilterOperatorUnsupported = -2134769664,
OPCUA_STATUSCODE_BadFilterOperandCountMismatch = -2134704128,
OPCUA_STATUSCODE_BadFilterOperandInvalid = -2142699520,
OPCUA_STATUSCODE_BadFilterElementInvalid = -2134638592,
OPCUA_STATUSCODE_BadFilterLiteralInvalid = -2134573056,
OPCUA_STATUSCODE_BadContinuationPointInvalid = -2142633984,
OPCUA_STATUSCODE_BadNoContinuationPoints = -2142568448,
OPCUA_STATUSCODE_BadReferenceTypeIdInvalid = -2142502912,
OPCUA_STATUSCODE_BadBrowseDirectionInvalid = -2142437376,
OPCUA_STATUSCODE_BadNodeNotInView = -2142371840,
OPCUA_STATUSCODE_BadServerUriInvalid = -2142306304,
OPCUA_STATUSCODE_BadServerNameMissing = -2142240768,
OPCUA_STATUSCODE_BadDiscoveryUrlMissing = -2142175232,
OPCUA_STATUSCODE_BadSemaphoreFileMissing = -2142109696,
OPCUA_STATUSCODE_BadRequestTypeInvalid = -2142044160,
OPCUA_STATUSCODE_BadSecurityModeRejected = -2141978624,
OPCUA_STATUSCODE_BadSecurityPolicyRejected = -2141913088,
OPCUA_STATUSCODE_BadTooManySessions = -2141847552,
OPCUA_STATUSCODE_BadUserSignatureInvalid = -2141782016,
OPCUA_STATUSCODE_BadApplicationSignatureInvalid = -2141716480,
OPCUA_STATUSCODE_BadNoValidCertificates = -2141650944,
OPCUA_STATUSCODE_BadIdentityChangeNotSupported = -2134507520,
OPCUA_STATUSCODE_BadRequestCanceledByRequest = -2141585408,
OPCUA_STATUSCODE_BadParentNodeIdInvalid = -2141519872,
OPCUA_STATUSCODE_BadReferenceNotAllowed = -2141454336,
OPCUA_STATUSCODE_BadNodeIdRejected = -2141388800,
OPCUA_STATUSCODE_BadNodeIdExists = -2141323264,
OPCUA_STATUSCODE_BadNodeClassInvalid = -2141257728,
OPCUA_STATUSCODE_BadBrowseNameInvalid = -2141192192,
OPCUA_STATUSCODE_BadBrowseNameDuplicated = -2141126656,
OPCUA_STATUSCODE_BadNodeAttributesInvalid = -2141061120,
OPCUA_STATUSCODE_BadTypeDefinitionInvalid = -2140995584,
OPCUA_STATUSCODE_BadSourceNodeIdInvalid = -2140930048,
OPCUA_STATUSCODE_BadTargetNodeIdInvalid = -2140864512,
OPCUA_STATUSCODE_BadDuplicateReferenceNotAllowed = -2140798976,
OPCUA_STATUSCODE_BadInvalidSelfReference = -2140733440,
OPCUA_STATUSCODE_BadReferenceLocalOnly = -2140667904,
OPCUA_STATUSCODE_BadNoDeleteRights = -2140602368,
OPCUA_STATUSCODE_UncertainReferenceNotDeleted = 1086062592,
OPCUA_STATUSCODE_BadServerIndexInvalid = -2140536832,
OPCUA_STATUSCODE_BadViewIdUnknown = -2140471296,
OPCUA_STATUSCODE_BadViewTimestampInvalid = -2134310912,
OPCUA_STATUSCODE_BadViewParameterMismatch = -2134245376,
OPCUA_STATUSCODE_BadViewVersionInvalid = -2134179840,
OPCUA_STATUSCODE_UncertainNotAllNodesAvailable = 1086324736,
OPCUA_STATUSCODE_GoodResultsMayBeIncomplete = 12189696,
OPCUA_STATUSCODE_BadNotTypeDefinition = -2134376448,
OPCUA_STATUSCODE_UncertainReferenceOutOfServer = 1080819712,
OPCUA_STATUSCODE_BadTooManyMatches = -2140340224,
OPCUA_STATUSCODE_BadQueryTooComplex = -2140274688,
OPCUA_STATUSCODE_BadNoMatch = -2140209152,
OPCUA_STATUSCODE_BadMaxAgeInvalid = -2140143616,
OPCUA_STATUSCODE_BadHistoryOperationInvalid = -2140078080,
OPCUA_STATUSCODE_BadHistoryOperationUnsupported = -2140012544,
OPCUA_STATUSCODE_BadInvalidTimestampArgument = -2135097344,
OPCUA_STATUSCODE_BadWriteNotSupported = -2139947008,
OPCUA_STATUSCODE_BadTypeMismatch = -2139881472,
OPCUA_STATUSCODE_BadMethodInvalid = -2139815936,
OPCUA_STATUSCODE_BadArgumentsMissing = -2139750400,
OPCUA_STATUSCODE_BadTooManySubscriptions = -2139684864,
OPCUA_STATUSCODE_BadTooManyPublishRequests = -2139619328,
OPCUA_STATUSCODE_BadNoSubscription = -2139553792,
OPCUA_STATUSCODE_BadSequenceNumberUnknown = -2139488256,
OPCUA_STATUSCODE_BadMessageNotAvailable = -2139422720,
OPCUA_STATUSCODE_BadInsufficientClientProfile = -2139357184,
OPCUA_STATUSCODE_BadStateNotActive = -2134966272,
OPCUA_STATUSCODE_BadTcpServerTooBusy = -2139291648,
OPCUA_STATUSCODE_BadTcpMessageTypeInvalid = -2139226112,
OPCUA_STATUSCODE_BadTcpSecureChannelUnknown = -2139160576,
OPCUA_STATUSCODE_BadTcpMessageTooLarge = -2139095040,
OPCUA_STATUSCODE_BadTcpNotEnoughResources = -2139029504,
OPCUA_STATUSCODE_BadTcpInternalError = -2138963968,
OPCUA_STATUSCODE_BadTcpEndpointUrlInvalid = -2138898432,
OPCUA_STATUSCODE_BadRequestInterrupted = -2138832896,
OPCUA_STATUSCODE_BadRequestTimeout = -2138767360,
OPCUA_STATUSCODE_BadSecureChannelClosed = -2138701824,
OPCUA_STATUSCODE_BadSecureChannelTokenUnknown = -2138636288,
OPCUA_STATUSCODE_BadSequenceNumberInvalid = -2138570752,
OPCUA_STATUSCODE_BadProtocolVersionUnsupported = -2135031808,
OPCUA_STATUSCODE_BadConfigurationError = -2138505216,
OPCUA_STATUSCODE_BadNotConnected = -2138439680,
OPCUA_STATUSCODE_BadDeviceFailure = -2138374144,
OPCUA_STATUSCODE_BadSensorFailure = -2138308608,
OPCUA_STATUSCODE_BadOutOfService = -2138243072,
OPCUA_STATUSCODE_BadDeadbandFilterInvalid = -2138177536,
OPCUA_STATUSCODE_UncertainNoCommunicationLastUsableValue = 1083113472,
OPCUA_STATUSCODE_UncertainLastUsableValue = 1083179008,
OPCUA_STATUSCODE_UncertainSubstituteValue = 1083244544,
OPCUA_STATUSCODE_UncertainInitialValue = 1083310080,
OPCUA_STATUSCODE_UncertainSensorNotAccurate = 1083375616,
OPCUA_STATUSCODE_UncertainEngineeringUnitsExceeded = 1083441152,
OPCUA_STATUSCODE_UncertainSubNormal = 1083506688,
OPCUA_STATUSCODE_GoodLocalOverride = 9830400,
OPCUA_STATUSCODE_BadRefreshInProgress = -2137587712,
OPCUA_STATUSCODE_BadConditionAlreadyDisabled = -2137522176,
OPCUA_STATUSCODE_BadConditionAlreadyEnabled = -2134114304,
OPCUA_STATUSCODE_BadConditionDisabled = -2137456640,
OPCUA_STATUSCODE_BadEventIdUnknown = -2137391104,
OPCUA_STATUSCODE_BadEventNotAcknowledgeable = -2135228416,
OPCUA_STATUSCODE_BadDialogNotActive = -2134048768,
OPCUA_STATUSCODE_BadDialogResponseInvalid = -2133983232,
OPCUA_STATUSCODE_BadConditionBranchAlreadyAcked = -2133917696,
OPCUA_STATUSCODE_BadConditionBranchAlreadyConfirmed = -2133852160,
OPCUA_STATUSCODE_BadConditionAlreadyShelved = -2133786624,
OPCUA_STATUSCODE_BadConditionNotShelved = -2133721088,
OPCUA_STATUSCODE_BadShelvingTimeoutOfRange = -2133655552,
OPCUA_STATUSCODE_BadNoData = -2137325568,
OPCUA_STATUSCODE_BadBoundNotFound = -2133393408,
OPCUA_STATUSCODE_BadBoundNotSupported = -2133327872,
OPCUA_STATUSCODE_BadDataLost = -2137194496,
OPCUA_STATUSCODE_BadDataUnavailable = -2137128960,
OPCUA_STATUSCODE_BadEntryExists = -2137063424,
OPCUA_STATUSCODE_BadNoEntryExists = -2136997888,
OPCUA_STATUSCODE_BadTimestampNotSupported = -2136932352,
OPCUA_STATUSCODE_GoodEntryInserted = 10616832,
OPCUA_STATUSCODE_GoodEntryReplaced = 10682368,
OPCUA_STATUSCODE_UncertainDataSubNormal = 1084489728,
OPCUA_STATUSCODE_GoodNoData = 10813440,
OPCUA_STATUSCODE_GoodMoreData = 10878976,
OPCUA_STATUSCODE_BadAggregateListMismatch = -2133590016,
OPCUA_STATUSCODE_BadAggregateNotSupported = -2133524480,
OPCUA_STATUSCODE_BadAggregateInvalidInputs = -2133458944,
OPCUA_STATUSCODE_GoodCommunicationEvent = 10944512,
OPCUA_STATUSCODE_GoodShutdownEvent = 11010048,
OPCUA_STATUSCODE_GoodCallAgain = 11075584,
OPCUA_STATUSCODE_GoodNonCriticalTimeout = 11141120,
OPCUA_STATUSCODE_BadInvalidArgument = -2136276992,
OPCUA_STATUSCODE_BadConnectionRejected = -2136211456,
OPCUA_STATUSCODE_BadDisconnect = -2136145920,
OPCUA_STATUSCODE_BadConnectionClosed = -2136080384,
OPCUA_STATUSCODE_BadInvalidState = -2136014848,
OPCUA_STATUSCODE_BadEndOfStream = -2135949312,
OPCUA_STATUSCODE_BadNoDataAvailable = -2135883776,
OPCUA_STATUSCODE_BadWaitingForResponse = -2135818240,
OPCUA_STATUSCODE_BadOperationAbandoned = -2135752704,
OPCUA_STATUSCODE_BadExpectedStreamToBlock = -2135687168,
OPCUA_STATUSCODE_BadWouldBlock = -2135621632,
OPCUA_STATUSCODE_BadSyntaxError = -2135556096,
OPCUA_STATUSCODE_BadMaxConnectionsReached = -2135490560
}