NetworkInspector.Sources
0.3.0
dotnet add package NetworkInspector.Sources --version 0.3.0
NuGet\Install-Package NetworkInspector.Sources -Version 0.3.0
<PackageReference Include="NetworkInspector.Sources" Version="0.3.0" />
<PackageVersion Include="NetworkInspector.Sources" Version="0.3.0" />
<PackageReference Include="NetworkInspector.Sources" />
paket add NetworkInspector.Sources --version 0.3.0
#r "nuget: NetworkInspector.Sources, 0.3.0"
#:package NetworkInspector.Sources@0.3.0
#addin nuget:?package=NetworkInspector.Sources&version=0.3.0
#tool nuget:?package=NetworkInspector.Sources&version=0.3.0
NetworkInspector.Sources
Capture reader package for NetworkInspector with random-access and streaming source options.
What This Is
NetworkInspector.Sources opens and reads capture files so you can parse them through Core/Protocols pipelines.
Supported families include:
- PCAP and PCAPNG,
- BLF,
- ASC,
- synthetic and cached sources for testing and benchmarking.
Why It Stands Out
- Covers both random-access and stream-first workflows.
- Supports large-file handling with memory-budget-oriented options.
- Integrates directly into parser and exporter pipelines.
Install
dotnet add package NetworkInspector.Sources
dotnet add package NetworkInspector.Core
Choose The Right Source Type
| Need | Recommended Source |
|---|---|
| Random access by frame id | PcapSource, BlfSource, AscSource |
| Sequential processing with low memory pressure | PcapStreamSource, BlfStreamSource, AscStreamSource |
| Test data generation | RandomFrameSource |
| In-memory replay | CachedFrameSource |
Quick Start
Open From File
using NetworkInspector.Sources.Pcapng;
PcapSource source = PcapSource.Open("capture.pcapng");
foreach (RawFrame rawFrame in source)
{
// Parse with Core/Protocols pipeline
}
Open From Stream
using NetworkInspector.Sources.Asc;
AscStreamSource source = AscStreamSource.FromStream(fileStream, "ASC stream");
foreach (RawFrame rawFrame in source)
{
// Parse with Core/Protocols pipeline
}
Common Tasks
Handle Large ASC Files
Use AscSourceOptions.PreloadBudget to control in-memory vs disk-backed behavior.
Combine With Parser Stack
Read RawFrame instances from sources, then convert them to Frame and parse into Packet via Core.
Use Random Access
Use random-access source variants where frame-id lookups are required for replay, indexing, or test cases.
Limits And Thread-Safety Notes
- Choose streaming sources for very large captures to bound memory usage.
- Validate source format and assumptions before automated ingestion.
- Use cancellation and external execution limits in long-running jobs.
Safe Usage (STRIDE)
- Spoofing: Assume file names/extensions may be misleading; validate expected source format before processing.
- Tampering: Handle malformed headers and partial records as expected external-input failure modes.
- Repudiation: Preserve source metadata if downstream workflows require traceability.
- Information disclosure: Treat raw captures as sensitive data and apply access controls.
- Denial of service: Use streaming modes, budgets, and cancellation to guard against oversized inputs.
- Elevation of privilege: Run source readers with least-required filesystem permissions.
Links
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.3.0)
- ZeroAlloc (>= 0.2.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.