25 #include "ns3/tcp-socket-base.h" 26 #include "ns3/tcp-congestion-ops.h" 39 .AddConstructor<TcpPrrRecovery> ()
40 .SetGroupName (
"Internet")
41 .AddAttribute (
"ReductionBound",
"Type of Reduction Bound",
58 m_prrDelivered (recovery.m_prrDelivered),
59 m_prrOut (recovery.m_prrOut),
60 m_recoveryFlightSize (recovery.m_recoveryFlightSize),
61 m_previousSackedBytes (recovery.m_previousSackedBytes),
62 m_reductionBoundMode (recovery.m_reductionBoundMode)
74 uint32_t unAckDataCount, uint32_t lastSackedBytes)
76 NS_LOG_FUNCTION (
this << tcb << dupAckCount << unAckDataCount << lastSackedBytes);
89 uint32_t lastSackedBytes)
92 uint32_t lastDeliveredBytes;
94 lastDeliveredBytes = lastAckedBytes + changeInSackedBytes > 0 ? lastAckedBytes + changeInSackedBytes : 0;
141 return CopyObject<TcpPrrRecovery> (
this);
147 return "PrrRecovery";
virtual void ExitRecovery(Ptr< TcpSocketState > tcb) override
Performs cwnd adjustments at the end of recovery.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Slow Start Reduction Bound.
virtual void UpdateBytesSent(uint32_t bytesSent) override
Keeps track of bytes sent during recovery phase.
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
uint32_t m_previousSackedBytes
total bytes SACKed by the previous ACK
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
uint32_t m_recoveryFlightSize
value of bytesInFlight at the start of recovery phase
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_UNUSED(x)
Mark a local variable as unused.
uint32_t m_segmentSize
Segment size.
virtual Ptr< TcpRecoveryOps > Fork() override
Copy the recovery algorithm across socket.
TracedValue< uint32_t > m_cWndInfl
Inflated congestion window trace (used only for backward compatibility purpose)
Hold variables of type enum.
TcpPrrRecovery(void)
Create an unbound tcp socket.
static TypeId GetTypeId(void)
Get the type ID.
TracedValue< uint32_t > m_bytesInFlight
Bytes in flight.
virtual void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t lastAckedBytes, uint32_t lastSackedBytes) override
Performs recovery based on the recovery algorithm.
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
An implementation of PRR.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
uint32_t m_prrOut
total bytes sent during recovery phase
ReductionBound_t m_reductionBoundMode
mode of Reduction Bound to be used
TracedValue< uint32_t > m_cWnd
Congestion window.
Ptr< const AttributeChecker > MakeEnumChecker(int v1, std::string n1, int v2, std::string n2, int v3, std::string n3, int v4, std::string n4, int v5, std::string n5, int v6, std::string n6, int v7, std::string n7, int v8, std::string n8, int v9, std::string n9, int v10, std::string n10, int v11, std::string n11, int v12, std::string n12, int v13, std::string n13, int v14, std::string n14, int v15, std::string n15, int v16, std::string n16, int v17, std::string n17, int v18, std::string n18, int v19, std::string n19, int v20, std::string n20, int v21, std::string n21, int v22, std::string n22)
Make an EnumChecker pre-configured with a set of allowed values by name.
virtual void EnterRecovery(Ptr< TcpSocketState > tcb, uint32_t dupAckCount, uint32_t unAckDataCount, uint32_t lastSackedBytes) override
Performs variable initialization at the start of recovery.
T Get(void) const
Get the underlying value.
uint32_t m_prrDelivered
total bytes delivered during recovery phase
The Classic recovery implementation.
std::string GetName() const override
Get the name of the recovery algorithm.
Conservative Reduction Bound.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual ~TcpPrrRecovery(void) override