24#include "ns3/tcp-congestion-ops.h"
25#include "ns3/tcp-linux-reno.h"
26#include "ns3/traced-callback.h"
64 std::string
GetName()
const override;
Smart pointer class similar to boost::intrusive_ptr.
An implementation of DCTCP.
void(* CongestionEstimateTracedCallback)(uint32_t bytesAcked, uint32_t bytesMarked, double alpha)
TracedCallback signature for DCTCP update of congestion state.
Ptr< TcpCongestionOps > Fork() override
Copy the congestion control algorithm across sockets.
static TypeId GetTypeId()
Get the type ID.
SequenceNumber32 m_priorRcvNxt
Sequence number of the first missing byte in data.
double m_alpha
Parameter used to estimate the amount of network congestion.
double m_g
Estimation gain.
bool m_initialized
Whether DCTCP has been initialized.
bool m_ceState
DCTCP Congestion Experienced state.
bool m_priorRcvNxtFlag
Variable used in setting the value of m_priorRcvNxt for first time.
void InitializeDctcpAlpha(double alpha)
Initialize the value of m_alpha.
SequenceNumber32 m_nextSeq
TCP sequence number threshold for beginning a new observation window.
uint32_t m_ackedBytesEcn
Number of acked bytes which are marked.
void Init(Ptr< TcpSocketState > tcb) override
Set configuration required by congestion control algorithm, This method will force DctcpEcn mode and ...
TcpDctcp()
Create an unbound tcp socket.
void Reset(Ptr< TcpSocketState > tcb)
Resets the value of m_ackedBytesEcn, m_ackedBytesTotal and m_nextSeq.
uint32_t m_ackedBytesTotal
Total number of acked bytes.
bool m_nextSeqFlag
Variable used in setting the value of m_nextSeq for first time.
std::string GetName() const override
Get the name of the congestion control algorithm.
uint32_t GetSsThresh(Ptr< const TcpSocketState > tcb, uint32_t bytesInFlight) override
Get the slow start threshold after a loss event.
void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt) override
Timing information on received ACK.
void CwndEvent(Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCAEvent_t event) override
Trigger events/calculations on occurrence of congestion window event.
void CeState1to0(Ptr< TcpSocketState > tcb)
Changes state of m_ceState to false.
void UpdateAckReserved(Ptr< TcpSocketState > tcb, const TcpSocketState::TcpCAEvent_t event)
Updates the value of m_delayedAckReserved.
bool m_delayedAckReserved
Delayed Ack state.
TracedCallback< uint32_t, uint32_t, double > m_traceCongestionEstimate
Callback pointer for congestion state update.
bool m_useEct0
Use ECT(0) for ECN codepoint.
void CeState0to1(Ptr< TcpSocketState > tcb)
Changes state of m_ceState to true.
~TcpDctcp() override
Destructor.
Reno congestion control algorithm.
TcpCAEvent_t
Congestion avoidance events.
Simulation virtual time values and global simulation resolution.
Forward calls to a chain of Callback.
a unique identifier for an interface.
Every class exported by the ns3 library is enclosed in the ns3 namespace.