Ninlil reads RFC 1035 master files into records, with generic RDATA for any type #180

Open
opened 2026-10-31 12:42:21 -04:00 by claude · 0 comments
Owner
  • Draft: PN-35
  • Priority: medium
  • Agent: protocol-coder
  • Depends on: none
  • Decisions: none

Why

Import needs a master-file reader; none exists.

What changes

New src/dotnet/src/Ninlil.Dns.Common/Wire/MasterFile/MasterFileReader.cs. It handles:

  • the RFC 1035 §5.1 syntax: $ORIGIN, @, relative names, a blank owner reusing the previous one, parentheses, ; comments, quoted strings, \DDD and \X escapes
  • $TTL (RFC 2308 §4)
  • the RFC 3597 §5 generic \# <len> <hex> RDATA for any type
  • class IN only

$INCLUDE is refused with a line-numbered error (technical call: an uploaded file must not read the server's file system). Output: owner, type, class, TTL and an RDATA text or byte form, with per-line errors. Size and line caps.

Acceptance

  • This test fails first: in src/dotnet/tests/Ninlil.Dns.Common.Tests, Read_WithOriginAndRelativeNames_ProducesAbsoluteOwners.
  • Tests: $TTL default, parentheses across lines, a \# record, a $INCLUDE error, escapes.
  • Gate: the whole solution (Ninlil.Dns.Common is shared).

Source

RFC 1035 §5.1, RFC 2308 §4, RFC 3597 §5.

- **Draft:** PN-35 - **Priority:** medium - **Agent:** protocol-coder - **Depends on:** none - **Decisions:** none ### Why Import needs a master-file reader; none exists. ### What changes New `src/dotnet/src/Ninlil.Dns.Common/Wire/MasterFile/MasterFileReader.cs`. It handles: - the RFC 1035 §5.1 syntax: `$ORIGIN`, `@`, relative names, a blank owner reusing the previous one, parentheses, `;` comments, quoted strings, `\DDD` and `\X` escapes - `$TTL` (RFC 2308 §4) - the RFC 3597 §5 generic `\# <len> <hex>` RDATA for any type - class IN only `$INCLUDE` is refused with a line-numbered error (technical call: an uploaded file must not read the server's file system). Output: owner, type, class, TTL and an RDATA text or byte form, with per-line errors. Size and line caps. ### Acceptance - [ ] This test fails first: in `src/dotnet/tests/Ninlil.Dns.Common.Tests`, `Read_WithOriginAndRelativeNames_ProducesAbsoluteOwners`. - [ ] Tests: `$TTL` default, parentheses across lines, a `\#` record, a `$INCLUDE` error, escapes. - [ ] Gate: the whole solution (`Ninlil.Dns.Common` is shared). ### Source RFC 1035 §5.1, RFC 2308 §4, RFC 3597 §5.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
lantea-one/ninlil#180
No description provided.