25 #include "ns3/simulator.h"
37 .SetGroupName (
"Internet")
63 if (segmentsAcked >= 1)
65 uint32_t sndCwnd = tcb->
m_cWnd;
87 NS_LOG_DEBUG (
"w in segments " << w <<
" m_cWndCnt " <<
m_cWndCnt <<
" segments acked " << segmentsAcked);
103 NS_LOG_DEBUG (
"Subtracting delta * w from m_cWndCnt " << delta * w);
117 segmentsAcked =
SlowStart (tcb, segmentsAcked);
129 return "TcpLinuxReno";
134 uint32_t bytesInFlight)
139 return std::max<uint32_t> (2 * state->m_segmentSize, state->m_cWnd / 2);
145 return CopyObject<TcpLinuxReno> (
this);
Congestion control abstract class.
Reno congestion control algorithm.
virtual void IncreaseWindow(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Congestion avoidance algorithm implementation.
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get the slow start threshold after a loss event.
std::string GetName() const
Get the name of the congestion control algorithm.
virtual uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Slow start phase handler.
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Congestion avoidance phase handler.
uint32_t m_cWndCnt
Linear increase counter.
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across sockets.
static TypeId GetTypeId(void)
Get the type ID.
uint32_t m_segmentSize
Segment size.
TracedValue< uint32_t > m_cWnd
Congestion window.
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
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_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#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.