NetworkInspector.Core 0.3.0

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

NetworkInspector.Core

NuGet

NetworkInspector.Core is the parsing runtime of the NetworkInspector stack.

What This Is

Use this package when you need to turn raw frame bytes into structured packet fields and inspect those fields in .NET code.

Core provides:

  • parser stack construction (StackBuilder and Stack),
  • frame creation and packet parsing APIs,
  • field traversal primitives used by exporters and custom analysis code,
  • runtime plumbing used by built-in protocol packages.

Why It Stands Out

  • Built for high-throughput parsing workflows.
  • Integrates directly with built-in dissectors from NetworkInspector.Protocols.
  • Works in both application code and service pipelines.

Install

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

Quick Start

using NetworkInspector.Core;
using NetworkInspector.Protocols;

StackBuilder builder = new(new SettingsManager(), new FrameInterfaceRegistry());
ProtocolRegistration.RegisterStandardProtocols(builder);
Stack stack = builder.Build();

Frame frame = Frame.Create(
    new FrameId(0),
    Timestamp.FromSecs(0),
    rawBytes,
    LinkType.Ethernet,
    FrameInterfaceId.Invalid,
    stack.FrameInterfaceRegistry).Value;

Packet packet = Packet.ParseFrame(new PacketId(0), stack, frame);
foreach (Field field in packet)
{
    Console.WriteLine($"{field.Info.UiName}: {field.Value}");
}

stack.Dispose();

Post-Parser Pipeline

Post-parsers are protocol-owned callbacks that run after the main protocol dispatch on every packet. Register them during stack construction with RegisterPostParser(protocolId, priority).

Execution order — post-parsers are sorted once at build time: ascending by priority (lower values run first), then ascending by registration order as a stable tie-breaker. No sorting overhead occurs during parsing.

Lifecycle — post-parsers execute after the full protocol dispatch tree, before packet.info is appended, and before the packet is sealed. They receive the packet root field as parent, so their fields appear as root-level siblings identical to top-level protocol fields.

Index and value-cache — in indexed parses (ParseFrameIndexed), post-parsers run before PacketIndex.EndPacket. Their RecordProtocolPresence, RecordGroupPresence, and value-cache writes are treated identically to those of normal parsers.

Error policy — a ParseResult error or exception from any post-parser is recorded as a packet.error and made visible. Remaining post-parsers always continue executing regardless of earlier failures. No errors are silently discarded.

Common Tasks

Register Standard Protocols

Use ProtocolRegistration.RegisterStandardProtocols(builder) to activate the default dissector set.

Parse From Capture Readers

Combine Core with NetworkInspector.Sources readers to parse frames from PCAP/PCAPNG/BLF/ASC sources.

Feed Export Pipelines

Parse packets with Core, then send them to NetworkInspector.Exporters packet exporters (JSON/PBF/CSV/Text).

Practical Notes

  • Build stacks once and reuse for batch parsing jobs.
  • Dispose stacks explicitly when parsing is complete.
  • Keep parser lifecycle and mutable operations in controlled execution scopes.

Limits And Thread-Safety Notes

  • Treat stack construction and mutable parse contexts as single-threaded unless package docs state otherwise.
  • Validate external frame bytes at system boundaries.
  • Use cancellation in surrounding workflow code for long-running ingest loops.

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 (3)

Showing the top 3 NuGet packages that depend on NetworkInspector.Core:

Package Downloads
NetworkInspector.Protocols

Built-in protocol dissectors for NetworkInspector including Ethernet, IPv4, IPv6, TCP, UDP, DNS, DHCPv4, DHCPv6, HTTP/1.x, HTTP/2, TLS, DTLS, WebSocket, ARP, ICMP, ICMPv6, CAN, CAN XL, FlexRay, LIN, SOME/IP, PDU Transport, and more.

NetworkInspector.Sources

Frame source implementations for NetworkInspector. Reads PCAP, PCAPNG, Vector BLF, and Vector ASC capture files with streaming and random-access support, error tolerance, and memory-mapped I/O.

NetworkInspector.Exporters

Frame exporter implementations for NetworkInspector. Writes captured frames and parsed packets to PCAPNG, BLF, CSV, JSON, PBF, and plain-text formats with streaming and memory-efficient output.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.0 40 5/21/2026
0.2.0 51 5/19/2026