29 .AddConstructor<TcpPrrRecovery>()
30 .SetGroupName(
"Internet");
42 m_prrDelivered(recovery.m_prrDelivered),
43 m_prrOut(recovery.m_prrOut),
44 m_recoveryFlightSize(recovery.m_recoveryFlightSize)
56 uint32_t dupAckCount [[maybe_unused]],
76 deliveredBytes += tcb->m_segmentSize;
78 if (deliveredBytes == 0)
86 if (tcb->m_bytesInFlight > tcb->m_ssThresh)
99 bool safeACK = tcb->m_isRetransDataAcked;
104 limit += tcb->m_segmentSize;
108 sendCount = std::min(limit,
static_cast<int>(tcb->m_ssThresh - tcb->m_bytesInFlight));
112 sendCount = std::max(sendCount,
static_cast<int>(
m_prrOut > 0 ? 0 : tcb->m_segmentSize));
113 tcb->m_cWnd = tcb->m_bytesInFlight + sendCount;
114 tcb->m_cWndInfl = tcb->m_cWnd;
121 tcb->m_cWndInfl = tcb->m_cWnd;
140 return "PrrRecovery";
friend Ptr< T > CopyObject(Ptr< T > object)
Copy an Object.
Smart pointer class similar to boost::intrusive_ptr.
The Classic recovery implementation.
An implementation of PRR.
void EnterRecovery(Ptr< TcpSocketState > tcb, uint32_t dupAckCount, uint32_t unAckDataCount, uint32_t deliveredBytes) override
Performs variable initialization at the start of recovery.
static TypeId GetTypeId()
Get the type ID.
void UpdateBytesSent(uint32_t bytesSent) override
Keeps track of bytes sent during recovery phase.
void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes, bool isDupAck) override
Performs recovery based on the recovery algorithm.
void ExitRecovery(Ptr< TcpSocketState > tcb) override
Performs cwnd adjustments at the end of recovery.
std::string GetName() const override
Get the name of the recovery algorithm.
uint32_t m_prrOut
total bytes sent during recovery phase
~TcpPrrRecovery() override
TcpPrrRecovery()
Create an unbound tcp socket.
uint32_t m_prrDelivered
total bytes delivered during recovery phase
Ptr< TcpRecoveryOps > Fork() override
Copy the recovery algorithm across socket.
uint32_t m_recoveryFlightSize
value of bytesInFlight at the start of recovery phase
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.