§1.4.

Notational Conventions

This document uses the conventions detailed in ([RFC9000], Section 1.3) when describing the binary encoding.

As a quick reference, the following list provides a non normative summary of the parts of RFC9000 field syntax that are used in this specification.

x (L):

Indicates that x is L bits long

x (i):

Indicates that x holds an integer value using the variable-length encoding as described in ([RFC9000], Section 16)

x (..):

Indicates that x can be any length including zero bits long. Values in this format always end on a byte boundary.

[x (L)]:

Indicates that x is optional and has a length of L

x (L) ...:

Indicates that x is repeated zero or more times and that each instance has a length of L

This document extends the RFC9000 syntax and with the additional field types:

x (b):

Indicates that x consists of a variable length integer encoding as described in ([RFC9000], Section 16), followed by that many bytes of binary data

x (tuple):

Indicates that x is a tuple, consisting of a variable length integer encoded as described in ([RFC9000], Section 16), followed by that many variable length tuple fields, each of which are encoded as (b) above.

To reduce unnecessary use of bandwidth, variable length integers SHOULD be encoded using the least number of bytes possible to represent the required value.

1.4.1. Location Structure

Location identifies a particular Object in a Group within a Track.

Location {
  Group (i),
  Object (i)
}
Figure 1: Location structure

In this document, the constituent parts of any Location A can be referred to using A.Group or A.Object.

Location A < Location B if:

A.Group < B.Group || (A.Group == B.Group && A.Object < B.Object)

1.4.2. Key-Value-Pair Structure

Key-Value-Pair is a flexible structure designed to carry key/value pairs in which the key is a variable length integer and the value is either a variable length integer or a byte field of arbitrary length.

Key-Value-Pair is used in both the data plane and control plane, but is optimized for use in the data plane.

Key-Value-Pair {
  Type (i),
  [Length (i),]
  Value (..)
}
Figure 2: MOQT Key-Value-Pair
  • Type: an unsigned integer, encoded as a varint, identifying the type of the value and also the subsequent serialization.

  • Length: Only present when Type is odd. Specifies the length of the Value field. The maximum length of a value is 2^16-1 bytes. If an endpoint receives a length larger than the maximum, it MUST close the session with a Protocol Violation.

  • Value: A single varint encoded value when Type is even, otherwise a sequence of Length bytes.

If a receiver understands a Type, and the following Value or Length/Value does not match the serialization defined by that Type, the receiver MUST terminate the session with error code KEY_VALUE_FORMATTING_ERROR.

1.4.3. Reason Phrase Structure

Reason Phrase provides a way for the sender to encode additional diagnostic information about the error condition, where appropriate.

Reason Phrase {
  Reason Phrase Length (i),
  Reason Phrase Value (..)
}
  • Reason Phrase Length: A variable-length integer specifying the length of the reason phrase in bytes. The reason phrase length has a maximum length of 1024 bytes. If an endpoint receives a length exceeding the maximum, it MUST close the session with a PROTOCOL_VIOLATION

  • Reason Phrase Value: Additional diagnostic information about the error condition. The reason phrase value is encoded as UTF-8 string and does not carry information, such as language tags, that would aid comprehension by any entity other than the one that created the text.

This is one section of the MoQT specification, rendered per-section for quick reference and citation. The authoritative text is draft-ietf-moq-transport-14 at the IETF.