63 constexpr uint8_t
fin = 0x01;
64 constexpr uint8_t
len = 0x02;
65 constexpr uint8_t
off = 0x04;
66 constexpr uint8_t
mask = 0x07;
67 constexpr uint8_t
base = 0x08;
75 return (type >= 0x08 && type <= 0x0f);
90 bool has_offset)
noexcept -> uint8_t
155 std::optional<ecn_counts>
ecn;
constexpr uint8_t fin
Stream is finished.
constexpr uint8_t len
Length field present.
constexpr uint8_t mask
Mask for all flags.
constexpr uint8_t base
Base type for STREAM frames.
constexpr uint8_t off
Offset field present.
constexpr auto is_stream_frame(uint64_t type) noexcept -> bool
Check if a frame type value represents a STREAM frame.
auto frame_type_to_string(frame_type type) -> std::string
Get string name for a frame type.
constexpr auto make_stream_type(bool has_fin, bool has_length, bool has_offset) noexcept -> uint8_t
Build STREAM frame type from flags.
frame_type
QUIC frame types as defined in RFC 9000 Section 12.4.
std::variant< padding_frame, ping_frame, ack_frame, reset_stream_frame, stop_sending_frame, crypto_frame, new_token_frame, stream_frame, max_data_frame, max_stream_data_frame, max_streams_frame, data_blocked_frame, stream_data_blocked_frame, streams_blocked_frame, new_connection_id_frame, retire_connection_id_frame, path_challenge_frame, path_response_frame, connection_close_frame, handshake_done_frame > frame
Variant type holding any QUIC frame.
auto get_frame_type(const frame &f) -> frame_type
Get the frame type for a frame variant.
constexpr auto get_stream_flags(uint64_t type) noexcept -> uint8_t
Extract STREAM flags from frame type.
ACK frame (RFC 9000 Section 19.3)
uint64_t ack_delay
Time since receiving largest_acknowledged (encoded)
std::optional< ecn_counts > ecn
ECN counts (for ACK_ECN frames)
uint64_t largest_acknowledged
Largest packet number acknowledged.
std::vector< ack_range > ranges
Additional ACK ranges.
ACK Range for ACK frames.
uint64_t gap
Number of contiguous unacknowledged packets.
uint64_t length
Number of contiguous acknowledged packets.
CONNECTION_CLOSE frame (RFC 9000 Section 19.19)
uint64_t error_code
Error code indicating reason.
std::string reason_phrase
Human-readable reason.
bool is_application_error
True if application-level error.
CRYPTO frame (RFC 9000 Section 19.6)
uint64_t offset
Byte offset in crypto stream.
std::vector< uint8_t > data
Cryptographic handshake data.
DATA_BLOCKED frame (RFC 9000 Section 19.12)
uint64_t maximum_data
Connection-level limit at which blocking occurred.
ECN counts for ACK_ECN frames.
uint64_t ect1
ECT(1) count.
uint64_t ect0
ECT(0) count.
uint64_t ecn_ce
ECN-CE count.
HANDSHAKE_DONE frame (RFC 9000 Section 19.20)
MAX_DATA frame (RFC 9000 Section 19.9)
uint64_t maximum_data
Maximum data that can be sent.
MAX_STREAM_DATA frame (RFC 9000 Section 19.10)
uint64_t maximum_stream_data
Maximum stream data.
uint64_t stream_id
Stream identifier.
MAX_STREAMS frame (RFC 9000 Section 19.11)
uint64_t maximum_streams
Maximum number of streams.
bool bidirectional
True for bidi, false for uni.
NEW_CONNECTION_ID frame (RFC 9000 Section 19.15)
std::vector< uint8_t > connection_id
Connection ID (1-20 bytes)
uint64_t sequence_number
Sequence number for this CID.
std::array< uint8_t, 16 > stateless_reset_token
Stateless reset token.
uint64_t retire_prior_to
CIDs below this should be retired.
NEW_TOKEN frame (RFC 9000 Section 19.7)
std::vector< uint8_t > token
Opaque token.
PADDING frame (RFC 9000 Section 19.1)
size_t count
Number of padding bytes.
PATH_CHALLENGE frame (RFC 9000 Section 19.17)
std::array< uint8_t, 8 > data
Arbitrary 8-byte data.
PATH_RESPONSE frame (RFC 9000 Section 19.18)
std::array< uint8_t, 8 > data
Data from PATH_CHALLENGE.
PING frame (RFC 9000 Section 19.2)
RESET_STREAM frame (RFC 9000 Section 19.4)
uint64_t application_error_code
Application error code.
uint64_t final_size
Final size of stream.
uint64_t stream_id
Stream identifier.
RETIRE_CONNECTION_ID frame (RFC 9000 Section 19.16)
uint64_t sequence_number
Sequence number of CID to retire.
STOP_SENDING frame (RFC 9000 Section 19.5)
uint64_t application_error_code
Application error code.
uint64_t stream_id
Stream identifier.
STREAM_DATA_BLOCKED frame (RFC 9000 Section 19.13)
uint64_t maximum_stream_data
Stream-level limit at which blocking occurred.
uint64_t stream_id
Stream identifier.
STREAM frame (RFC 9000 Section 19.8)
std::vector< uint8_t > data
Stream data.
uint64_t stream_id
Stream identifier.
uint64_t offset
Byte offset in stream (0 if not present)
bool fin
True if this is the final data.
STREAMS_BLOCKED frame (RFC 9000 Section 19.14)
uint64_t maximum_streams
Stream limit at which blocking occurred.
bool bidirectional
True for bidi, false for uni.