dns.wire.reader

dns.wire

reader(raw) -> reader

Create a wire format reader from a raw binary string

Returns a cursor-based reader wrapping the given binary string. The reader provides methods for reading DNS wire format primitives (u8, u16, u32, bytes), compressed names, character-strings, and position management (pos, remaining, seek, skip, at_end).

Use sub_reader(n) to create bounded readers for RDATA parsing. Sub-readers share the parent's message buffer so compression pointers still resolve correctly.