15#include "ns3/simulator.h"
28 .AddConstructor<TcpLp>()
29 .SetGroupName(
"Internet");
50 m_owdMin(sock.m_owdMin),
51 m_owdMax(sock.m_owdMax),
52 m_owdMaxRsv(sock.m_owdMaxRsv),
53 m_lastDrop(sock.m_lastDrop),
54 m_inference(sock.m_inference)
88 owd = tcb->m_rcvTimestampValue - tcb->m_rcvTimestampEchoReply;
205 tcb->m_cWnd = 1U * tcb->m_segmentSize;
212 tcb->m_cWnd = std::max(tcb->m_cWnd.Get() >> 1U, 1U * tcb->m_segmentSize);
friend Ptr< T > CopyObject(Ptr< T > object)
Copy an Object.
Smart pointer class similar to boost::intrusive_ptr.
static Time Now()
Return the current simulation virtual time.
TCP-LP (Low Priority) congestion control algorithm.
std::string GetName() const override
Get the name of the congestion control algorithm.
Time m_inference
Current inference period.
uint32_t m_flag
TcpLp state flag.
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
uint32_t m_owdMax
Maximum One-Way Delay.
void RttSample(Ptr< TcpSocketState > tcb)
Estimates minimum and maximum One-Way Delays and calculates the smoothed One-Way Delay.
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
uint32_t m_owdMaxRsv
Reserved Maximum One-Way Delay.
static TypeId GetTypeId()
Get the type ID.
void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked) override
Invokes Congestion Avoidance of TcpNewReno if TcpLp is not within inference.
uint32_t m_owdMin
Minimum One-Way Delay.
TcpLp()
Creates an unbound tcp socket.
@ LP_WITHIN_INF
TcpLp is within Inference.
@ LP_VALID_OWD
Calculated One-Way Delay is valid.
@ LP_WITHIN_THR
TcpLp is within Threshold.
uint32_t OwdCalculator(Ptr< TcpSocketState > tcb)
Calculates One-Way Delay using Sender and Receiver timestamps.
Time m_lastDrop
Last time when cwnd was reduced.
uint32_t m_sOwd
Smoothed One-Way Delay.
The NewReno implementation.
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
NewReno congestion avoidance.
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.
bool IsZero() const
Exactly equivalent to t == 0.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.