Skip to main content

2.2. RDATA Wire Format

The RDATA for the SVCB RR consists of:

  • a 2-octet field for SvcPriority as an integer in network byte order.
  • the uncompressed, fully qualified TargetName, represented as a sequence of length-prefixed labels per Section 3.1 of RFC 1035.
  • the SvcParams, consuming the remainder of the record (so smaller than 65535 octets and constrained by the RDATA and DNS message sizes).

When the list of SvcParams is non-empty, it contains a series of SvcParamKey=SvcParamValue pairs, represented as:

  • a 2-octet field containing the SvcParamKey as an integer in network byte order. (See Section 14.3.2 for the defined values.)
  • a 2-octet field containing the length of the SvcParamValue as an integer between 0 and 65535 in network byte order.
  • an octet string of this length whose contents are the SvcParamValue in a format determined by the SvcParamKey.

SvcParamKeys SHALL appear in increasing numeric order.

Clients MUST consider an RR malformed if:

  • the end of the RDATA occurs within a SvcParam.
  • SvcParamKeys are not in strictly increasing numeric order.
  • the SvcParamValue for a SvcParamKey does not have the expected format.

Note that the second condition implies that there are no duplicate SvcParamKeys.

If any RRs are malformed, the client MUST reject the entire RRset and fall back to non-SVCB connection establishment.