Skip to content

[WIP] Add PcapFileReader class for reading .pcap files#158

Draft
benaadams with Copilot wants to merge 1 commit into
masterfrom
copilot/add-pcap-file-reader
Draft

[WIP] Add PcapFileReader class for reading .pcap files#158
benaadams with Copilot wants to merge 1 commit into
masterfrom
copilot/add-pcap-file-reader

Conversation

Copilot AI commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Thanks for assigning this issue to me. I'm starting to work on it and will keep this PR's description up to date as I form a plan and make progress.

Original prompt

This section details on the original issue you should resolve

<issue_title>PCap: file reader</issue_title>
<issue_description>## Problem

Magma.PCap is write-only (PcapFileWriter.cs only). The README describes "Packet capture support for network monitoring" which strongly implies the ability to read captures, not just write them.

Sub-tasks

  • PcapFileReader class: open .pcap, validate magic number (both endiannesses), read global header
  • Streaming packet enumeration via IEnumerable<PcapPacket> where PcapPacket wraps timestamp + ReadOnlyMemory<byte>
  • Link-layer type awareness (Ethernet, raw IP, etc.) from global header
  • Optional predicate-based filtering during read

Dependencies

Depends on: #99 (CI)
Unlocks: #112 (PCap round-trip tests)

Phase

Phase 1 (Core Protocol & Tooling)</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PCap: file reader

2 participants