35                            .AddConstructor<TcpScalable>()
 
   36                            .SetGroupName(
"Internet")
 
   37                            .AddAttribute(
"AIFactor",
 
   38                                          "Additive Increase Factor",
 
   42                            .AddAttribute(
"MDFactor",
 
   43                                          "Multiplicative Decrease Factor",
 
 
   61      m_ackCnt(sock.m_ackCnt),
 
   62      m_aiFactor(sock.m_aiFactor),
 
   63      m_mdFactor(sock.m_mdFactor)
 
 
   84    uint32_t segCwnd = tcb->GetCwndInSegments();
 
  104    if (segCwnd != oldCwnd)
 
  106        tcb->m_cWnd = segCwnd * tcb->m_segmentSize;
 
  107        NS_LOG_INFO(
"In CongAvoid, updated to cwnd " << tcb->m_cWnd << 
" ssthresh " 
 
  115    return "TcpScalable";
 
 
  123    uint32_t segCwnd = bytesInFlight / tcb->m_segmentSize;
 
  128    NS_LOG_DEBUG(
"Calculated b(w) = " << b << 
" resulting (in segment) ssThresh=" << ssThresh);
 
  130    return ssThresh * tcb->m_segmentSize;
 
 
This class can be used to hold variables of floating point type such as 'double' or 'float'.
friend Ptr< T > CopyObject(Ptr< T > object)
Copy an Object.
Smart pointer class similar to boost::intrusive_ptr.
The NewReno implementation.
An implementation of TCP Scalable.
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get slow start threshold following Scalable principle (Equation 2)
static TypeId GetTypeId()
Get the type ID.
uint32_t m_ackCnt
Number of received ACK.
void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Congestion avoidance of TcpScalable (Equation 1)
TcpScalable()
Create an unbound tcp socket.
uint32_t m_aiFactor
Additive increase factor.
std::string GetName() const override
Get the name of the congestion control algorithm.
double m_mdFactor
Multiplicative decrease factor.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Hold an unsigned integer type.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file,...
Ptr< const AttributeChecker > MakeDoubleChecker()
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 AttributeChecker > MakeUintegerChecker()
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#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.