target = "https://www.rfc-editor.org/rfc/rfc9000#section-5.1.1"

# 5.1.1.  Issuing Connection IDs
#
# Each connection ID has an associated sequence number to assist in
# detecting when NEW_CONNECTION_ID or RETIRE_CONNECTION_ID frames refer
# to the same value.  The initial connection ID issued by an endpoint
# is sent in the Source Connection ID field of the long packet header
# (Section 17.2) during the handshake.  The sequence number of the
# initial connection ID is 0.  If the preferred_address transport
# parameter is sent, the sequence number of the supplied connection ID
# is 1.
# 
# Additional connection IDs are communicated to the peer using
# NEW_CONNECTION_ID frames (Section 19.15).  The sequence number on
# each newly issued connection ID MUST increase by 1.  The connection
# ID that a client selects for the first Destination Connection ID
# field it sends and any connection ID provided by a Retry packet are
# not assigned sequence numbers.
# 
# When an endpoint issues a connection ID, it MUST accept packets that
# carry this connection ID for the duration of the connection or until
# its peer invalidates the connection ID via a RETIRE_CONNECTION_ID
# frame (Section 19.16).  Connection IDs that are issued and not
# retired are considered active; any active connection ID is valid for
# use with the current connection at any time, in any packet type.
# This includes the connection ID issued by the server via the
# preferred_address transport parameter.
# 
# An endpoint SHOULD ensure that its peer has a sufficient number of
# available and unused connection IDs.  Endpoints advertise the number
# of active connection IDs they are willing to maintain using the
# active_connection_id_limit transport parameter.  An endpoint MUST NOT
# provide more connection IDs than the peer's limit.  An endpoint MAY
# send connection IDs that temporarily exceed a peer's limit if the
# NEW_CONNECTION_ID frame also requires the retirement of any excess,
# by including a sufficiently large value in the Retire Prior To field.
# 
# A NEW_CONNECTION_ID frame might cause an endpoint to add some active
# connection IDs and retire others based on the value of the Retire
# Prior To field.  After processing a NEW_CONNECTION_ID frame and
# adding and retiring active connection IDs, if the number of active
# connection IDs exceeds the value advertised in its
# active_connection_id_limit transport parameter, an endpoint MUST
# close the connection with an error of type CONNECTION_ID_LIMIT_ERROR.
# 
# An endpoint SHOULD supply a new connection ID when the peer retires a
# connection ID.  If an endpoint provided fewer connection IDs than the
# peer's active_connection_id_limit, it MAY supply a new connection ID
# when it receives a packet with a previously unused connection ID.  An
# endpoint MAY limit the total number of connection IDs issued for each
# connection to avoid the risk of running out of connection IDs; see
# Section 10.3.2.  An endpoint MAY also limit the issuance of
# connection IDs to reduce the amount of per-path state it maintains,
# such as path validation status, as its peer might interact with it
# over as many paths as there are issued connection IDs.
# 
# An endpoint that initiates migration and requires non-zero-length
# connection IDs SHOULD ensure that the pool of connection IDs
# available to its peer allows the peer to use a new connection ID on
# migration, as the peer will be unable to respond if the pool is
# exhausted.
# 
# An endpoint that selects a zero-length connection ID during the
# handshake cannot issue a new connection ID.  A zero-length
# Destination Connection ID field is used in all packets sent toward
# such an endpoint over any network path.

[[spec]]
level = "MUST"
quote = '''
The sequence number on
each newly issued connection ID MUST increase by 1.
'''

[[spec]]
level = "MUST"
quote = '''
When an endpoint issues a connection ID, it MUST accept packets that
carry this connection ID for the duration of the connection or until
its peer invalidates the connection ID via a RETIRE_CONNECTION_ID
frame (Section 19.16).
'''

[[spec]]
level = "SHOULD"
quote = '''
An endpoint SHOULD ensure that its peer has a sufficient number of
available and unused connection IDs.
'''

[[spec]]
level = "MUST"
quote = '''
An endpoint MUST NOT
provide more connection IDs than the peer's limit.
'''

[[spec]]
level = "MAY"
quote = '''
An endpoint MAY
send connection IDs that temporarily exceed a peer's limit if the
NEW_CONNECTION_ID frame also requires the retirement of any excess,
by including a sufficiently large value in the Retire Prior To field.
'''

[[spec]]
level = "MUST"
quote = '''
After processing a NEW_CONNECTION_ID frame and
adding and retiring active connection IDs, if the number of active
connection IDs exceeds the value advertised in its
active_connection_id_limit transport parameter, an endpoint MUST
close the connection with an error of type CONNECTION_ID_LIMIT_ERROR.
'''

[[spec]]
level = "SHOULD"
quote = '''
An endpoint SHOULD supply a new connection ID when the peer retires a
connection ID.
'''

[[spec]]
level = "MAY"
quote = '''
If an endpoint provided fewer connection IDs than the
peer's active_connection_id_limit, it MAY supply a new connection ID
when it receives a packet with a previously unused connection ID.
'''

[[spec]]
level = "MAY"
quote = '''
An
endpoint MAY limit the total number of connection IDs issued for each
connection to avoid the risk of running out of connection IDs; see
Section 10.3.2.
'''

[[spec]]
level = "MAY"
quote = '''
An endpoint MAY also limit the issuance of
connection IDs to reduce the amount of per-path state it maintains,
such as path validation status, as its peer might interact with it
over as many paths as there are issued connection IDs.
'''

[[spec]]
level = "SHOULD"
quote = '''
An endpoint that initiates migration and requires non-zero-length
connection IDs SHOULD ensure that the pool of connection IDs
available to its peer allows the peer to use a new connection ID on
migration, as the peer will be unable to respond if the pool is
exhausted.
'''