|
Network System 0.1.1
High-performance modular networking library for scalable client-server applications
|
Namespaces | |
| namespace | cid_manager_error |
| namespace | connection_error |
| namespace | flow_control_error |
| Flow control error codes. | |
| namespace | quic_version |
| Well-known QUIC version numbers. | |
| namespace | stream_error |
| Stream error codes. | |
| namespace | stream_flags |
| STREAM frame type flags (bits 0-2 of type byte) | |
| namespace | stream_id_type |
| Stream ID type information. | |
| namespace | transport_param_error |
| Transport parameter error codes. | |
| namespace | transport_param_id |
| Transport parameter IDs as defined in RFC 9000 Section 18.2. | |
Classes | |
| struct | ack_frame |
| ACK frame (RFC 9000 Section 19.3) More... | |
| struct | ack_range |
| ACK Range for ACK frames. More... | |
| class | congestion_controller |
| QUIC congestion control (RFC 9002 Section 7) More... | |
| class | connection |
| QUIC connection state machine (RFC 9000 Section 5) More... | |
| struct | connection_close_frame |
| CONNECTION_CLOSE frame (RFC 9000 Section 19.19) More... | |
| class | connection_id |
| QUIC Connection ID (RFC 9000 Section 5.1) More... | |
| struct | connection_id_entry |
| Entry for storing a peer's connection ID with metadata. More... | |
| class | connection_id_manager |
| Manages peer connection IDs for QUIC connections (RFC 9000 Section 5.1) More... | |
| struct | crypto_frame |
| CRYPTO frame (RFC 9000 Section 19.6) More... | |
| struct | data_blocked_frame |
| DATA_BLOCKED frame (RFC 9000 Section 19.12) More... | |
| struct | ecn_counts |
| ECN counts for ACK_ECN frames. More... | |
| class | ecn_tracker |
| ECN (Explicit Congestion Notification) tracker (RFC 9000 Section 13.4, RFC 9002 Section 7.1) More... | |
| struct | flow_control_stats |
| Statistics for flow control monitoring. More... | |
| class | flow_controller |
| Connection-level flow control for QUIC (RFC 9000 Section 4) More... | |
| class | frame_builder |
| Builder for QUIC frames (RFC 9000 Section 12) More... | |
| class | frame_parser |
| Parser for QUIC frames (RFC 9000 Section 12) More... | |
| struct | handshake_done_frame |
| HANDSHAKE_DONE frame (RFC 9000 Section 19.20) More... | |
| class | hkdf |
| HKDF (HMAC-based Key Derivation Function) utilities (RFC 5869) More... | |
| class | initial_keys |
| Derives initial encryption keys from Destination Connection ID. More... | |
| struct | key_pair |
| A pair of read and write keys for bidirectional communication. More... | |
| struct | long_header |
| QUIC Long Header format (RFC 9000 Section 17.2) More... | |
| struct | loss_detection_result |
| Result of loss detection operations. More... | |
| class | loss_detector |
| QUIC loss detection (RFC 9002 Section 6) More... | |
| struct | max_data_frame |
| MAX_DATA frame (RFC 9000 Section 19.9) More... | |
| struct | max_stream_data_frame |
| MAX_STREAM_DATA frame (RFC 9000 Section 19.10) More... | |
| struct | max_streams_frame |
| MAX_STREAMS frame (RFC 9000 Section 19.11) More... | |
| struct | new_connection_id_frame |
| NEW_CONNECTION_ID frame (RFC 9000 Section 19.15) More... | |
| struct | new_token_frame |
| NEW_TOKEN frame (RFC 9000 Section 19.7) More... | |
| class | packet_builder |
| Builder for QUIC packet headers (RFC 9000 Section 17) More... | |
| class | packet_number |
| QUIC packet number utilities (RFC 9000 Section 17.1) More... | |
| struct | packet_number_space |
| State for each packet number space (Initial, Handshake, Application) More... | |
| class | packet_parser |
| Parser for QUIC packet headers (RFC 9000 Section 17) More... | |
| class | packet_protection |
| QUIC packet protection (encryption/decryption) (RFC 9001 Section 5) More... | |
| struct | padding_frame |
| PADDING frame (RFC 9000 Section 19.1) More... | |
| struct | path_challenge_frame |
| PATH_CHALLENGE frame (RFC 9000 Section 19.17) More... | |
| struct | path_response_frame |
| PATH_RESPONSE frame (RFC 9000 Section 19.18) More... | |
| struct | ping_frame |
| PING frame (RFC 9000 Section 19.2) More... | |
| struct | pmtud_config |
| Configuration for PMTUD controller. More... | |
| class | pmtud_controller |
| Path MTU Discovery controller for QUIC (RFC 8899 DPLPMTUD) More... | |
| struct | preferred_address_info |
| QUIC preferred address transport parameter (RFC 9000 Section 18.2) More... | |
| class | quic_crypto |
| QUIC-TLS integration handler (RFC 9001) More... | |
| struct | quic_keys |
| QUIC encryption keys for a single encryption level (RFC 9001 Section 5) More... | |
| class | replay_filter |
| Anti-replay protection for 0-RTT data. More... | |
| struct | reset_stream_frame |
| RESET_STREAM frame (RFC 9000 Section 19.4) More... | |
| struct | retire_connection_id_frame |
| RETIRE_CONNECTION_ID frame (RFC 9000 Section 19.16) More... | |
| class | rtt_estimator |
| RTT estimation for QUIC (RFC 9002 Section 5) More... | |
| struct | sent_packet |
| Information about a sent packet for loss detection (RFC 9002 Section A.1.1) More... | |
| struct | sent_packet_info |
| Information about a sent packet for loss detection. More... | |
| struct | session_ticket_info |
| Contains session ticket data for 0-RTT resumption. More... | |
| class | session_ticket_store |
| Thread-safe storage for QUIC session tickets. More... | |
| struct | short_header |
| QUIC Short Header format (RFC 9000 Section 17.3) More... | |
| struct | stop_sending_frame |
| STOP_SENDING frame (RFC 9000 Section 19.5) More... | |
| class | stream |
| QUIC stream implementation (RFC 9000 Sections 2-4) More... | |
| struct | stream_data_blocked_frame |
| STREAM_DATA_BLOCKED frame (RFC 9000 Section 19.13) More... | |
| struct | stream_frame |
| STREAM frame (RFC 9000 Section 19.8) More... | |
| class | stream_manager |
| Manages QUIC streams within a connection. More... | |
| struct | streams_blocked_frame |
| STREAMS_BLOCKED frame (RFC 9000 Section 19.14) More... | |
| struct | transport_parameters |
| QUIC transport parameters (RFC 9000 Section 18) More... | |
| class | varint |
| QUIC variable-length integer encoding/decoding (RFC 9000 Section 16) More... | |
Typedefs | |
| using | frame |
| Variant type holding any QUIC frame. | |
| using | packet_header = std::variant<long_header, short_header> |
| Variant type for packet headers. | |
Enumerations | |
| enum class | congestion_state { slow_start , congestion_avoidance , recovery } |
| States of the congestion controller (RFC 9002 Section 7) More... | |
| enum class | connection_state { idle , handshaking , connected , closing , draining , closed } |
| QUIC connection state (RFC 9000 Section 5) More... | |
| enum class | handshake_state { initial , waiting_server_hello , waiting_finished , complete } |
| TLS handshake state. More... | |
| enum class | ecn_result { none , congestion_signal , ecn_failure } |
| Result of ECN counts processing (RFC 9000 Section 13.4) More... | |
| enum class | ecn_marking : uint8_t { not_ect = 0x00 , ect1 = 0x01 , ect0 = 0x02 , ecn_ce = 0x03 } |
| ECN marking values for IP header (RFC 3168) More... | |
| enum class | frame_type : uint64_t { padding = 0x00 , ping = 0x01 , ack = 0x02 , ack_ecn = 0x03 , reset_stream = 0x04 , stop_sending = 0x05 , crypto = 0x06 , new_token = 0x07 , stream_base = 0x08 , max_data = 0x10 , max_stream_data = 0x11 , max_streams_bidi = 0x12 , max_streams_uni = 0x13 , data_blocked = 0x14 , stream_data_blocked = 0x15 , streams_blocked_bidi = 0x16 , streams_blocked_uni = 0x17 , new_connection_id = 0x18 , retire_connection_id = 0x19 , path_challenge = 0x1a , path_response = 0x1b , connection_close = 0x1c , connection_close_app = 0x1d , handshake_done = 0x1e } |
| QUIC frame types as defined in RFC 9000 Section 12.4. More... | |
| enum class | encryption_level : uint8_t { initial = 0 , handshake = 1 , zero_rtt = 2 , application = 3 } |
| QUIC encryption levels (RFC 9001 Section 4) More... | |
| enum class | loss_detection_event { none , packet_lost , pto_expired } |
| Events that can occur during loss detection. More... | |
| enum class | packet_type : uint8_t { initial = 0x00 , zero_rtt = 0x01 , handshake = 0x02 , retry = 0x03 , one_rtt = 0xFF } |
| QUIC packet types (RFC 9000 Section 17) More... | |
| enum class | pmtud_state { disabled , base , searching , search_complete , error } |
| States for DPLPMTUD state machine (RFC 8899 Section 5.2) More... | |
| enum class | send_stream_state { ready , send , data_sent , reset_sent , reset_recvd , data_recvd } |
| Stream state for sending (RFC 9000 Section 3.1) More... | |
| enum class | recv_stream_state { recv , size_known , data_recvd , reset_recvd , data_read , reset_read } |
| Stream state for receiving (RFC 9000 Section 3.2) More... | |
Functions | |
| auto | congestion_state_to_string (congestion_state state) noexcept -> const char * |
| Convert congestion state to string. | |
| auto | connection_state_to_string (connection_state state) -> const char * |
| Convert connection state to string. | |
| auto | handshake_state_to_string (handshake_state state) -> const char * |
| Convert handshake state to string. | |
| auto | ecn_result_to_string (ecn_result result) noexcept -> const char * |
| Convert ecn_result to string. | |
| auto | get_flow_control_stats (const flow_controller &fc) -> flow_control_stats |
| Get flow control statistics. | |
| constexpr auto | is_stream_frame (uint64_t type) noexcept -> bool |
| Check if a frame type value represents a STREAM frame. | |
| constexpr auto | get_stream_flags (uint64_t type) noexcept -> uint8_t |
| Extract STREAM flags from 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. | |
| auto | get_frame_type (const frame &f) -> frame_type |
| Get the frame type for a frame variant. | |
| auto | frame_type_to_string (frame_type type) -> std::string |
| Get string name for a frame type. | |
| auto | encryption_level_to_string (encryption_level level) -> std::string |
| Convert encryption level to string for debugging. | |
| constexpr auto | encryption_level_count () noexcept -> size_t |
| Get the encryption level count. | |
| auto | packet_type_to_string (packet_type type) -> std::string |
| Convert packet type to string for debugging. | |
| auto | pmtud_state_to_string (pmtud_state state) noexcept -> const char * |
| Convert PMTUD state to string. | |
| auto | send_state_to_string (send_stream_state state) -> const char * |
| Get string representation of send stream state. | |
| auto | recv_state_to_string (recv_stream_state state) -> const char * |
| Get string representation of receive stream state. | |
| auto | make_default_client_params () -> transport_parameters |
| Create default client transport parameters. | |
| auto | make_default_server_params () -> transport_parameters |
| Create default server transport parameters. | |
Variables | |
| constexpr std::array< uint8_t, 20 > | initial_salt_v1 |
| QUIC version 1 initial salt (RFC 9001 Section 5.2) | |
| constexpr std::array< uint8_t, 20 > | initial_salt_v2 |
| QUIC version 2 initial salt (RFC 9369) | |
| constexpr size_t | aes_128_key_size = 16 |
| AES-128-GCM key size in bytes. | |
| constexpr size_t | aes_256_key_size = 32 |
| AES-256-GCM key size in bytes. | |
| constexpr size_t | aead_iv_size = 12 |
| AEAD IV/nonce size in bytes. | |
| constexpr size_t | aead_tag_size = 16 |
| AEAD authentication tag size in bytes. | |
| constexpr size_t | secret_size = 32 |
| Traffic secret size (SHA-256 output) | |
| constexpr size_t | hp_key_size = 16 |
| Header protection key size for AES-128. | |
| constexpr size_t | hp_sample_size = 16 |
| Header protection sample size. | |
| constexpr uint64_t | varint_max = 4611686018427387903ULL |
| Maximum value that can be encoded in QUIC variable-length integer. | |
Variant type holding any QUIC frame.
Definition at line 366 of file frame_types.h.
| using kcenon::network::protocols::quic::packet_header = std::variant<long_header, short_header> |
|
strong |
States of the congestion controller (RFC 9002 Section 7)
| Enumerator | |
|---|---|
| slow_start | Exponential growth of cwnd. |
| congestion_avoidance | Linear growth of cwnd. |
| recovery | Congestion recovery after loss. |
Definition at line 22 of file congestion_controller.h.
|
strong |
QUIC connection state (RFC 9000 Section 5)
Definition at line 42 of file connection.h.
|
strong |
ECN marking values for IP header (RFC 3168)
| Enumerator | |
|---|---|
| not_ect | Not ECN-Capable Transport. |
| ect1 | ECN Capable Transport (1) |
| ect0 | ECN Capable Transport (0) |
| ecn_ce | Congestion Experienced. |
Definition at line 35 of file ecn_tracker.h.
|
strong |
Result of ECN counts processing (RFC 9000 Section 13.4)
| Enumerator | |
|---|---|
| none | No congestion signal. |
| congestion_signal | ECN-CE increased (congestion experienced) |
| ecn_failure | ECN validation failed, should disable ECN. |
Definition at line 19 of file ecn_tracker.h.
|
strong |
QUIC encryption levels (RFC 9001 Section 4)
QUIC uses four encryption levels, each with different key material:
| Enumerator | |
|---|---|
| initial | Initial encryption (derived from DCID) |
| handshake | Handshake encryption. |
| zero_rtt | 0-RTT early data encryption |
| application | 1-RTT application data encryption |
Definition at line 53 of file keys.h.
|
strong |
QUIC frame types as defined in RFC 9000 Section 12.4.
Frame types indicate which fields are present in a frame. Some frame types use the low-order bits to encode specific flags.
Definition at line 24 of file frame_types.h.
|
strong |
TLS handshake state.
| Enumerator | |
|---|---|
| initial | Not started. |
| waiting_server_hello | Client waiting for ServerHello. |
| waiting_finished | Waiting for peer's Finished. |
| complete | Handshake complete. |
Definition at line 55 of file connection.h.
|
strong |
Events that can occur during loss detection.
| Enumerator | |
|---|---|
| none | No event. |
| packet_lost | Packet(s) declared lost. |
| pto_expired | Probe timeout expired. |
Definition at line 53 of file loss_detector.h.
|
strong |
QUIC packet types (RFC 9000 Section 17)
Long header packets (used during handshake):
Short header packets (used after handshake):
| Enumerator | |
|---|---|
| initial | |
| zero_rtt | |
| handshake | |
| retry | |
| one_rtt | |
|
strong |
States for DPLPMTUD state machine (RFC 8899 Section 5.2)
Definition at line 18 of file pmtud_controller.h.
|
strong |
Stream state for receiving (RFC 9000 Section 3.2)
Definition at line 114 of file stream.h.
|
strong |
Stream state for sending (RFC 9000 Section 3.1)
Definition at line 101 of file stream.h.
|
nodiscardnoexcept |
Convert congestion state to string.
Definition at line 13 of file congestion_controller.cpp.
References congestion_avoidance, recovery, and slow_start.
|
nodiscard |
Convert connection state to string.
Definition at line 21 of file connection.cpp.
References closed, closing, connected, draining, handshaking, and idle.
Referenced by kcenon::network::protocols::quic::connection::receive_packet().

|
nodiscardnoexcept |
Convert ecn_result to string.
Definition at line 10 of file ecn_tracker.cpp.
References congestion_signal, ecn_failure, and none.
|
nodiscardconstexprnoexcept |
|
nodiscard |
Convert encryption level to string for debugging.
| level | Encryption level to convert |
Definition at line 13 of file keys.cpp.
References application, handshake, initial, and zero_rtt.
Referenced by kcenon::network::protocols::quic::quic_crypto::get_read_keys(), and kcenon::network::protocols::quic::quic_crypto::get_write_keys().

|
nodiscard |
Get string name for a frame type.
Definition at line 80 of file frame.cpp.
References ack, ack_ecn, connection_close, connection_close_app, crypto, data_blocked, handshake_done, max_data, max_stream_data, max_streams_bidi, max_streams_uni, new_connection_id, new_token, padding, path_challenge, path_response, ping, reset_stream, retire_connection_id, stop_sending, stream_base, stream_data_blocked, streams_blocked_bidi, and streams_blocked_uni.
|
nodiscard |
Get flow control statistics.
| fc | Flow controller to query |
Definition at line 174 of file flow_control.cpp.
References kcenon::network::protocols::quic::flow_control_stats::bytes_consumed, kcenon::network::protocols::quic::flow_control_stats::bytes_received, kcenon::network::protocols::quic::flow_control_stats::bytes_sent, kcenon::network::protocols::quic::flow_control_stats::receive_limit, kcenon::network::protocols::quic::flow_control_stats::receive_window_available, kcenon::network::protocols::quic::flow_control_stats::send_blocked, kcenon::network::protocols::quic::flow_control_stats::send_limit, and kcenon::network::protocols::quic::flow_control_stats::send_window_available.
|
nodiscard |
Get the frame type for a frame variant.
Definition at line 28 of file frame.cpp.
References ack, ack_ecn, connection_close, connection_close_app, crypto, data_blocked, handshake_done, max_data, max_stream_data, max_streams_bidi, max_streams_uni, new_connection_id, new_token, padding, path_challenge, path_response, ping, reset_stream, retire_connection_id, stop_sending, stream_base, stream_data_blocked, streams_blocked_bidi, and streams_blocked_uni.
|
nodiscardconstexprnoexcept |
Extract STREAM flags from frame type.
Definition at line 81 of file frame_types.h.
References kcenon::network::protocols::quic::stream_flags::mask.
Referenced by kcenon::network::protocols::quic::frame_parser::parse().

|
nodiscard |
Convert handshake state to string.
Definition at line 42 of file connection.cpp.
References complete, initial, waiting_finished, and waiting_server_hello.
|
nodiscardconstexprnoexcept |
Check if a frame type value represents a STREAM frame.
Definition at line 73 of file frame_types.h.
Referenced by kcenon::network::protocols::quic::frame_parser::parse().

|
nodiscard |
Create default client transport parameters.
Definition at line 640 of file transport_params.cpp.
References kcenon::network::protocols::quic::transport_parameters::ack_delay_exponent, kcenon::network::protocols::quic::transport_parameters::active_connection_id_limit, kcenon::network::protocols::quic::transport_parameters::initial_max_data, kcenon::network::protocols::quic::transport_parameters::initial_max_stream_data_bidi_local, kcenon::network::protocols::quic::transport_parameters::initial_max_stream_data_bidi_remote, kcenon::network::protocols::quic::transport_parameters::initial_max_stream_data_uni, kcenon::network::protocols::quic::transport_parameters::initial_max_streams_bidi, kcenon::network::protocols::quic::transport_parameters::initial_max_streams_uni, kcenon::network::protocols::quic::transport_parameters::max_ack_delay, kcenon::network::protocols::quic::transport_parameters::max_idle_timeout, and kcenon::network::protocols::quic::transport_parameters::max_udp_payload_size.
Referenced by kcenon::network::protocols::quic::connection::connection().

|
nodiscard |
Create default server transport parameters.
Definition at line 660 of file transport_params.cpp.
References kcenon::network::protocols::quic::transport_parameters::ack_delay_exponent, kcenon::network::protocols::quic::transport_parameters::active_connection_id_limit, kcenon::network::protocols::quic::transport_parameters::initial_max_data, kcenon::network::protocols::quic::transport_parameters::initial_max_stream_data_bidi_local, kcenon::network::protocols::quic::transport_parameters::initial_max_stream_data_bidi_remote, kcenon::network::protocols::quic::transport_parameters::initial_max_stream_data_uni, kcenon::network::protocols::quic::transport_parameters::initial_max_streams_bidi, kcenon::network::protocols::quic::transport_parameters::initial_max_streams_uni, kcenon::network::protocols::quic::transport_parameters::max_ack_delay, kcenon::network::protocols::quic::transport_parameters::max_idle_timeout, and kcenon::network::protocols::quic::transport_parameters::max_udp_payload_size.
Referenced by kcenon::network::protocols::quic::connection::connection().

|
nodiscardconstexprnoexcept |
Build STREAM frame type from flags.
Definition at line 89 of file frame_types.h.
References kcenon::network::protocols::quic::stream_flags::base, kcenon::network::protocols::quic::stream_flags::fin, kcenon::network::protocols::quic::stream_flags::len, and kcenon::network::protocols::quic::stream_flags::off.
Referenced by kcenon::network::protocols::quic::frame_builder::build_stream().

|
nodiscard |
Convert packet type to string for debugging.
Definition at line 43 of file packet.cpp.
References handshake, initial, one_rtt, retry, and zero_rtt.
|
nodiscardnoexcept |
Convert PMTUD state to string.
Definition at line 12 of file pmtud_controller.cpp.
References base, disabled, error, search_complete, and searching.
|
nodiscard |
Get string representation of receive stream state.
Definition at line 498 of file stream.cpp.
References data_read, data_recvd, recv, reset_read, reset_recvd, and size_known.
|
nodiscard |
Get string representation of send stream state.
Definition at line 485 of file stream.cpp.
References data_recvd, data_sent, ready, reset_recvd, reset_sent, and send.
|
constexpr |
AEAD IV/nonce size in bytes.
Definition at line 25 of file keys.h.
Referenced by kcenon::network::protocols::quic::initial_keys::derive_keys(), and kcenon::network::protocols::quic::packet_protection::make_nonce().
|
constexpr |
AEAD authentication tag size in bytes.
Definition at line 28 of file keys.h.
Referenced by kcenon::network::protocols::quic::packet_protection::protect(), and kcenon::network::protocols::quic::packet_protection::unprotect().
|
constexpr |
AES-128-GCM key size in bytes.
Definition at line 19 of file keys.h.
Referenced by kcenon::network::protocols::quic::initial_keys::derive_keys().
|
constexpr |
|
constexpr |
Header protection key size for AES-128.
Definition at line 34 of file keys.h.
Referenced by kcenon::network::protocols::quic::initial_keys::derive_keys().
|
constexpr |
Header protection sample size.
Definition at line 37 of file keys.h.
Referenced by kcenon::network::protocols::quic::packet_protection::generate_hp_mask(), and kcenon::network::internal::quic_socket::handle_packet().
|
constexpr |
QUIC version 1 initial salt (RFC 9001 Section 5.2)
This salt is used to derive the initial secrets from the Destination Connection ID. It is a fixed value defined in the RFC.
Definition at line 36 of file crypto.h.
Referenced by kcenon::network::protocols::quic::initial_keys::derive(), and kcenon::network::protocols::quic::quic_crypto::derive_zero_rtt_keys().
|
constexpr |
QUIC version 2 initial salt (RFC 9369)
Definition at line 44 of file crypto.h.
Referenced by kcenon::network::protocols::quic::initial_keys::derive().
|
constexpr |
Traffic secret size (SHA-256 output)
Definition at line 31 of file keys.h.
Referenced by kcenon::network::protocols::quic::initial_keys::derive(), kcenon::network::protocols::quic::quic_crypto::derive_zero_rtt_keys(), and kcenon::network::protocols::quic::quic_crypto::update_keys().
|
constexpr |
Maximum value that can be encoded in QUIC variable-length integer.
This is 2^62 - 1, the maximum 62-bit unsigned integer.
Definition at line 21 of file varint.h.
Referenced by kcenon::network::protocols::quic::varint::encode(), kcenon::network::protocols::quic::varint::encode_with_length(), and kcenon::network::protocols::quic::varint::is_valid().