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_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 .
PROTOCORE_NS QuicTpNs QuicTp PROTOCORE_UNUSED
Module namespace.
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 .
void protocore_quic_tp_defaults(uint8_t *work, QuicTransportParams *tp)
Fill tp with the RFC 9000 sec 18.2 default values (all connection .
Dispatch table. Addressed by offset, so the layout is asserted below.
void(* defaults)(uint8_t *, QuicTransportParams *)
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
uint64_t max_idle_timeout
default 0
proto_bool has_retry_scid
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
proto_bool has_original_dcid
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
proto_bool has_initial_scid
uint64_t ack_delay_exponent
default 3
proto_bool disable_active_migration
default false
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS