ns-3
ns3::TcpTahoe Class Reference

An implementation of a stream socket using TCP. More...

#include <tcp-tahoe.h>

Inheritance diagram for ns3::TcpTahoe:
Collaboration diagram for ns3::TcpTahoe:

List of all members.

Public Member Functions

 TcpTahoe (void)
 TcpTahoe (const TcpTahoe &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::TcpTahoe.

Protected Member Functions

virtual uint32_t Window (void)
virtual Ptr< TcpSocketBaseFork (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
uint32_t m_retxThresh

Detailed Description

An implementation of a stream socket using TCP.

This class contains the Tahoe implementation of TCP. Tahoe is not officially published in RFC. The reference for implementing this is based on Kevin Fall and Sally Floyd, "Simulation-based Comparisons of Tahoe, Reno, and SACK TCP", CCR, 1996 http://inst.eecs.berkeley.edu/~ee122/fa05/projects/Project2/proj2_spec_files/sacks.pdf In summary, we have slow start, congestion avoidance, and fast retransmit. The implementation of these algorithms are based on W. R. Stevens's book and also RFC2001.


Constructor & Destructor Documentation

Create an unbound tcp socket.

References NS_LOG_FUNCTION.


Member Function Documentation

int ns3::TcpTahoe::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::TcpTahoe::DupAck ( const TcpHeader t,
uint32_t  count 
) [protected, virtual]

Cut down ssthresh upon triple dupack

Implements ns3::TcpSocketBase.

References ns3::TcpTxBuffer::HeadSequence(), ns3::Simulator::Now(), NS_LOG_FUNCTION, NS_LOG_INFO, and NS_LOG_LOGIC.

TypeId ns3::TcpTahoe::GetTypeId ( void  ) [static]

This method returns the TypeId associated to ns3::TcpTahoe.

This object is accessible through the following paths with Config::Set and Config::Connect:

  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::Ipv4L4Protocol/$ns3::TcpL4Protocol/SocketList/[i]/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::TcpL4Protocol/SocketList/[i]/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::TcpSocket/$ns3::TcpSocketBase/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::TcpSocket/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::TcpSocketBase/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::AlohaNoackNetDevice/Phy/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::Ipv4L4Protocol/$ns3::TcpL4Protocol/SocketList/[i]/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::TcpL4Protocol/SocketList/[i]/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::TcpSocket/$ns3::TcpSocketBase/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::TcpSocket/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::TcpSocketBase/$ns3::TcpTahoe
  • /NodeList/[i]/DeviceList/[i]/$ns3::NonCommunicatingNetDevice/Phy/$ns3::TcpTahoe

Attributes defined for this type:

  • ReTxThreshold: Threshold for fast retransmit

Attributes defined in parent class ns3::TcpSocketBase:

  • MaxSegLifetime: Maximum segment lifetime in seconds, use for TIME_WAIT state transition to CLOSED state
    • Set with class: ns3::DoubleValue
    • Underlying type: double 0:1.79769e+308
    • Initial value: 120
    • Flags: construct write read
  • MaxWindowSize: Max size of advertised window

Attributes defined in parent class ns3::TcpSocket:

  • SndBufSize: TcpSocket maximum transmit buffer size (bytes)
  • RcvBufSize: TcpSocket maximum receive buffer size (bytes)
  • SegmentSize: TCP maximum segment size in bytes (may be adjusted based on MTU discovery)
  • SlowStartThreshold: TCP slow start threshold (bytes)
  • InitialCwnd: TCP initial congestion window size (segments)
  • ConnTimeout: TCP retransmission timeout when opening connection (seconds)
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +3000000000.0ns
    • Flags: construct write read
  • ConnCount: Number of connection attempts (SYN retransmissions) before returning failure
  • DelAckTimeout: Timeout value for TCP delayed acks, in seconds
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +200000000.0ns
    • Flags: construct write read
  • DelAckCount: Number of packets to wait before sending a TCP ack
  • TcpNoDelay: Set to true to disable Nagle's algorithm
    • Set with class: BooleanValue
    • Underlying type: bool
    • Initial value: true
    • Flags: construct write read
  • PersistTimeout: Persist timeout to probe for rx window
    • Set with class: TimeValue
    • Underlying type: Time
    • Initial value: +6000000000.0ns
    • Flags: construct write read

TraceSources defined for this type:

  • CongestionWindow: The TCP connection's congestion window

TraceSources defined in parent class ns3::TcpSocketBase:

  • RTO: Retransmission timeout
  • RTT: Last RTT sample
  • NextTxSequence: Next sequence number to send (SND.NXT)
  • HighestSequence: Highest sequence number ever sent in socket's life time
  • State: TCP state
  • RWND: Remote side's flow control window

Reimplemented from ns3::TcpSocketBase.

References ns3::MakeTraceSourceAccessor(), and ns3::TypeId::SetParent().

int ns3::TcpTahoe::Listen ( void  ) [virtual]

We initialize m_cWnd from this function, after attributes initialized

Reimplemented from ns3::TcpSocketBase.

References NS_LOG_FUNCTION.

void ns3::TcpTahoe::NewAck ( SequenceNumber32 const &  seq) [protected, virtual]

New ACK (up to seqnum seq) received. Increase cwnd and call TcpSocketBase::NewAck()

Reimplemented from ns3::TcpSocketBase.

References NS_LOG_FUNCTION, NS_LOG_INFO, and NS_LOG_LOGIC.

void ns3::TcpTahoe::Retransmit ( void  ) [protected, virtual]
uint32_t ns3::TcpTahoe::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.


The documentation for this class was generated from the following files: