33 .AddConstructor<TcpHighSpeed> ()
34 .SetGroupName (
"Internet")
48 m_ackCnt (sock.m_ackCnt)
61 return CopyObject<TcpHighSpeed> (
this);
102 uint32_t oldCwnd = segCwnd;
104 if (segmentsAcked > 0)
116 if (segCwnd != oldCwnd)
127 return "TcpHighSpeed";
140 uint32_t bytesInFlight)
144 uint32_t segCwnd = bytesInFlight / tcb->m_segmentSize;
147 uint32_t ssThresh =
static_cast<uint32_t
> (
std::max (2.0, segCwnd * b));
150 " resulting (in segment) ssThresh=" << ssThresh);
152 return ssThresh * tcb->m_segmentSize;
An implementation of TCP HighSpeed.
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.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
virtual uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight)
Get slow start threshold following HighSpeed principles.
uint32_t m_segmentSize
Segment size.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
The NewReno implementation.
static double TableLookupB(uint32_t w)
Lookup table for the coefficient b (from RFC 3649)
static uint32_t TableLookupA(uint32_t w)
Lookup table for the coefficient a (from RFC 3649)
virtual std::string GetName() const
Get the name of the congestion control algorithm.
virtual ~TcpHighSpeed(void)
static TypeId GetTypeId(void)
Get the type ID.
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
TracedValue< uint32_t > m_cWnd
Congestion window.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
TcpHighSpeed(void)
Create an unbound tcp socket.
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across socket.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
uint32_t m_ackCnt
Number of received ACK, corrected with the coefficient a.
uint32_t GetCwndInSegments() const
Get cwnd in segments rather than bytes.
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Congestion avoidance of TcpHighSpeed.