78 uint64_t packets_acked,
79 std::chrono::steady_clock::time_point sent_time)
149 -> std::chrono::steady_clock::time_point
169 auto reset() noexcept ->
void;
177 auto
disable() noexcept ->
void;
199 uint64_t packets_sent_with_ect{0};
205 static constexpr uint64_t kValidationThreshold = 10;
220 uint64_t packets_acked) -> bool;
ECN (Explicit Congestion Notification) tracker (RFC 9000 Section 13.4, RFC 9002 Section 7....
auto validate_ecn(const ecn_counts &counts, uint64_t packets_acked) -> bool
Validate ECN capability based on received counts.
validation_state state_
ECN validation state.
auto get_ecn_marking() const noexcept -> ecn_marking
Get ECN marking to use for outgoing packets.
auto current_counts() const noexcept -> const ecn_counts &
Get current ECN counts.
auto last_congestion_sent_time() const noexcept -> std::chrono::steady_clock::time_point
Get the sent time when the last ECN-CE congestion was detected.
auto reset() noexcept -> void
Reset ECN tracker to initial state.
auto is_ecn_capable() const noexcept -> bool
Check if ECN is validated for use.
auto has_failed() const noexcept -> bool
Check if ECN has failed validation.
auto is_testing() const noexcept -> bool
Check if ECN is currently in testing phase.
auto process_ecn_counts(const ecn_counts &counts, uint64_t packets_acked, std::chrono::steady_clock::time_point sent_time) -> ecn_result
Process received ECN counts from an ACK_ECN frame.
auto on_packets_sent(uint64_t packet_count) noexcept -> void
Record packets sent with ECN marking.
ecn_tracker()
Default constructor.
auto disable() noexcept -> void
Disable ECN tracking.
auto ecn_result_to_string(ecn_result result) noexcept -> const char *
Convert ecn_result to string.
ecn_result
Result of ECN counts processing (RFC 9000 Section 13.4)
@ ecn_failure
ECN validation failed, should disable ECN.
@ none
No congestion signal.
@ congestion_signal
ECN-CE increased (congestion experienced)
ecn_marking
ECN marking values for IP header (RFC 3168)
@ not_ect
Not ECN-Capable Transport.
@ ect0
ECN Capable Transport (0)
@ ecn_ce
Congestion Experienced.
@ ect1
ECN Capable Transport (1)
ECN counts for ACK_ECN frames.
Internal ECN validation state.
bool failed
True if ECN validation has failed.
bool capable
True if ECN capability has been validated.
ecn_counts counts
Current ECN counts (last received)
std::chrono::steady_clock::time_point last_congestion_sent_time
Sent time of the packet that triggered the last congestion signal.
bool testing
True if still in testing phase.