chromium/net/third_party/quiche/src/quiche/quic/core/congestion_control/bbr2_misc.h

// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef QUICHE_QUIC_CORE_CONGESTION_CONTROL_BBR2_MISC_H_
#define QUICHE_QUIC_CORE_CONGESTION_CONTROL_BBR2_MISC_H_

#include <algorithm>
#include <limits>

#include "quiche/quic/core/congestion_control/bandwidth_sampler.h"
#include "quiche/quic/core/congestion_control/send_algorithm_interface.h"
#include "quiche/quic/core/congestion_control/windowed_filter.h"
#include "quiche/quic/core/quic_bandwidth.h"
#include "quiche/quic/core/quic_packet_number.h"
#include "quiche/quic/core/quic_time.h"
#include "quiche/quic/core/quic_types.h"
#include "quiche/quic/platform/api/quic_export.h"
#include "quiche/quic/platform/api/quic_flags.h"

namespace quic {

template <typename T>
class QUICHE_EXPORT Limits {};

template <typename T>
QUICHE_EXPORT inline Limits<T> MinMax(T min, T max) {}

template <typename T>
QUICHE_EXPORT inline Limits<T> NoLessThan(T min) {}

template <typename T>
QUICHE_EXPORT inline Limits<T> NoGreaterThan(T max) {}

template <typename T>
QUICHE_EXPORT inline Limits<T> Unlimited() {}

template <typename T>
QUICHE_EXPORT inline std::ostream& operator<<(std::ostream& os,
                                              const Limits<T>& limits) {}

// Bbr2Params contains all parameters of a Bbr2Sender.
struct QUICHE_EXPORT Bbr2Params {};

class QUICHE_EXPORT RoundTripCounter {};

class QUICHE_EXPORT MinRttFilter {};

class QUICHE_EXPORT Bbr2MaxBandwidthFilter {};

// Information that are meaningful only when Bbr2Sender::OnCongestionEvent is
// running.
struct QUICHE_EXPORT Bbr2CongestionEvent {};

// Bbr2NetworkModel takes low level congestion signals(packets sent/acked/lost)
// as input and produces BBRv2 model parameters like inflight_(hi|lo),
// bandwidth_(hi|lo), bandwidth and rtt estimates, etc.
class QUICHE_EXPORT Bbr2NetworkModel {};

enum class Bbr2Mode : uint8_t {};

QUICHE_EXPORT inline std::ostream& operator<<(std::ostream& os,
                                              const Bbr2Mode& mode) {}

// The base class for all BBRv2 modes. A Bbr2Sender is in one mode at a time,
// this interface is used to implement mode-specific behaviors.
class Bbr2Sender;
class QUICHE_EXPORT Bbr2ModeBase {};

QUICHE_EXPORT inline QuicByteCount BytesInFlight(
    const SendTimeState& send_state) {}

}  // namespace quic

#endif  // QUICHE_QUIC_CORE_CONGESTION_CONTROL_BBR2_MISC_H_