18 #ifndef TCP_RATE_OPS_H
19 #define TCP_RATE_OPS_H
23 #include "ns3/data-rate.h"
24 #include "ns3/object.h"
25 #include "ns3/traced-callback.h"
26 #include "ns3/traced-value.h"
95 const uint32_t lostOut,
96 const uint32_t retransOut) = 0;
119 uint32_t priorInFlight,
120 const Time& minRtt) = 0;
216 const uint32_t lostOut,
217 const uint32_t retransOut)
override;
221 uint32_t priorInFlight,
222 const Time& minRtt)
override;
Class for representing data rates.
A base class which provides memory management and object aggregation.
Linux management and generation of Rate information for TCP.
TracedCallback< const TcpRateConnection & > m_rateTrace
Rate trace.
void(* TcpRateSampleUpdated)(const TcpRateSample &sample)
TracedCallback signature for tcp rate sample update events.
void SkbDelivered(TcpTxItem *skb) override
Update the Rate information after an item is received.
TracedCallback< const TcpRateSample & > m_rateSampleTrace
Rate Sample trace.
TcpRateSample m_rateSample
Rate sample (continuously updated)
void(* TcpRateUpdated)(const TcpRateConnection &rate)
TracedCallback signature for tcp rate update events.
TcpRateConnection m_rate
Rate information.
void SkbSent(TcpTxItem *skb, bool isStartOfTransmission) override
Put the rate information inside the sent skb.
const TcpRateSample & GenerateSample(uint32_t delivered, uint32_t lost, bool is_sack_reneg, uint32_t priorInFlight, const Time &minRtt) override
Generate a TcpRateSample to feed a congestion avoidance algorithm.
const TcpRateConnection & GetConnectionRate() override
static TypeId GetTypeId()
Get the type ID.
void CalculateAppLimited(uint32_t cWnd, uint32_t in_flight, uint32_t segmentSize, const SequenceNumber32 &tailSeq, const SequenceNumber32 &nextTx, const uint32_t lostOut, const uint32_t retransOut) override
If a gap is detected between sends, it means we are app-limited.
Interface for all operations that involve a Rate monitoring for TCP.
static TypeId GetTypeId()
Get the type ID.
virtual void SkbSent(TcpTxItem *skb, bool isStartOfTransmission)=0
Put the rate information inside the sent skb.
virtual const TcpRateConnection & GetConnectionRate()=0
virtual void CalculateAppLimited(uint32_t cWnd, uint32_t in_flight, uint32_t segmentSize, const SequenceNumber32 &tailSeq, const SequenceNumber32 &nextTx, const uint32_t lostOut, const uint32_t retransOut)=0
If a gap is detected between sends, it means we are app-limited.
virtual const TcpRateSample & GenerateSample(uint32_t delivered, uint32_t lost, bool is_sack_reneg, uint32_t priorInFlight, const Time &minRtt)=0
Generate a TcpRateSample to feed a congestion avoidance algorithm.
virtual void SkbDelivered(TcpTxItem *skb)=0
Update the Rate information after an item is received.
Item that encloses the application packet and some flags for it.
Simulation virtual time values and global simulation resolution.
a unique identifier for an interface.
void(* DataRate)(DataRate oldValue, DataRate newValue)
TracedValue callback signature for DataRate.
Time Seconds(double value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
bool operator==(const EventId &a, const EventId &b)
std::ostream & operator<<(std::ostream &os, const Angles &a)
Information about the connection rate.
uint32_t m_txItemDelivered
The value of delivered when the acked item was sent.
Time m_deliveredTime
Simulator time when m_delivered was last updated.
int32_t m_rateDelivered
The amount of data delivered considered to calculate delivery rate.
uint64_t m_delivered
The total amount of data in bytes delivered so far.
uint32_t m_appLimited
The index of the last transmitted packet marked as application-limited.
bool m_rateAppLimited
Was sample was taken when data is app limited?
Time m_firstSentTime
The send time of the packet that was most recently marked as delivered.
Time m_rateInterval
The value of interval considered to calculate delivery rate.
Time m_ackElapsed
ACK time interval calculated from the most recent packet delivered.
bool IsValid() const
Is the sample valid?
bool m_isAppLimited
Indicates whether the rate sample is application-limited.
uint32_t m_ackedSacked
The amount of data acked and sacked in the last received ack.
DataRate m_deliveryRate
The delivery rate sample.
uint32_t m_priorInFlight
The value if bytes in flight prior to last received ack.
Time m_sendElapsed
Send time interval calculated from the most recent packet delivered.
Time m_interval
The length of the sampling interval.
uint32_t m_priorDelivered
The delivered count of the most recent packet delivered.
int32_t m_delivered
The amount of data marked as delivered over the sampling interval.
uint32_t m_bytesLoss
The amount of data marked as lost from the most recent ack received.
Time m_priorTime
The delivered time of the most recent packet delivered.