25                            .AddConstructor<TcpHybla>()
 
   26                            .SetGroupName(
"Internet")
 
   32                            .AddTraceSource(
"Rho",
 
   33                                            "Rho parameter of Hybla",
 
   35                                            "ns3::TracedValueCallback::Double");
 
 
   50      m_cWndCnt(sock.m_cWndCnt)
 
 
   76    if (rtt == tcb->m_minRtt)
 
 
   88    NS_ASSERT(tcb->m_cWnd <= tcb->m_ssThresh);
 
   90    if (segmentsAcked >= 1)
 
   97        double increment = std::pow(2, 
m_rho) - 1.0;
 
   98        auto incr = 
static_cast<uint32_t>(increment * tcb->m_segmentSize);
 
  101        tcb->m_cWnd = std::min(tcb->m_cWnd + incr, tcb->m_ssThresh);
 
  103        NS_LOG_INFO(
"In SlowStart, updated to cwnd " << tcb->m_cWnd << 
" ssthresh " 
  104                                                     << tcb->m_ssThresh << 
" with an increment of " 
  105                                                     << increment * tcb->m_segmentSize);
 
  107        return segmentsAcked - 1;
 
 
  121    while (segmentsAcked > 0)
 
  127        segCwnd = tcb->GetCwndInSegments();
 
  128        increment = std::pow(
m_rho, 2) / 
static_cast<double>(segCwnd);
 
  146        tcb->m_cWnd += inc * tcb->m_segmentSize;
 
  148        NS_LOG_INFO(
"In CongAvoid, updated to cwnd " << tcb->m_cWnd << 
" ssthresh " 
  149                                                     << tcb->m_ssThresh << 
" with an increment of " 
  150                                                     << inc * tcb->m_segmentSize);
 
 
friend Ptr< T > CopyObject(Ptr< T > object)
Copy an Object.
Smart pointer class similar to boost::intrusive_ptr.
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.
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.
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.
Ptr< const AttributeChecker > MakeTimeChecker()
Helper to make an unbounded Time checker.
#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.