35 .AddConstructor<TcpHybla> ()
36 .SetGroupName (
"Internet")
37 .AddAttribute (
"RRTT",
"Reference RTT",
41 .AddTraceSource (
"Rho",
42 "Rho parameter of Hybla",
44 "ns3::TracedValueCallback::Double")
60 m_cWndCnt (sock.m_cWndCnt)
101 if (segmentsAcked >= 1)
108 double increment = std::pow (2,
m_rho) - 1.0;
109 uint32_t incr =
static_cast<uint32_t
> (increment * tcb->
m_segmentSize);
118 return segmentsAcked - 1;
132 while (segmentsAcked > 0)
139 increment = std::pow (
m_rho, 2) /
static_cast<double> (segCwnd);
148 uint32_t inc =
static_cast<uint32_t
> (
m_cWndCnt);
169 return CopyObject<TcpHybla> (
this);
Implementation of the TCP Hybla algorithm.
virtual ~TcpHybla(void) override
Time m_rRtt
Reference RTT.
virtual Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
virtual uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Tcp NewReno slow start algorithm.
TracedValue< double > m_rho
Rho parameter.
virtual std::string GetName() const override
Get the name of the congestion control algorithm.
void RecalcParam(const Ptr< TcpSocketState > &tcb)
Recalculate algorithm parameters.
static TypeId GetTypeId(void)
Get the type ID.
double m_cWndCnt
cWnd integer-to-float counter
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
TcpHybla(void)
Create an unbound tcp socket.
virtual 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(void) const
Get an approximation of the time stored in this instance in the indicated unit.
AttributeValue implementation for Time.
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,...
Ptr< const AttributeAccessor > MakeTimeAccessor(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.
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 AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.