27 #include "ns3/simulator.h"
39 .AddConstructor<TcpLp> ()
40 .SetGroupName (
"Internet")
49 m_owdMin (0xffffffff),
52 m_lastDrop (
Time (0)),
53 m_inference (
Time (0))
62 m_owdMin (sock.m_owdMin),
63 m_owdMax (sock.m_owdMax),
64 m_owdMaxRsv (sock.m_owdMaxRsv),
65 m_lastDrop (sock.m_lastDrop),
66 m_inference (sock.m_inference)
79 return CopyObject<TcpLp> (
this);
Smart pointer class similar to boost::intrusive_ptr.
static Time Now(void)
Return the current simulation virtual time.
TCP-LP (Low Priority) congestion control algorithm.
Time m_inference
Current inference period.
uint32_t m_flag
TcpLp state flag.
uint32_t m_owdMax
Maximum One-Way Delay.
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across sockets.
void RttSample(Ptr< TcpSocketState > tcb)
Estimates minimum and maximum One-Way Delays and calculates the smoothed One-Way Delay.
uint32_t m_owdMaxRsv
Reserved Maximum One-Way Delay.
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Invokes Congestion Avoidance of TcpNewReno if TcpLp is not within inference.
static TypeId GetTypeId(void)
Get the type ID.
uint32_t m_owdMin
Minimum One-Way Delay.
@ 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.
TcpLp(void)
Creates an unbound tcp socket.
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Timing information on received ACK.
Time m_lastDrop
Last time when cwnd was reduced.
uint32_t m_sOwd
Smoothed One-Way Delay.
virtual std::string GetName() const
Get the name of the congestion control algorithm.
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.
bool IsZero(void) const
Exactly equivalent to t == 0.
int64_t GetMilliSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
T Get(void) 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.