#include "quiche/quic/core/quic_unacked_packet_map.h"
#include <cstddef>
#include <limits>
#include <type_traits>
#include <utility>
#include "absl/container/inlined_vector.h"
#include "quiche/quic/core/quic_connection_stats.h"
#include "quiche/quic/core/quic_packet_number.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/core/quic_utils.h"
#include "quiche/quic/platform/api/quic_bug_tracker.h"
#include "quiche/quic/platform/api/quic_flag_utils.h"
namespace quic {
namespace {
bool WillStreamFrameLengthSumWrapAround(QuicPacketLength lhs,
QuicPacketLength rhs) { … }
enum QuicFrameTypeBitfield : uint32_t { … };
QuicFrameTypeBitfield GetFrameTypeBitfield(QuicFrameType type) { … }
}
QuicUnackedPacketMap::QuicUnackedPacketMap(Perspective perspective)
: … { … }
QuicUnackedPacketMap::~QuicUnackedPacketMap() { … }
const QuicTransmissionInfo& QuicUnackedPacketMap::AddDispatcherSentPacket(
const DispatcherSentPacket& packet) { … }
void QuicUnackedPacketMap::AddSentPacket(SerializedPacket* mutable_packet,
TransmissionType transmission_type,
QuicTime sent_time, bool set_in_flight,
bool measure_rtt,
QuicEcnCodepoint ecn_codepoint) { … }
void QuicUnackedPacketMap::RemoveObsoletePackets() { … }
bool QuicUnackedPacketMap::HasRetransmittableFrames(
QuicPacketNumber packet_number) const { … }
bool QuicUnackedPacketMap::HasRetransmittableFrames(
const QuicTransmissionInfo& info) const { … }
void QuicUnackedPacketMap::RemoveRetransmittability(
QuicTransmissionInfo* info) { … }
void QuicUnackedPacketMap::RemoveRetransmittability(
QuicPacketNumber packet_number) { … }
void QuicUnackedPacketMap::IncreaseLargestAcked(
QuicPacketNumber largest_acked) { … }
void QuicUnackedPacketMap::MaybeUpdateLargestAckedOfPacketNumberSpace(
PacketNumberSpace packet_number_space, QuicPacketNumber packet_number) { … }
bool QuicUnackedPacketMap::IsPacketUsefulForMeasuringRtt(
QuicPacketNumber packet_number, const QuicTransmissionInfo& info) const { … }
bool QuicUnackedPacketMap::IsPacketUsefulForCongestionControl(
const QuicTransmissionInfo& info) const { … }
bool QuicUnackedPacketMap::IsPacketUsefulForRetransmittableData(
const QuicTransmissionInfo& info) const { … }
bool QuicUnackedPacketMap::IsPacketUseless(
QuicPacketNumber packet_number, const QuicTransmissionInfo& info) const { … }
bool QuicUnackedPacketMap::IsUnacked(QuicPacketNumber packet_number) const { … }
void QuicUnackedPacketMap::RemoveFromInFlight(QuicTransmissionInfo* info) { … }
void QuicUnackedPacketMap::RemoveFromInFlight(QuicPacketNumber packet_number) { … }
absl::InlinedVector<QuicPacketNumber, 2>
QuicUnackedPacketMap::NeuterUnencryptedPackets() { … }
absl::InlinedVector<QuicPacketNumber, 2>
QuicUnackedPacketMap::NeuterHandshakePackets() { … }
bool QuicUnackedPacketMap::HasInFlightPackets() const { … }
const QuicTransmissionInfo& QuicUnackedPacketMap::GetTransmissionInfo(
QuicPacketNumber packet_number) const { … }
QuicTransmissionInfo* QuicUnackedPacketMap::GetMutableTransmissionInfo(
QuicPacketNumber packet_number) { … }
QuicTime QuicUnackedPacketMap::GetLastInFlightPacketSentTime() const { … }
QuicTime QuicUnackedPacketMap::GetLastCryptoPacketSentTime() const { … }
size_t QuicUnackedPacketMap::GetNumUnackedPacketsDebugOnly() const { … }
bool QuicUnackedPacketMap::HasMultipleInFlightPackets() const { … }
bool QuicUnackedPacketMap::HasPendingCryptoPackets() const { … }
bool QuicUnackedPacketMap::HasUnackedRetransmittableFrames() const { … }
QuicPacketNumber QuicUnackedPacketMap::GetLeastUnacked() const { … }
void QuicUnackedPacketMap::SetSessionNotifier(
SessionNotifierInterface* session_notifier) { … }
bool QuicUnackedPacketMap::NotifyFramesAcked(const QuicTransmissionInfo& info,
QuicTime::Delta ack_delay,
QuicTime receive_timestamp) { … }
void QuicUnackedPacketMap::NotifyFramesLost(const QuicTransmissionInfo& info,
TransmissionType ) { … }
bool QuicUnackedPacketMap::RetransmitFrames(const QuicFrames& frames,
TransmissionType type) { … }
void QuicUnackedPacketMap::MaybeAggregateAckedStreamFrame(
const QuicTransmissionInfo& info, QuicTime::Delta ack_delay,
QuicTime receive_timestamp) { … }
void QuicUnackedPacketMap::NotifyAggregatedStreamFrameAcked(
QuicTime::Delta ack_delay) { … }
PacketNumberSpace QuicUnackedPacketMap::GetPacketNumberSpace(
QuicPacketNumber packet_number) const { … }
PacketNumberSpace QuicUnackedPacketMap::GetPacketNumberSpace(
EncryptionLevel encryption_level) const { … }
QuicPacketNumber QuicUnackedPacketMap::GetLargestAckedOfPacketNumberSpace(
PacketNumberSpace packet_number_space) const { … }
QuicTime QuicUnackedPacketMap::GetLastInFlightPacketSentTime(
PacketNumberSpace packet_number_space) const { … }
QuicPacketNumber
QuicUnackedPacketMap::GetLargestSentRetransmittableOfPacketNumberSpace(
PacketNumberSpace packet_number_space) const { … }
const QuicTransmissionInfo*
QuicUnackedPacketMap::GetFirstInFlightTransmissionInfo() const { … }
const QuicTransmissionInfo*
QuicUnackedPacketMap::GetFirstInFlightTransmissionInfoOfSpace(
PacketNumberSpace packet_number_space) const { … }
void QuicUnackedPacketMap::EnableMultiplePacketNumberSpacesSupport() { … }
int32_t QuicUnackedPacketMap::GetLastPacketContent() const { … }
}