Expand description
Presentation-format (zone-file text) helpers shared by Display
implementations: escaping (RFC 1035 §5.1), hex, base64 and base32hex
(RFC 4648), and the generic RDATA form of RFC 3597 §5.
Record-data Display impls should use these rather than rolling their
own, so every type escapes and encodes identically.
Structs§
- Base64
Displayadapter: standard base64 with padding (RFC 4648 §4), as used by DNSKEY, RRSIG, CERT, OPENPGPKEY, DHCID, …- Base32
Hex Displayadapter: base32 with the “extended hex” alphabet, uppercase, unpadded (RFC 4648 §7), as used by NSEC3 (RFC 5155 §3.3).- Hex
Displayadapter: uppercase hexadecimal, no separators.
Functions§
- fmt_
generic_ rdata - Writes RDATA in the generic RFC 3597 §5 form:
\# <length> <hex>(just\# 0when empty). - fmt_
label - Writes a label in presentation format:
.,\,",(,),;,@and$are backslash-escaped; space and non-printable bytes become\DDD(RFC 1035 §5.1, RFC 4343 §2.1). - fmt_
quoted - Writes a
<character-string>in quoted presentation format:"and\are backslash-escaped; non-printable bytes become\DDD(RFC 1035 §5.1).