26 #include "ns3/simulator.h"
39 .AddConstructor<TcpLp>()
40 .SetGroupName(
"Internet");
61 m_owdMin(sock.m_owdMin),
62 m_owdMax(sock.m_owdMax),
63 m_owdMaxRsv(sock.m_owdMaxRsv),
64 m_lastDrop(sock.m_lastDrop),
65 m_inference(sock.m_inference)
78 return CopyObject<TcpLp>(
this);
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.
uint32_t m_segmentSize
Segment size.
TracedValue< uint32_t > m_cWnd
Congestion window.
uint32_t m_rcvTimestampEchoReply
Sender Timestamp echoed by the receiver.
uint32_t m_rcvTimestampValue
Receiver Timestamp value.
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.
T Get() const
Get the underlying value.
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.