NetworkInspector.Protocols 0.17.0

dotnet add package NetworkInspector.Protocols --version 0.17.0
                    
NuGet\Install-Package NetworkInspector.Protocols -Version 0.17.0
                    
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="NetworkInspector.Protocols" Version="0.17.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="NetworkInspector.Protocols" Version="0.17.0" />
                    
Directory.Packages.props
<PackageReference Include="NetworkInspector.Protocols" />
                    
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 NetworkInspector.Protocols --version 0.17.0
                    
#r "nuget: NetworkInspector.Protocols, 0.17.0"
                    
#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 NetworkInspector.Protocols@0.17.0
                    
#: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=NetworkInspector.Protocols&version=0.17.0
                    
Install as a Cake Addin
#tool nuget:?package=NetworkInspector.Protocols&version=0.17.0
                    
Install as a Cake Tool

NetworkInspector.Protocols

NuGet Downloads .NET 10 License: MIT

Ready-to-use dissectors for NetworkInspector.Core: enterprise networking (Ethernet to TLS and HTTP/2) and automotive buses (CAN, CAN FD, CAN XL, LIN, FlexRay, SOME/IP) in one stack, enabled with one call.

Highlights

  • 29 dissectors plus configurable signal messages across link, network, transport, application, and bus layers.
  • One registration call. builder.RegisterStandardProtocols() wires protocols, dispatch tables, TCP heuristics, and stream reassembly.
  • Real-world traffic. TCP stream reassembly and analysis (retransmissions, keep-alives, window scaling), IPv4/IPv6 defragmentation, HTTP/1 messages across segments, HTTP/2 with HPACK, WebSocket with permessage-deflate, SOME/IP-SD and SOME/IP-TP reassembly.
  • Automotive signal decoding. Decode CAN or PDU payloads into named, scaled signals from a JSON description (DBC-like: start bit, length, byte order, factor, offset, unit, value names, multiplexing).
  • Cross-validated against Wireshark. Protocol tests compare field values with tshark 4.6.
  • Wireshark-style field names (ip.src, tcp.port, udp.dstport, …) for filters, exports, and value caches.
  • Extensible. Write your own dissector with the same attributes and source generator the built-ins use.

Install

dotnet add package NetworkInspector.Core
dotnet add package NetworkInspector.Protocols

Quick Start

using NetworkInspector.Core;
using NetworkInspector.Core.Settings;
using NetworkInspector.Protocols;

StackBuilder builder = new(new SettingsManager(), new FrameInterfaceRegistry());
IReadOnlyList<SettingsLoadWarning> warnings = builder.RegisterStandardProtocols();
foreach (SettingsLoadWarning warning in warnings)
{
    Console.Error.WriteLine(warning); // PDU Transport and signal-message configuration problems
}

using Stack stack = builder.Build();

Parse frames with the stack as shown in the Core README.

Protocol Coverage

Layer Protocols
Meta Frame
Link Ethernet II, VLAN (802.1Q, 802.1ad), LLC/SNAP, Linux SLL, Linux SLL2
Network IPv4, IPv6, ARP, ICMPv4, ICMPv6
Transport TCP, UDP
Application DNS, DHCPv4, DHCPv6, HTTP/1.x, HTTP/2, TLS, DTLS, WebSocket, JSON, Text
Automotive and bus CAN (classic, FD, XL), LIN, FlexRay, SOME/IP, PDU Transport, signal messages
Fallback Data

RegisterStandardProtocols registers, in this order: Frame, Ethernet, VLAN, IPv4, IPv6, UDP, ARP, ICMP, ICMPv6, TCP, SLL, SLL2, LLC, DNS, DHCPv4, DHCPv6, TLS, DTLS, CAN, SOME/IP, FlexRay, LIN, HTTP, HTTP/2, WebSocket, Data, Text, JSON, PDU Transport, and the configured signal messages. It also registers the TCP heuristic table (HTTP/1, TLS, HTTP/2) and the TCP reassembly configurations for DNS over TCP and HTTP/1.

RegisterFairProfilingProtocols registers only Frame, Ethernet, IPv4, IPv6, UDP, and TCP, without heuristics and reassembly, for like-for-like benchmarks.

Configuration

Settings are read from the stack's SettingsManager. Preload or persist them before RegisterStandardProtocols.

Setting Purpose
pdu_transport.config_file JSON file with PDU names (schema in Schemas/)
pdu_transport.udp_dispatch_ports UDP ports that carry PDU Transport (default: none)
signal_message.config_file JSON signal description for CAN or PDU payloads (schema in Schemas/)
signal_message.show_raw, .show_enum, .max_enum_values Signal display options
can.config_file JSON CAN message names
tcp.max_tracked_streams, tcp.stream_key_last_vlan, tcp.stream_key_frame TCP stream tracking

Example: dispatch UDP port 47290 to PDU Transport.

using NetworkInspector.Core.Settings;
using NetworkInspector.Protocols.PduTransport;

SettingsManager settings = new();
settings.PreloadValue(PduTransportRegistration.UdpDispatchPortsSetting, SettingValue.U64Array([47290UL]));
StackBuilder builder = new(settings, new FrameInterfaceRegistry());
builder.RegisterStandardProtocols();

Signal and PDU configuration loading is best effort: invalid entries are skipped and reported as SettingsLoadWarning, never thrown.

Adding Custom Protocols

Custom dissectors implement IProtocol with a public Parse method and declare their fields with attributes from NetworkInspector.Protocols.Attributes; the source generator bundled with Core writes the registration code.

  • The first parse of each packet id is ordered and single-threaded; a re-parse of an already parsed id may run concurrently.
  • Stateful protocols store per-packet state in EffectStore<T>, keyed with MutField.TryGetEffectLayerKey, so a re-parse sees the same state as the first pass.

Step-by-step guide: PROTOCOL_GUIDE.md. Generator reference: NetworkInspector.Generators.

Limits And Thread-Safety Notes

  • Register protocols during stack construction only; the built stack is immutable.
  • Captures are untrusted input: dissectors bound lengths and counts, report malformed data as packet.error, and cap tracked TCP streams (tcp.max_tracked_streams) and reassembly buffers.
  • Connection keys hash with a process-seeded hash, so crafted captures cannot force hash-table collisions.

Learn More

License

MIT License

Product Compatible and additional computed target framework versions.
.NET 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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.17.0 82 10/17/2026
0.16.0 86 10/17/2026
0.15.0 88 10/9/2026
0.14.0 86 10/8/2026
0.13.0 97 9/27/2026
0.12.0 112 9/17/2026
0.11.0 135 9/10/2026
0.10.0 110 9/8/2026
0.9.0 110 9/2/2026
0.8.0 141 8/28/2026
0.7.0 118 8/27/2026
0.6.0 128 8/21/2026
0.5.0 152 7/11/2026
0.4.0 146 6/2/2026
0.3.0 147 5/21/2026
0.2.0 130 5/19/2026