Skip to main content
net10.0.NETFramework4.7.2.NETFramework4.8net8.0net9.0.NETStandard2.1

OPC UA PubSub Ethernet (Layer 2) transport (Part 14 Ethernet mapping, EtherType 0xB62C) class library.

Published
Jan 1, 1900
128y ago
Total Downloads
0
0

Install

dotnet add package OPCFoundation.NetStandard.Opc.Ua.PubSub.Eth.Debug --version 2.0.0-preview.4
ProductVersions
.NET
net10.0net8.0net9.0
.NET Standard
netstandard2.1
Other
.NETFramework4.7.2.NETFramework4.8

README

OPCFoundation.NetStandard.Opc.Ua.PubSub.Eth

OPC UA PubSub Ethernet (Layer 2) transport for the OPC UA .NET Standard stack.

Implements the OPC UA Part 14 Ethernet mapping (opc.eth://, transport profile http://opcfoundation.org/UA-Profile/Transport/pubsub-eth-uadp): raw Ethernet II frames with EtherType 0xB62C and optional IEEE 802.1Q VLAN tagging (VID/PCP). It reuses the UADP message encoding and the message-level PubSub security of the core PubSub library.

Frame backends

Raw Layer-2 frame I/O is platform-specific and privileged. The transport resolves the backend through an injectable IEthernetFrameChannelFactory provider:

  • Native (default) — Linux AF_PACKET and macOS BPF via libc P/Invoke (NativeAOT-compatible). Requires CAP_NET_RAW / root (Linux) or BPF access (macOS).
  • SharpPcap (WithPcap()) — opt-in cross-platform / Windows backend over libpcap / Npcap. The SharpPcap members are annotated for trimming / NativeAOT so the rest of the assembly stays trim-clean.
  • In-memory loopback — a deterministic, privilege-free backend for tests and local diagnostics.

Usage

services.AddOpcUaPubSub(pubsub => pubsub
    .AddEthTransport(options =>
    {
        options.PreferredNetworkInterface = "eth0";
        options.DefaultVlanId = 5;
        options.DefaultPriority = 6;
    }));

// Windows / cross-platform via libpcap / Npcap:
services.AddOpcUaPubSub(pubsub => pubsub.AddEthTransport().WithPcap());

Address connections with opc.eth://<mac>[?vid=<0-4095>&pcp=<0-7>], for example opc.eth://01-00-5E-00-00-01?vid=5&pcp=6.

See the project documentation (docs/PubSubEth.md) for details.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 6 target frameworks; confirm the exact target used by your application.The published metadata declares 155 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.