Skip to content

Commit f35309b

Browse files
authored
Adding an Extensible Object Header (moq-wg#502)
This PR adds an extensible header to Objects, as well as updating the SETUP parameters to allow negotiation of required extension header parameters. Extensible headers have types which are IANA registered. A new Extensible header is defined and reserved with type 0x0, allowing name/value data to be passed in a manner compatible with HTTP headers. A new example is added showing serialization of an Object with an extensible header. Fixes: moq-wg#433
2 parents 487d416 + 17dc994 commit f35309b

File tree

1 file changed

+91
-3
lines changed

1 file changed

+91
-3
lines changed

draft-ietf-moq-transport.md

Lines changed: 91 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,8 +1236,8 @@ the `query` portion of the URI to the parameter.
12361236
#### MAX_SUBSCRIBE_ID {#max-subscribe-id}
12371237

12381238
The MAX_SUBSCRIBE_ID parameter (Parameter Type 0x02) communicates an initial
1239-
value for the Maximum Subscribe ID to the receiving subscriber. The default value
1240-
is 0, so if not specified, the peer MUST NOT create subscriptions.
1239+
value for the Maximum Subscribe ID to the receiving subscriber. The default
1240+
value is 0, so if not specified, the peer MUST NOT create subscriptions.
12411241

12421242
## GOAWAY {#message-goaway}
12431243

@@ -2291,6 +2291,12 @@ Track or Datagram.
22912291
* Object Status: As enumeration used to indicate missing
22922292
objects or mark the end of a group or track. See {{object-status}} below.
22932293

2294+
* Object Extension Count: The number of Object Extensions present. A value of 0
2295+
indicates that no Object Extension Headers are present.
2296+
2297+
* Object Extensions : A sequence of Object Extension Headers. See
2298+
{{object-extensions}} below.
2299+
22942300
* Object Payload: An opaque payload intended for an End Subscriber and SHOULD
22952301
NOT be processed by a relay. Only present when 'Object Status' is Normal (0x0).
22962302

@@ -2335,6 +2341,44 @@ Any object with a status code other than zero MUST have an empty payload.
23352341
Though some status information could be inferred from QUIC stream state,
23362342
that information is not reliable and cacheable.
23372343

2344+
#### Object Extension Header {#object-extensions}
2345+
Object Extension Headers are visible to relays and allow the transmission of
2346+
future metadata relevant to MOQT Object distribution. Any Object metadata never
2347+
accessed by the transport or relays SHOULD be serialized as part of the Object
2348+
payload and not as an extension header.
2349+
2350+
Extension Headers are defined in external specifications and registered in an
2351+
IANA table {{iana}}. These specifications define the type and value of the
2352+
header, along with any rules concerning processing, modification, caching and
2353+
forwarding. A relay which is coded to implement these rules is said to
2354+
"support" the extension.
2355+
2356+
If unsupported by the relay, Extension Headers MUST NOT be modified, MUST be
2357+
cached as part of the Object and MUST be forwarded by relays.
2358+
2359+
If supported by the relay and subject to the processing rules specified in the
2360+
definition of the extension, Extension Headers MAY be modified, added, removed,
2361+
and/or cached by relays.
2362+
2363+
Object Extension Headers are serialized as defined below:
2364+
2365+
~~~
2366+
Extension Header {
2367+
Header Type (i),
2368+
[Header Value (i)]
2369+
[Header Length (i),
2370+
Header Value (..)]
2371+
}
2372+
~~~
2373+
{: #object-extension-format title="Object Extension Header Format"}
2374+
2375+
* Header type: an unsigned integer, encoded as a varint, identifying the type
2376+
of the extension and also the subsequent serialization.
2377+
* Header values: even types are followed by a single varint encoded value. Odd
2378+
types are followed by a varint encoded length and then the header value.
2379+
Header types are registered in the IANA table 'MOQ Extension Headers'.
2380+
See {{iana}}.
2381+
23382382
## Object Datagram {#object-datagram}
23392383

23402384
An `OBJECT_DATAGRAM` carries a single object in a datagram.
@@ -2352,6 +2396,10 @@ OBJECT_DATAGRAM {
23522396
Group ID (i),
23532397
Object ID (i),
23542398
Publisher Priority (8),
2399+
Extension Count (i),
2400+
[Extension headers (...)],
2401+
Object Payload Length (i),
2402+
[Object Status (i)],
23552403
Object Payload (..),
23562404
}
23572405
~~~
@@ -2416,6 +2464,8 @@ The Object Status field is only sent if the Object Payload Length is zero.
24162464
~~~
24172465
{
24182466
Object ID (i),
2467+
Extension Count (i),
2468+
[Extension headers (...)],
24192469
Object Payload Length (i),
24202470
[Object Status (i)],
24212471
Object Payload (..),
@@ -2518,6 +2568,8 @@ Each object sent on a fetch stream after the FETCH_HEADER has the following form
25182568
Subgroup ID (i),
25192569
Object ID (i),
25202570
Publisher Priority (8),
2571+
Extension Count (i),
2572+
[Extension headers (...)],
25212573
Object Payload Length (i),
25222574
[Object Status (i)],
25232575
Object Payload (..),
@@ -2555,6 +2607,38 @@ SUBGROUP_HEADER {
25552607
}
25562608
~~~
25572609

2610+
Sending a group on one stream, with the first object containing two
2611+
Extension Headers.
2612+
2613+
~~~
2614+
Stream = 2
2615+
2616+
STREAM_HEADER_GROUP {
2617+
Subscribe ID = 2
2618+
Track Alias = 2
2619+
Group ID = 0
2620+
Publisher Priority = 0
2621+
}
2622+
{
2623+
Object ID = 0
2624+
Extension Count = 2
2625+
{ Type = 4
2626+
Value = 2186796243
2627+
},
2628+
{ Type = 77
2629+
Length = 21
2630+
Value = "traceID:123456"
2631+
}
2632+
Object Payload Length = 4
2633+
Payload = "abcd"
2634+
}
2635+
{
2636+
Object ID = 1
2637+
Object Payload Length = 4
2638+
Payload = "efgh"
2639+
}
2640+
2641+
~~~
25582642

25592643

25602644
# Security Considerations {#security}
@@ -2598,8 +2682,12 @@ TODO: fill out currently missing registries:
25982682
* Announce Error codes
25992683
* Announce Cancel Reason codes
26002684
* Message types
2685+
* MOQ Extension headers - we wish to reserve extension types 0-63 for
2686+
standards utilization where space is a premium, 64 - 16383 for
2687+
standards utilization where space is less of a concern, and 16384 and
2688+
above for first-come-first-served non-standardization usage.
26012689

2602-
TODO: register the URI scheme and the ALPN
2690+
TODO: register the URI scheme and the ALPN and grease the Extension types
26032691

26042692
# Contributors
26052693
{:numbered="false"}

0 commit comments

Comments
 (0)