Skip to main content

track_extension_value_in_range

Function track_extension_value_in_range 

Source
fn track_extension_value_in_range(key: u64, value: u64) -> bool
Expand description

Whether value is inside the range draft-16 allows for an extension header type that restricts one.

Three types do, each in Section 11 and each answering anything outside its range with a session close.

DELIVERY_TIMEOUT (0x02), Section 11.1: “DELIVERY_TIMEOUT, if present, MUST contain a value greater than 0. If an endpoint receives a DELIVERY_TIMEOUT equal to 0 it MUST close the session with PROTOCOL_VIOLATION.” Draft-16 is the only draft that states this. Draft-17 renamed the type to OBJECT_DELIVERY_TIMEOUT and gives it no range at all.

DEFAULT_PUBLISHER_GROUP_ORDER (0x22), Section 11.1.1.2: “The allowed values are Ascending (0x1) or Descending (0x2). If an endpoint receives a value outside this range, it MUST close the session with PROTOCOL_VIOLATION.”

DYNAMIC_GROUPS (0x30), Section 11.1.1.3: “The allowed values are 0 or 1… If an endpoint receives a value larger than 1, it MUST close the session with PROTOCOL_VIOLATION.” Draft-15 carried this as a Message Parameter, where it is parameter_value_in_range’s business; draft-16 moved it to this namespace, and the two registries number their entries independently.

DEFAULT_PUBLISHER_PRIORITY (0x0E) is not here. Section 11.1.1.1 says “Priorities above 255 are invalid” and stops, where the three above name a consequence in the next clause. A range stated without one is not a close.