|
ProtoCore v1.0.16
Deterministic, zero-heap network stack for embedded targets
|
QUIC transport parameters (RFC 9000 sec 18) carried in the TLS quic_transport_parameters extension (RFC 9001 sec 8.2). More...
#include "network_drivers/presentation/http/http3/quic_packet/quic_packet.h"#include "protocore_config.h"Go to the source code of this file.
Classes | |
| struct | QuicTransportParams |
| The transport parameters we encode / decode, with RFC 9000 sec 18.2 defaults applied. More... | |
| struct | QuicTpNs |
| Dispatch table. Addressed by offset, so the layout is asserted below. More... | |
Macros | |
| #define | QUIC_TP_ORIGINAL_DCID 0x00 |
| Transport parameter identifiers (RFC 9000 sec 18.2 / Table 7). | |
| #define | QUIC_TP_MAX_IDLE_TIMEOUT 0x01 |
| varint, milliseconds (0 = disabled) | |
| #define | QUIC_TP_STATELESS_RESET_TOKEN 0x02 |
| 16 bytes (server only) | |
| #define | QUIC_TP_MAX_UDP_PAYLOAD_SIZE 0x03 |
| varint, default 65527, min 1200 | |
| #define | QUIC_TP_INITIAL_MAX_DATA 0x04 |
| varint, connection flow-control window | |
| #define | QUIC_TP_INITIAL_MAX_SD_BIDI_LOCAL 0x05 |
| varint | |
| #define | QUIC_TP_INITIAL_MAX_SD_BIDI_REMOTE 0x06 |
| varint | |
| #define | QUIC_TP_INITIAL_MAX_SD_UNI 0x07 |
| varint | |
| #define | QUIC_TP_INITIAL_MAX_STREAMS_BIDI 0x08 |
| varint | |
| #define | QUIC_TP_INITIAL_MAX_STREAMS_UNI 0x09 |
| varint | |
| #define | QUIC_TP_ACK_DELAY_EXPONENT 0x0a |
| varint, default 3, max 20 | |
| #define | QUIC_TP_MAX_ACK_DELAY 0x0b |
| varint, default 25, < 2^14 | |
| #define | QUIC_TP_DISABLE_ACTIVE_MIGRATION 0x0c |
| zero-length flag | |
| #define | QUIC_TP_ACTIVE_CID_LIMIT 0x0e |
| varint, default 2, min 2 | |
| #define | QUIC_TP_INITIAL_SCID 0x0f |
| SCID of this endpoint's first Initial. | |
| #define | QUIC_TP_RETRY_SCID 0x10 |
| server: SCID of a Retry it sent | |
Functions | |
| PROTOCORE_NS_LAYOUT (QuicTpNs, defaults, encode, parse) | |
| void | protocore_quic_tp_defaults (uint8_t *work, QuicTransportParams *tp) |
| Fill tp with the RFC 9000 sec 18.2 default values (all connection . | |
| size_t | protocore_quic_tp_encode (uint8_t *work, const QuicTransportParams *tp, uint8_t *out, size_t cap) |
| Encode the server's transport parameters into out. Emits, in . | |
| proto_bool | protocore_quic_tp_parse (uint8_t *work, const uint8_t *buf, size_t len, QuicTransportParams *tp) |
| Parse a peer's transport parameters (starting from the spec . | |
Variables | |
| PROTOCORE_NS QuicTpNs QuicTp | PROTOCORE_UNUSED |
| Module namespace. | |
QUIC transport parameters (RFC 9000 sec 18) carried in the TLS quic_transport_parameters extension (RFC 9001 sec 8.2).
Each endpoint states its transport limits (flow-control windows, stream limits, idle timeout, and the connection IDs used during the handshake) as a sequence of ID (varint) | Length (varint) | Value parameters. The server carries its parameters in the EncryptedExtensions message and reads the client's from the ClientHello. This module encodes the set a minimal server advertises and parses a peer's, applying the RFC 9000 sec 18.2 defaults and rejecting malformed or illegal values (bad varints, oversized connection IDs, a duplicated parameter, out-of-range limits).
Pure, zero heap, host-tested (round-trip + the spec defaults + malformed-input rejection).
work is bytes the CALLER holds. This module reads none of them: it carries nothing between calls, so there is no state to keep and nothing to wipe. The parameter is there so a caller drives every namespace the same way.
Definition in file quic_tp.h.
| #define QUIC_TP_ORIGINAL_DCID 0x00 |
| #define QUIC_TP_MAX_IDLE_TIMEOUT 0x01 |
| #define QUIC_TP_STATELESS_RESET_TOKEN 0x02 |
| #define QUIC_TP_MAX_UDP_PAYLOAD_SIZE 0x03 |
| #define QUIC_TP_INITIAL_MAX_DATA 0x04 |
| #define QUIC_TP_ACK_DELAY_EXPONENT 0x0a |
| #define QUIC_TP_MAX_ACK_DELAY 0x0b |
| #define QUIC_TP_DISABLE_ACTIVE_MIGRATION 0x0c |
| #define QUIC_TP_ACTIVE_CID_LIMIT 0x0e |
| #define QUIC_TP_INITIAL_SCID 0x0f |
| #define QUIC_TP_RETRY_SCID 0x10 |
| PROTOCORE_NS_LAYOUT | ( | QuicTpNs | , |
| defaults | , | ||
| encode | , | ||
| parse | |||
| ) |
| void protocore_quic_tp_defaults | ( | uint8_t * | work, |
| QuicTransportParams * | tp | ||
| ) |
Fill tp with the RFC 9000 sec 18.2 default values (all connection .
| work | PROTOCORE_QUIC_TP_BORROW bytes the caller took. Not held past the call. |
| tp | Tp |
| size_t protocore_quic_tp_encode | ( | uint8_t * | work, |
| const QuicTransportParams * | tp, | ||
| uint8_t * | out, | ||
| size_t | cap | ||
| ) |
Encode the server's transport parameters into out. Emits, in .
| work | PROTOCORE_QUIC_TP_BORROW bytes the caller took. Not held past the call. |
| tp | Tp |
| out | Out |
| cap | Cap |
| proto_bool protocore_quic_tp_parse | ( | uint8_t * | work, |
| const uint8_t * | buf, | ||
| size_t | len, | ||
| QuicTransportParams * | tp | ||
| ) |
Parse a peer's transport parameters (starting from the spec .
| work | PROTOCORE_QUIC_TP_BORROW bytes the caller took. Not held past the call. |
| buf | Buf |
| len | Len |
| tp | Tp |
| PROTOCORE_NS QuicTpNs QuicTp PROTOCORE_UNUSED |
Module namespace.