40 .AddConstructor<TcpPrrRecovery>()
41 .SetGroupName(
"Internet")
42 .AddAttribute(
"ReductionBound",
43 "Type of Reduction Bound",
58 m_prrDelivered(recovery.m_prrDelivered),
59 m_prrOut(recovery.m_prrOut),
60 m_recoveryFlightSize(recovery.m_recoveryFlightSize),
61 m_reductionBoundMode(recovery.m_reductionBoundMode)
73 uint32_t dupAckCount [[maybe_unused]],
93 if (tcb->m_bytesInFlight > tcb->m_ssThresh)
100 int limit =
static_cast<int>(tcb->m_ssThresh - tcb->m_bytesInFlight);
107 if (tcb->m_isRetransDataAcked)
113 limit = deliveredBytes;
116 sendCount = std::min(limit,
static_cast<int>(tcb->m_ssThresh - tcb->m_bytesInFlight));
120 sendCount = std::max(sendCount,
static_cast<int>(
m_prrOut > 0 ? 0 : tcb->m_segmentSize));
121 tcb->m_cWnd = tcb->m_bytesInFlight + sendCount;
122 tcb->m_cWndInfl = tcb->m_cWnd;
129 tcb->m_cWndInfl = tcb->m_cWnd;
142 return CopyObject<TcpPrrRecovery>(
this);
148 return "PrrRecovery";
Hold variables of type enum.
Smart pointer class similar to boost::intrusive_ptr.
The Classic recovery implementation.
An implementation of PRR.
ReductionBound_t m_reductionBoundMode
mode of Reduction Bound to be used
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.
@ CRB
Conservative Reduction Bound.
@ SSRB
Slow Start Reduction Bound.
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.
void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes) override
Performs recovery based on the recovery algorithm.
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.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
#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.
Ptr< const AttributeChecker > MakeEnumChecker(int v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.