43 .AddConstructor<TcpScalable> ()
44 .SetGroupName (
"Internet")
45 .AddAttribute (
"AIFactor",
"Additive Increase Factor",
48 MakeUintegerChecker<uint32_t> ())
49 .AddAttribute (
"MDFactor",
"Multiplicative Decrease Factor",
52 MakeDoubleChecker<double> ())
68 m_ackCnt (sock.m_ackCnt),
69 m_aiFactor (sock.m_aiFactor),
70 m_mdFactor (sock.m_mdFactor)
83 return CopyObject<TcpScalable> (
this);
88 uint32_t segmentsAcked)
95 uint32_t oldCwnd = segCwnd;
112 if (segCwnd != oldCwnd)
123 return "TcpScalable";
128 uint32_t bytesInFlight)
132 uint32_t segCwnd = bytesInFlight / tcb->m_segmentSize;
135 uint32_t ssThresh =
static_cast<uint32_t
> (
std::max (2.0, segCwnd * b));
138 " resulting (in segment) ssThresh=" << ssThresh);
140 return ssThresh * tcb->m_segmentSize;
Smart pointer class similar to boost::intrusive_ptr.
#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.
virtual ~TcpScalable(void)
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint32_t m_segmentSize
Segment size.
double m_mdFactor
Multiplicative decrease factor.
static TypeId GetTypeId(void)
Get the type ID.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
uint32_t m_aiFactor
Additive increase factor.
The NewReno implementation.
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Congestion avoidance of TcpScalable (Equation 1)
Hold an unsigned integer type.
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across socket.
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
An implementation of TCP Scalable.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TracedValue< uint32_t > m_cWnd
Congestion window.
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
TcpScalable(void)
Create an unbound tcp socket.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
virtual std::string GetName() const
Get the name of the congestion control algorithm.
uint32_t m_ackCnt
Number of received ACK.
This class can be used to hold variables of floating point type such as 'double' or 'float'...
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get slow start threshold following Scalable principle (Equation 2)
uint32_t GetCwndInSegments() const
Get cwnd in segments rather than bytes.