22 #include "ns3/tcp-socket-base.h" 34 .AddConstructor<TcpHybla> ()
35 .SetGroupName (
"Internet")
36 .AddAttribute (
"RRTT",
"Reference RTT",
40 .AddTraceSource (
"Rho",
41 "Rho parameter of Hybla",
43 "ns3::TracedValueCallback::Double")
59 m_cWndCnt (sock.m_cWndCnt)
100 if (segmentsAcked >= 1)
107 double increment = std::pow (2,
m_rho) - 1.0;
108 uint32_t incr =
static_cast<uint32_t
> (increment * tcb->
m_segmentSize);
117 return segmentsAcked - 1;
131 while (segmentsAcked > 0)
138 increment = std::pow (
m_rho, 2) /
static_cast<double> (segCwnd);
147 uint32_t inc =
static_cast<uint32_t
> (
m_cWndCnt);
168 return CopyObject<TcpHybla> (
this);
Simulation virtual time values and global simulation resolution.
#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.
void RecalcParam(const Ptr< TcpSocketState > &tcb)
Recalculate algorithm parameters.
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
NewReno congestion avoidance.
#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.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
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.
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 std::string GetName() const override
Get the name of the congestion control algorithm.
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source.
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range.
AttributeValue implementation for Time.
virtual uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Tcp NewReno slow start algorithm
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across socket.
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
TracedValue< uint32_t > m_cWnd
Congestion window.
static TypeId GetTypeId(void)
Get the type ID.
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Time m_minRtt
Minimum RTT observed throughout the connection.
Implementation of the TCP Hybla algorithm.
a unique identifier for an interface.
double m_cWndCnt
cWnd integer-to-float counter
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual ~TcpHybla(void) override
Time m_rRtt
Reference RTT.
uint32_t GetCwndInSegments() const
Get cwnd in segments rather than bytes.
TracedValue< double > m_rho
Rho parameter.