Skip to content

UDP: datagram struct + parsing #105

Description

@benaadams

Problem

Magma.Transport.Udp contains only a Header/ subdirectory and a .csproj file. No actual transport logic exists. UDP is the simpler of the two transport protocols and a hard dependency for DNS, QUIC, game networking, and most real-time use cases.

Start with the zero-copy datagram representation.

Sub-tasks

  • UdpDatagram struct wrapping Span<byte> for zero-copy access to source/dest port, length, checksum, payload
  • Construction methods: build a datagram into a pre-allocated buffer
  • IPv4 pseudo-header checksum calculation (reuse Magma.Common)
  • IPv6 pseudo-header checksum calculation

Dependencies

Depends on: #103 (establishes test patterns)
Unlocks: #107 (UDP transmitter/receiver), #106 (UDP tests)

Phase

Phase 1 (Core Protocol & Tooling)

Metadata

Metadata

Labels

P0Blockingphase-1Core protocol & toolingprotocolProtocol implementation

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions