33 #ifndef TCP_WESTWOOD_H
34 #define TCP_WESTWOOD_H
37 #include "ns3/packet.h"
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 void Retransmit(void)
Halving cwnd and call DoRetransmit()
enum FilterType m_fType
0 for none, 1 for Tustin
void Filtering(void)
Tustin filter.
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.
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 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.
ProtocolType
Protocol variant (Westwood or Westwood+)
Time m_minRtt
Minimum RTT.
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+