NetworkInspector.Protocols
0.17.0
dotnet add package NetworkInspector.Protocols --version 0.17.0
NuGet\Install-Package NetworkInspector.Protocols -Version 0.17.0
<PackageReference Include="NetworkInspector.Protocols" Version="0.17.0" />
<PackageVersion Include="NetworkInspector.Protocols" Version="0.17.0" />
<PackageReference Include="NetworkInspector.Protocols" />
paket add NetworkInspector.Protocols --version 0.17.0
#r "nuget: NetworkInspector.Protocols, 0.17.0"
#:package NetworkInspector.Protocols@0.17.0
#addin nuget:?package=NetworkInspector.Protocols&version=0.17.0
#tool nuget:?package=NetworkInspector.Protocols&version=0.17.0
NetworkInspector.Protocols
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
tshark4.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 withMutField.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
- Protocol guide: writing dissectors, fields, tables, settings, effects, reassembly
- Core · Filter · FrameBuilder · Root overview
- GitHub repository · Issue tracker
License
| Product | Versions 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. |
-
net10.0
- NetworkInspector.Core (>= 0.17.0)
- ZeroAlloc (>= 0.6.2)
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 |