36 .AddConstructor<TcpHybla>()
37 .SetGroupName(
"Internet")
43 .AddTraceSource(
"Rho",
44 "Rho parameter of Hybla",
46 "ns3::TracedValueCallback::Double");
61 m_cWndCnt(sock.m_cWndCnt)
101 if (segmentsAcked >= 1)
108 double increment = std::pow(2,
m_rho) - 1.0;
109 auto incr =
static_cast<uint32_t
>(increment * tcb->
m_segmentSize);
115 << tcb->
m_ssThresh <<
" with an increment of "
118 return segmentsAcked - 1;
132 while (segmentsAcked > 0)
139 increment = std::pow(
m_rho, 2) /
static_cast<double>(segCwnd);
148 auto inc =
static_cast<uint32_t
>(
m_cWndCnt);
160 << tcb->
m_ssThresh <<
" with an increment of "
168 return CopyObject<TcpHybla>(
this);
Implementation of the TCP Hybla algorithm.
static TypeId GetTypeId()
Get the type ID.
Time m_rRtt
Reference RTT.
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
TcpHybla()
Create an unbound tcp socket.
uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Tcp NewReno slow start algorithm.
TracedValue< double > m_rho
Rho parameter.
std::string GetName() const override
Get the name of the congestion control algorithm.
void RecalcParam(const Ptr< TcpSocketState > &tcb)
Recalculate algorithm parameters.
double m_cWndCnt
cWnd integer-to-float counter
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
NewReno congestion avoidance.
The NewReno implementation.
uint32_t m_segmentSize
Segment size.
Time m_minRtt
Minimum RTT observed throughout the connection.
uint32_t GetCwndInSegments() const
Get cwnd in segments rather than bytes.
TracedValue< uint32_t > m_cWnd
Congestion window.
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.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#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.
#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.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.