44                             .AddConstructor<TcpIllinois>()
 
   45                             .SetGroupName(
"Internet")
 
   46                             .AddAttribute(
"AlphaMin",
 
   47                                           "Minimum alpha threshold",
 
   50                                           MakeDoubleChecker<double>())
 
   51                             .AddAttribute(
"AlphaMax",
 
   52                                           "Maximum alpha threshold",
 
   55                                           MakeDoubleChecker<double>())
 
   56                             .AddAttribute(
"AlphaBase",
 
   57                                           "Alpha base threshold",
 
   60                                           MakeDoubleChecker<double>())
 
   61                             .AddAttribute(
"BetaMin",
 
   62                                           "Minimum beta threshold",
 
   65                                           MakeDoubleChecker<double>())
 
   66                             .AddAttribute(
"BetaMax",
 
   67                                           "Maximum beta threshold",
 
   70                                           MakeDoubleChecker<double>())
 
   71                             .AddAttribute(
"BetaBase",
 
   72                                           "Beta base threshold",
 
   75                                           MakeDoubleChecker<double>())
 
   76                             .AddAttribute(
"WinThresh",
 
   80                                           MakeUintegerChecker<uint32_t>())
 
   81                             .AddAttribute(
"Theta",
 
   85                                           MakeUintegerChecker<uint32_t>());
 
  115       m_sumRtt(sock.m_sumRtt),
 
  116       m_cntRtt(sock.m_cntRtt),
 
  117       m_baseRtt(sock.m_baseRtt),
 
  118       m_maxRtt(sock.m_maxRtt),
 
  119       m_endSeq(sock.m_endSeq),
 
  120       m_rttAbove(sock.m_rttAbove),
 
  121       m_rttLow(sock.m_rttLow),
 
  122       m_alphaMin(sock.m_alphaMin),
 
  123       m_alphaMax(sock.m_alphaMax),
 
  124       m_alphaBase(sock.m_alphaBase),
 
  125       m_alpha(sock.m_alpha),
 
  126       m_betaMin(sock.m_betaMin),
 
  127       m_betaMax(sock.m_betaMax),
 
  128       m_betaBase(sock.m_betaBase),
 
  130       m_winThresh(sock.m_winThresh),
 
  131       m_theta(sock.m_theta),
 
  132       m_ackCnt(sock.m_ackCnt)
 
  149         NS_LOG_INFO(
"cWnd < winThresh, set alpha & beta to base values");
 
  159         NS_LOG_INFO(
"Updated to dm = " << dm << 
" da = " << da);
 
  202         uint32_t oldCwnd = segCwnd;
 
  204         if (segmentsAcked > 0)
 
  215         if (segCwnd != oldCwnd)
 
  252     uint32_t segBytesInFlight = bytesInFlight / tcb->m_segmentSize;
 
  253     uint32_t ssThresh = 
static_cast<uint32_t
>(
std::max(2.0, (1.0 - 
m_beta) * segBytesInFlight));
 
  255     NS_LOG_DEBUG(
"Calculated ssThresh (in segments) = " << ssThresh);
 
  257     return ssThresh * tcb->m_segmentSize;
 
  265     double d1 = dm / 100;
 
  281             NS_LOG_INFO(
"da stays below d1 for theta times RTT amount of time, " 
  282                         "increase alpha to alphaMax");
 
  325     else if (da > d2 && da < d3)
 
  337     else if (da >= d3 || d3 <= d2)
 
  378     return CopyObject<TcpIllinois>(
this);
 
  386     return "TcpIllinois";
 
This class can be used to hold variables of floating point type such as 'double' or 'float'.
 
An implementation of TCP Illinois algorithm.
 
double m_alphaBase
Base value of alpha for standard AIMD.
 
double m_beta
Multiplicative decrease factor.
 
uint32_t m_ackCnt
Number of received ACK.
 
void RecalcParam(uint32_t cWnd)
Recalculate alpha and beta every RTT.
 
Time CalculateMaxDelay() const
Calculate maximum queueing delay.
 
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get slow start threshold after congestion event.
 
bool m_rttAbove
True when da > d1.
 
std::string GetName() const override
Get the name of the congestion control algorithm.
 
static TypeId GetTypeId()
Get the type ID.
 
double m_betaMin
Minimum beta threshold.
 
void CalculateAlpha(double da, double dm)
Calculate additive increase factor alpha.
 
void CongestionStateSet(Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCongState_t newState) override
Reset Illinois parameters to default values upon a loss.
 
Time m_baseRtt
Minimum of all RTT measurements.
 
double m_alphaMin
Minimum alpha threshold.
 
uint32_t m_winThresh
Window threshold for adaptive sizing.
 
uint32_t m_cntRtt
Number of RTT measurements during last RTT.
 
TcpIllinois()
Create an unbound tcp socket.
 
void IncreaseWindow(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Adjust cwnd following Illinois congestion avoidance algorithm.
 
uint8_t m_rttLow
Number of RTTs da has stayed below d1.
 
void CalculateBeta(double da, double dm)
Calculate multiplicative decrease factor beta.
 
Time m_maxRtt
Maximum of all RTT measurements.
 
double m_alpha
Additive increase factor.
 
double m_betaMax
Maximum beta threshold.
 
double m_betaBase
Base value of beta for standard AIMD.
 
uint32_t m_theta
Number of RTTs required before setting alpha to its max.
 
Time m_sumRtt
Sum of all RTT measurements during last RTT.
 
double m_alphaMax
Maximum alpha threshold.
 
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
 
void Reset(const SequenceNumber32 &nextTxSequence)
Reset Illinois parameters.
 
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Measure RTT for each ACK Keep track of min and max RTT.
 
Time CalculateAvgDelay() const
Calculate average queueing delay.
 
SequenceNumber32 m_endSeq
Right edge of current RTT.
 
The NewReno implementation.
 
virtual uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Tcp NewReno slow start algorithm.
 
uint32_t m_segmentSize
Segment size.
 
uint32_t GetCwndInSegments() const
Get cwnd in segments rather than bytes.
 
TcpCongState_t
Definition of the Congestion state machine.
 
@ CA_LOSS
CWND was reduced due to RTO timeout or SACK reneging.
 
SequenceNumber32 m_lastAckedSeq
Last sequence ACKed.
 
TracedValue< uint32_t > m_cWnd
Congestion window.
 
TracedValue< SequenceNumber32 > m_nextTxSequence
Next seqnum to be sent (SND.NXT), ReTx pushes it back.
 
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
 
Simulation virtual time values and global simulation resolution.
 
int64_t GetMilliSeconds() const
Get an approximation of the time stored in this instance in the indicated unit.
 
bool IsZero() const
Exactly equivalent to t == 0.
 
a unique identifier for an interface.
 
TypeId SetParent(TypeId tid)
Set the parent TypeId.
 
Hold an unsigned integer type.
 
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
 
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
 
int64x64_t Max(const int64x64_t &a, const int64x64_t &b)
Maximum.
 
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
Minimum.
 
#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.
 
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time.
 
Every class exported by the ns3 library is enclosed in the ns3 namespace.