Count the option bytes and keep two code spaces distinct
02EDNS, Extension Mechanisms for DNS, carries options in an OPT metadata record. An EDE option has its own option code, length, INFO-CODE and optional UTF-8 human text.
Separate text example: OK followed by NUL occupies 3 octets, so OPTION-LENGTH=5 including INFO-CODE. A following option starts after all three text bytes. No terminator is required for a different option with nonterminated text.
Source for this drawing: RFC 8914 · Read RFC section 2 ↗
New to this? Start hereA quick picture + helpful background
A message needs an address.
Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.
Helpful first, if these ideas are unfamiliar
These pictures are analogies to help you learn. The linked RFC explains the actual rules.
Terms in this drawing
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
Option code 15 identifies EDE; the separate 16-bit INFO-CODE identifies its reason.
- OPTION-CODE is 16 bits with value 15. OPTION-LENGTH is 16 bits and counts the payload after that field:2 bytes of INFO-CODE plus EXTRA-TEXT bytes.
- INFO-CODE is 16 bits in most-significant-byte-first network order. It indexes the EDE code registry, not the DNS RCODE registry.
- EXTRA-TEXT is variable UTF-8 text for people, not automated parsing. It may be empty. It may be NUL terminated, but receivers MUST NOT assume that; its length MUST come from OPTION-LENGTH.
- The worked word échec is 5 Unicode code points but 6 UTF-8 octets. With INFO-CODE 23, OPTION-LENGTH=8 and the complete option is 12 octets including its 4-byte option header.
Fields are schematic, not bit-width scale. The bounded codec models an isolated EDNS option and well-formed UTF-8, not a complete DNS parser or the full RFC 5198 network-text profile. A local 1024-text-octet teaching limit is not a wire-format limit.
Read the RFC section ↗