Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions artifacts/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1863,4 +1863,20 @@ artifacts:
status: implemented
tags: [trace-topology, ingest, lldp, v0100]

- id: REQ-TRACE-TOPOLOGY-003
type: requirement
title: PCAPNG FrameSource for L2 frame ingest
description: >
System shall provide a PCAPNG-backed FrameSource implementation
in spar-trace-topology that, given a `.pcapng` file recorded
with tcpdump / tshark / Wireshark from a TAP/SPAN port, yields
a stream of CapturedFrame records carrying mac_src, mac_dst,
optional 802.1Q VLAN-ID and PCP, and a Unix-epoch ns timestamp
derived from the per-IDB ts_resol option. Built atop the
`pcap-parser` crate. Errors carry concrete kinds (Truncated,
UnsupportedLinkType, MalformedPcapng, Io). Per the v0.10.0
trace-topology design's §"Implementation phasing" PCAPNG entry.
status: implemented
tags: [trace-topology, ingest, pcapng, v0100]

# Research findings tracked separately in research/findings.yaml
20 changes: 20 additions & 0 deletions artifacts/verification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2429,3 +2429,23 @@ artifacts:
links:
- type: satisfies
target: REQ-TRACE-TOPOLOGY-004

- id: TEST-TRACE-TOPOLOGY-PCAPNG
type: feature
title: PcapngFrameSource yields correct typed CapturedFrames
description: >
Tests in crates/spar-trace-topology/src/ingest.rs cover an
untagged Ethernet frame roundtrip, an 802.1Q-tagged frame with
VLAN-ID and PCP extraction, a truncated frame producing
IngestError::Truncated, an unsupported link type producing
IngestError::UnsupportedLinkType, and per-IDB ts_resol
handling for both µs and ns resolutions.
fields:
method: automated-test
steps:
- run: cargo test -p spar-trace-topology --lib -- ingest::tests
status: passing
tags: [trace-topology, ingest, pcapng, v0100]
links:
- type: satisfies
target: REQ-TRACE-TOPOLOGY-003
1 change: 1 addition & 0 deletions crates/spar-trace-topology/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ spar-base-db.workspace = true
spar-syntax.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
pcap-parser = "0.16"

[dev-dependencies]
tempfile = "3"
Loading
Loading