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.
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
FilterType
Filter type (None or Tustin)
double m_lastBW
Last bandwidth sample after being filtered.
int m_accountedFor
The number of received DUPACKs.
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.
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.
double m_lastAck
The time last ACK was received.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
SequenceNumber32 m_prevAckNo
Previously received ACK number.
static TypeId GetTypeId(void)
Get the type ID.
TracedValue< uint32_t > m_ssThresh
Slow Start Threshold.
virtual void SetSegSize(uint32_t size)
Set the segment size.
virtual ~TcpWestwood(void)
int m_ackedSegments
The number of segments ACKed between RTTs.
uint32_t m_initialSsThresh
Initial Slow Start Threshold value.
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.
virtual uint32_t GetInitialSSThresh(void) const
Get the initial Slow Start Threshold.
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.
uint32_t m_initialCWnd
Initial cWnd value.
ProtocolType
Protocol variant (Westwood or Westwood+)
Time m_minRtt
Minimum RTT.
virtual void ScaleSsThresh(uint8_t scaleFactor)
Scale the initial SsThresh value to the correct one.
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...
virtual void SetInitialSSThresh(uint32_t threshold)
Set the initial Slow Start Threshold.
An implementation of a stream socket using TCP.
enum ProtocolType m_pType
0 for Westwood, 1 for Westwood+