Skip to main content

OPC UA core diagnostics: packet capture, dissection and replay engine.

Total Downloads
918
918
Published
Oct 12, 2026
7d ago

Get Started

dotnet add package OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics --version 2.0.1
ProductVersions
.NET
net10.0net8.0net9.0

README

OPC UA .NET Standard — Diagnostics (packet capture, dissection, replay)

OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics is an opt-in binding that captures, dissects, and replays the wire-level traffic of the OPC UA channels a host process opens — outbound client channels and/or inbound channels accepted by a hosted server. It composes with the existing opc.tcp transport as a transparent decorator — no application changes are needed beyond wiring the binding through DI (AddPcap()) or by hand (PcapBindings.Install*).

Overview

The package contains:

  • PcapTransportChannelBinding — ITransportChannelFactory decorator installed via AddPcap() that wraps every TcpTransportChannel with a capture-aware byte transport (outbound client channels).
  • PcapTransportListenerBinding — ITransportListenerFactory decorator that wraps a hosted server's opc.tcp listener so every accepted inbound client→server channel is capture-aware.
  • ChannelCaptureRegistry + CaptureSessionManager — runtime control surface to start / stop a capture, manage rolling files, and emit pcap + keylog artifacts.
  • ReplaySessionManager — offline pcap dissection and frame replay (optional, gated by PcapOptions.AllowMockClientReplay).
  • Audit sinks (LoggerPcapAuditSink, HashChainedAuditFileSink) for tamper-evident capture provenance.

Getting started

using Microsoft.Extensions.DependencyInjection;
using Opc.Ua;

services.AddOpcUa();
services.AddPcap(opts =>
{
    opts.BaseFolder = "/var/log/opcua-pcap";
    opts.MaxActiveSessions = 4;
});

Without dependency injection

Install the binding by hand, then start a capture session sharing the same IChannelCaptureRegistry. Installing a binding only makes channels capture-aware; nothing is recorded until a session is running.

using Opc.Ua.Pcap.Bindings;

// server (inbound): install before the server starts its listeners
IChannelCaptureRegistry registry =
    PcapBindings.InstallServer(server.Server!.TransportBindings);

// client (outbound): install into the process-wide client default
// PcapBindings.InstallClient(ClientChannelManager.DefaultChannelBindings, registry);

See the Diagnostics guide for the full non-DI recipe (server, client, and both directions).

Target frameworks

net8.0, net9.0, net10.0.

Additional documentation

See the main repository README and the Diagnostics guide for the full design (capture-session lifecycle, key-escrow, audit chaining, replay security model).

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

A verified publisher signal is available. Assess fit from the package's supported frameworks, license and dependency graph rather than popularity alone.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 3 target frameworks; confirm the exact target used by your application.The published metadata declares 66 direct dependency entries across framework groups. Inspect the resolved dependency graph for your target framework.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.