OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics 2.0.0-preview.2

Prefix Reserved
This is a prerelease version of OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics.
dotnet add package OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics --version 2.0.0-preview.2
                    
NuGet\Install-Package OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics -Version 2.0.0-preview.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics" Version="2.0.0-preview.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics" Version="2.0.0-preview.2" />
                    
Directory.Packages.props
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics --version 2.0.0-preview.2
                    
#r "nuget: OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics, 2.0.0-preview.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics@2.0.0-preview.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics&version=2.0.0-preview.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics&version=2.0.0-preview.2&prerelease
                    
Install as a Cake Tool

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:

  • PcapTransportChannelBindingITransportChannelFactory decorator installed via AddPcap() that wraps every TcpTransportChannel with a capture-aware byte transport (outbound client channels).
  • PcapTransportListenerBindingITransportListenerFactory 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).

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on OPCFoundation.NetStandard.Opc.Ua.Core.Diagnostics:

Package Downloads
OPCFoundation.NetStandard.Opc.Ua.Mcp.Diagnostics

OPC UA MCP tools for protocol diagnostics: UA-TCP packet capture, decode and replay. Embed in any MCP server host.

OPCFoundation.NetStandard.Opc.Ua.PubSub.Diagnostics

OPC UA PubSub diagnostics: capture, dissection (incl. encrypted UADP) and replay of UDP / MQTT PubSub traffic.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.0-preview.2 47 8/24/2026