33 #ifndef TCP_WESTWOOD_H
34 #define TCP_WESTWOOD_H
37 #include "ns3/packet.h"
102 virtual uint32_t
Window (
void);
void InitializeCwnd(void)
Initialize cwnd at the beginning of a connection.
EventId m_bwEstimateEvent
The BW estimation event for Westwood+.
int CountAck(const TcpHeader &tcpHeader)
Calculate the number of acknowledged packets upon the receipt of an ACK packet.
keep track of time values and allow control of global simulation resolution
smart pointer class similar to boost::intrusive_ptr
double m_lastBW
Last bandwidth sample after being filtered.
int m_accountedFor
The number of received DUPACKs.
uint32_t m_ssThresh
Slow Start Threshold.
virtual void NewAck(SequenceNumber32 const &seq)
Update buffers w.r.t.
virtual void DupAck(const TcpHeader &t, uint32_t count)
Received dupack (duplicate ACK)
virtual uint32_t Window(void)
Return the max possible number of unacked bytes.
virtual void Retransmit(void)
Halving cwnd and call DoRetransmit()
virtual int Listen(void)
Listen for incoming connections.
a polymophic address class
TracedValue< uint32_t > m_cWnd
Congestion window.
enum FilterType m_fType
0 for none, 1 for Tustin
void Filtering(void)
Tustin filter.
virtual uint32_t GetInitialCwnd(void) const
Get the initial Congestion Window.
virtual void SetSSThresh(uint32_t threshold)
Set the Slow Start Threshold.
A base class for implementation of a stream socket using TCP.
bool m_inFastRec
Currently in fast recovery if TRUE.
void UpdateAckedSegments(int acked)
Update the total number of acknowledged packets during the current RTT.
ProtocolType
Protocol variant (Westwood or Westwood+)
double m_lastAck
The time last ACK was received.
SequenceNumber32 m_prevAckNo
Previously received ACK number.
static TypeId GetTypeId(void)
Get the type ID.
virtual void SetSegSize(uint32_t size)
Set the segment size.
FilterType
Filter type (None or Tustin)
virtual ~TcpWestwood(void)
int m_ackedSegments
The number of segments ACKed between RTTs.
virtual void ReceivedAck(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Process the newly received ACK.
virtual void SetInitialCwnd(uint32_t cwnd)
Set the initial Congestion Window.
virtual Ptr< TcpSocketBase > Fork(void)
Call CopyObject<> to clone me.
an identifier for simulation events.
double m_lastSampleBW
Last bandwidth sample.
TracedValue< double > m_currentBW
Current value of the estimated BW.
bool m_IsCount
Start keeping track of m_ackedSegments for Westwood+ if TRUE.
void EstimateBW(int acked, const TcpHeader &tcpHeader, Time rtt)
Estimate the network's bandwidth.
virtual uint32_t GetSSThresh(void) const
Get the Slow Start Threshold.
uint32_t m_initialCWnd
Initial cWnd value.
Time m_minRtt
Minimum RTT.
virtual int Connect(const Address &address)
Initiate a connection to a remote host.
a unique identifier for an interface.
virtual void EstimateRtt(const TcpHeader &header)
Estimate the RTT, record the minimum value, and run a clock on the RTT to trigger Westwood+ bandwidth...
An implementation of a stream socket using TCP.
enum ProtocolType m_pType
0 for Westwood, 1 for Westwood+