Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change error codes from 16-bit to varints #2680

Merged
merged 6 commits into from Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions draft-ietf-quic-http.md
Expand Up @@ -1649,7 +1649,7 @@ assigned by IANA.
## Error Codes {#iana-error-codes}

This document establishes a registry for HTTP/3 error codes. The "HTTP/3 Error
Code" registry manages a 16-bit space. The "HTTP/3 Error Code" registry
Code" registry manages a 62-bit space. The "HTTP/3 Error Code" registry
operates under the "Expert Review" policy {{?RFC8126}}.

Registrations for error codes are required to include a description
Expand All @@ -1663,7 +1663,7 @@ Name:
: A name for the error code. Specifying an error code name is optional.

Code:
: The 16-bit error code value.
: The 62-bit error code value.

Description:
: A brief description of the error code semantics, longer if no detailed
Expand Down
55 changes: 32 additions & 23 deletions draft-ietf-quic-transport.md
Expand Up @@ -4522,7 +4522,7 @@ The RESET_STREAM frame is as follows:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Application Error Code (16) |
| Application Error Code (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Final Size (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Expand All @@ -4537,8 +4537,9 @@ Stream ID:

Application Protocol Error Code:

: A 16-bit application protocol error code (see {{app-error-codes}}) which
indicates why the stream is being closed.
: A variable-length integer containing the application protocol error
code (see {{app-error-codes}}) which indicates why the stream is being
closed.

Final Size:

Expand Down Expand Up @@ -4567,8 +4568,8 @@ The STOP_SENDING frame is as follows:
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Stream ID (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Application Error Code (16) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Application Error Code (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
~~~

STOP_SENDING frames contain the following fields:
Expand All @@ -4579,8 +4580,8 @@ Stream ID:

Application Error Code:

: A 16-bit, application-specified reason the sender is ignoring the stream (see
{{app-error-codes}}).
: A variable-length integer containing the application-specified reason the
sender is ignoring the stream (see {{app-error-codes}}).


## CRYPTO Frame {#frame-crypto}
Expand Down Expand Up @@ -4644,7 +4645,7 @@ The NEW_TOKEN frame is as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Token Length (i) ...
| Token Length (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Token (*) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Expand Down Expand Up @@ -5115,7 +5116,9 @@ The CONNECTION_CLOSE frames are as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Error Code (16) | [ Frame Type (i) ] ...
| Error Code (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| [ Frame Type (i) ] ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Reason Phrase Length (i) ...
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Expand All @@ -5127,10 +5130,11 @@ CONNECTION_CLOSE frames contain the following fields:

Error Code:

: A 16-bit error code which indicates the reason for closing this connection. A
CONNECTION_CLOSE frame of type 0x1c uses codes from the space defined in
{{error-codes}}. A CONNECTION_CLOSE frame of type 0x1d uses codes from the
application protocol error code space; see {{app-error-codes}}
: A variable length integer error code which indicates the reason for
closing this connection. A CONNECTION_CLOSE frame of type 0x1c uses codes
from the space defined in {{error-codes}}. A CONNECTION_CLOSE frame of
type 0x1d uses codes from the application protocol error code space;
see {{app-error-codes}}

Frame Type:

Expand Down Expand Up @@ -5175,7 +5179,7 @@ An IANA registry is used to manage the assignment of frame types; see

# Transport Error Codes {#error-codes}

QUIC error codes are 16-bit unsigned integers.
QUIC error codes are 62-bit unsigned integers.

This section lists the defined QUIC transport error codes that may be used in a
CONNECTION_CLOSE frame. These errors apply to the entire connection.
Expand Down Expand Up @@ -5256,7 +5260,7 @@ See {{iana-error-codes}} for details of registering new error codes.

## Application Protocol Error Codes {#app-error-codes}

Application protocol error codes are 16-bit unsigned integers, but the
Application protocol error codes are 62-bit unsigned integers, but the
management of application error codes are left to application protocols.
Application protocol error codes are used for the RESET_STREAM frame
({{frame-reset-stream}}), the STOP_SENDING frame ({{frame-stop-sending}}), and
Expand Down Expand Up @@ -5550,18 +5554,19 @@ The initial contents of this registry are tabulated in {{frame-types}}.
IANA \[SHALL add/has added] a registry for "QUIC Transport Error Codes" under a
"QUIC Protocol" heading.

The "QUIC Transport Error Codes" registry governs a 16-bit space. This space is
split into two spaces that are governed by different policies. Values with the
first byte in the range 0x00 to 0xfe (in hexadecimal) are assigned via the
Specification Required policy {{!RFC8126}}. Values with the first byte 0xff are
reserved for Private Use {{!RFC8126}}.
The "QUIC Transport Error Codes" registry governs a 62-bit space. This space is
split into three spaces that are governed by different policies. Values between
0x00 and 0x3f (in hexadecimal) are assigned via the Standards Action or IESG
Review policies {{!RFC8126}}. Values from 0x40 to 0x3fff operate on the
Specification Required policy {{!RFC8126}}. All other values are assigned to
Private Use {{!RFC8126}}.

Registrations MUST include the following fields:

Value:

: The numeric value of the assignment (registrations will be between 0x0000 and
0xfeff).
0x3fff).
MikeBishop marked this conversation as resolved.
Show resolved Hide resolved

Code:

Expand All @@ -5576,8 +5581,12 @@ Specification:

: A reference to a publicly available specification for the value.

The initial contents of this registry are shown in {{iana-error-table}}. Values
from 0xFF00 to 0xFFFF are reserved for Private Use {{!RFC8126}}.
The nominated expert(s) verify that a specification exists and is readily
accessible. Expert(s) are encouraged to be biased towards approving
registrations unless they are abusive, frivolous, or actively harmful (not
merely aesthetically displeasing, or architecturally dubious).

The initial contents of this registry are shown in {{iana-error-table}}.

| Value | Error | Description | Specification |
|:------|:--------------------------|:------------------------------|:----------------|
Expand Down