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::TracedValue::DoubleCallback")
60 m_minRtt (sock.m_minRtt),
61 m_cWndCnt (sock.m_cWndCnt)
103 if (segmentsAcked >= 1)
110 double increment = std::pow (2,
m_rho) - 1.0;
120 return segmentsAcked - 1;
134 while (segmentsAcked > 0)
141 increment = std::pow (
m_rho, 2) / ((double) segCwnd);
171 return CopyObject<TcpHybla> (
this);
Simulation virtual time values and global simulation resolution.
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Timing information on received ACK.
#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 std::string GetName() const
Get the name of the congestion control algorithm.
#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.
TcpHybla(void)
Create an unbound tcp socket.
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.
int64x64_t Max(const int64x64_t &a, const int64x64_t &b)
Maximum.
Time m_minRtt
Minimum smoothed round trip time value seen.
uint32_t GetCwndInSegments() const
Get cwnd in segments rather than bytes.
TracedValue< uint32_t > m_ssThresh
Slow start threshold.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
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.
void RecalcParam(Ptr< TcpSocketState > tcb, const Time &rtt)
Recalculate algorithm parameters.
static TypeId GetTypeId(void)
Get the type ID.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across socket.
virtual uint32_t SlowStart(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Tcp NewReno slow start algorithm.
Implementation of the TCP Hybla algorithm.
a unique identifier for an interface.
double m_cWndCnt
cWnd integer-to-float counter
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
NewReno congestion avoidance.
Time m_rRtt
Reference RTT.
TracedValue< double > m_rho
Rho parameter.