4#ifndef PROTOCORE_QUIC_TP_H
5#define PROTOCORE_QUIC_TP_H
39#define QUIC_TP_ORIGINAL_DCID 0x00
40#define QUIC_TP_MAX_IDLE_TIMEOUT 0x01
41#define QUIC_TP_STATELESS_RESET_TOKEN 0x02
42#define QUIC_TP_MAX_UDP_PAYLOAD_SIZE 0x03
43#define QUIC_TP_INITIAL_MAX_DATA 0x04
44#define QUIC_TP_INITIAL_MAX_SD_BIDI_LOCAL 0x05
45#define QUIC_TP_INITIAL_MAX_SD_BIDI_REMOTE 0x06
46#define QUIC_TP_INITIAL_MAX_SD_UNI 0x07
47#define QUIC_TP_INITIAL_MAX_STREAMS_BIDI 0x08
48#define QUIC_TP_INITIAL_MAX_STREAMS_UNI 0x09
49#define QUIC_TP_ACK_DELAY_EXPONENT 0x0a
50#define QUIC_TP_MAX_ACK_DELAY 0x0b
51#define QUIC_TP_DISABLE_ACTIVE_MIGRATION 0x0c
52#define QUIC_TP_ACTIVE_CID_LIMIT 0x0e
53#define QUIC_TP_INITIAL_SCID 0x0f
54#define QUIC_TP_RETRY_SCID 0x10
#define PROTOCORE_UNUSED
Suppress the unused warning. Every module ends in a namespace most callers only partly use.
#define PROTOCORE_NS_LAYOUT(T,...)
Pin every dispatch slot of a table that is nothing but function pointers.
#define PROTOCORE_NS
Storage for a dispatch table. The const is load bearing.
QUIC packet headers and packet-number coding (RFC 9000 sec 17).
#define QUIC_MAX_CID_LEN
maximum connection-ID length in QUIC version 1
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 .
void protocore_quic_tp_defaults(const uint8_t *work, QuicTransportParams *tp)
Fill tp with the RFC 9000 sec 18.2 default values (all connection .
embed_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 .
Dispatch table. Addressed by offset, so the layout is asserted below.
void(* defaults)(const uint8_t *, QuicTransportParams *)
embed_bool(* parse)(uint8_t *, const uint8_t *, size_t, QuicTransportParams *)
size_t(* encode)(uint8_t *, const QuicTransportParams *, uint8_t *, size_t)
The transport parameters we encode / decode, with RFC 9000 sec 18.2 defaults applied.
uint64_t initial_max_streams_uni
default 0
uint64_t initial_max_data
default 0
uint8_t original_dcid_len
uint64_t initial_max_sd_uni
default 0
embed_bool disable_active_migration
default false
embed_bool has_retry_scid
embed_bool has_initial_scid
embed_bool has_original_dcid
uint8_t original_dcid[QUIC_MAX_CID_LEN]
uint8_t retry_scid[QUIC_MAX_CID_LEN]
uint64_t max_idle_timeout
default 0
uint64_t max_ack_delay
default 25 (ms)
uint64_t initial_max_streams_bidi
default 0
uint64_t initial_max_sd_bidi_remote
default 0
uint64_t max_udp_payload_size
default 65527
uint64_t initial_max_sd_bidi_local
default 0
uint64_t active_connection_id_limit
default 2
uint8_t initial_scid[QUIC_MAX_CID_LEN]
uint64_t ack_delay_exponent
default 3