ns-3
|
An implementation of a stream socket using TCP. More...
#include <tcp-newreno.h>
Public Member Functions | |
TcpNewReno (void) | |
TcpNewReno (const TcpNewReno &sock) | |
virtual int | Connect (const Address &address) |
virtual int | Listen (void) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::TcpNewReno. | |
Protected Member Functions | |
virtual uint32_t | Window (void) |
virtual Ptr< TcpSocketBase > | Fork (void) |
virtual void | NewAck (SequenceNumber32 const &seq) |
virtual void | DupAck (const TcpHeader &t, uint32_t count) |
virtual void | Retransmit (void) |
virtual void | SetSegSize (uint32_t size) |
virtual void | SetSSThresh (uint32_t threshold) |
virtual uint32_t | GetSSThresh (void) const |
virtual void | SetInitialCwnd (uint32_t cwnd) |
virtual uint32_t | GetInitialCwnd (void) const |
Protected Attributes | |
TracedValue< uint32_t > | m_cWnd |
uint32_t | m_ssThresh |
uint32_t | m_initialCWnd |
SequenceNumber32 | m_recover |
uint32_t | m_retxThresh |
bool | m_inFastRec |
bool | m_limitedTx |
An implementation of a stream socket using TCP.
This class contains the NewReno implementation of TCP, as of RFC2582.
ns3::TcpNewReno::TcpNewReno | ( | void | ) |
Create an unbound tcp socket.
References NS_LOG_FUNCTION.
int ns3::TcpNewReno::Connect | ( | const Address & | address | ) | [virtual] |
We initialize m_cWnd from this function, after attributes initialized
Reimplemented from ns3::TcpSocketBase.
References NS_LOG_FUNCTION.
void ns3::TcpNewReno::DupAck | ( | const TcpHeader & | t, |
uint32_t | count | ||
) | [protected, virtual] |
Cut cwnd and enter fast recovery mode upon triple dupack
Implements ns3::TcpSocketBase.
References NS_LOG_FUNCTION, NS_LOG_INFO, ns3::TcpSocketBase::SendDataPacket(), ns3::TcpSocketBase::SendPendingData(), and ns3::TcpTxBuffer::SizeFromSequence().
TypeId ns3::TcpNewReno::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::TcpNewReno.
This object is accessible through the following paths with Config::Set and Config::Connect:
Attributes defined for this type:
Attributes defined in parent class ns3::TcpSocketBase:
Attributes defined in parent class ns3::TcpSocket:
TraceSources defined for this type:
TraceSources defined in parent class ns3::TcpSocketBase:
Reimplemented from ns3::TcpSocketBase.
References ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().
Referenced by ns3::TcpL4Protocol::GetTypeId().
int ns3::TcpNewReno::Listen | ( | void | ) | [virtual] |
We initialize m_cWnd from this function, after attributes initialized
Reimplemented from ns3::TcpSocketBase.
References NS_LOG_FUNCTION.
void ns3::TcpNewReno::NewAck | ( | SequenceNumber32 const & | seq | ) | [protected, virtual] |
New ACK (up to seqnum seq) received. Increase cwnd and call TcpSocketBase::NewAck()
Reimplemented from ns3::TcpSocketBase.
References ns3::TcpTxBuffer::HeadSequence(), NS_LOG_FUNCTION, NS_LOG_INFO, and NS_LOG_LOGIC.
void ns3::TcpNewReno::Retransmit | ( | void | ) | [protected, virtual] |
Retransmit timeout
Reimplemented from ns3::TcpSocketBase.
References ns3::TcpTxBuffer::HeadSequence(), ns3::Simulator::Now(), NS_LOG_FUNCTION, NS_LOG_INFO, and NS_LOG_LOGIC.
uint32_t ns3::TcpNewReno::Window | ( | void | ) | [protected, virtual] |
Limit the size of in-flight data by cwnd and receiver's rxwin
Reimplemented from ns3::TcpSocketBase.
References NS_LOG_FUNCTION.