22 #define NS_LOG_APPEND_CONTEXT \ 
   23   if (m_node) { std::clog << " [node " << m_node->GetId () << "] "; } 
   25 #include "ns3/abort.h" 
   27 #include "ns3/inet-socket-address.h" 
   28 #include "ns3/inet6-socket-address.h" 
   32 #include "ns3/ipv4-interface-address.h" 
   33 #include "ns3/ipv4-route.h" 
   34 #include "ns3/ipv6-route.h" 
   35 #include "ns3/ipv4-routing-protocol.h" 
   36 #include "ns3/ipv6-routing-protocol.h" 
   37 #include "ns3/simulation-singleton.h" 
   38 #include "ns3/simulator.h" 
   39 #include "ns3/packet.h" 
   40 #include "ns3/uinteger.h" 
   41 #include "ns3/double.h" 
   42 #include "ns3/pointer.h" 
   43 #include "ns3/trace-source-accessor.h" 
   68     .SetGroupName (
"Internet")
 
   75     .AddAttribute (
"MaxSegLifetime",
 
   76                    "Maximum segment lifetime in seconds, use for TIME_WAIT state transition to CLOSED state",
 
   79                    MakeDoubleChecker<double> (0))
 
   80     .AddAttribute (
"MaxWindowSize", 
"Max size of advertised window",
 
   83                    MakeUintegerChecker<uint16_t> ())
 
   84     .AddAttribute (
"IcmpCallback", 
"Callback invoked whenever an icmp error is received on this socket.",
 
   88     .AddAttribute (
"IcmpCallback6", 
"Callback invoked whenever an icmpv6 error is received on this socket.",
 
   92     .AddAttribute (
"WindowScaling", 
"Enable or disable Window Scaling option",
 
   96     .AddAttribute (
"Timestamp", 
"Enable or disable Timestamp option",
 
  100     .AddAttribute (
"MinRto",
 
  101                    "Minimum retransmit timeout value",
 
  107     .AddAttribute (
"ClockGranularity",
 
  108                    "Clock Granularity used in RTO calculations",
 
  113     .AddAttribute (
"TxBuffer",
 
  117                                        MakePointerChecker<TcpTxBuffer> ())
 
  118     .AddAttribute (
"RxBuffer",
 
  122                    MakePointerChecker<TcpRxBuffer> ())
 
  123     .AddAttribute (
"ReTxThreshold", 
"Threshold for fast retransmit",
 
  126                     MakeUintegerChecker<uint32_t> ())
 
  127     .AddAttribute (
"LimitedTransmit", 
"Enable limited transmit",
 
  131     .AddTraceSource (
"RTO",
 
  132                      "Retransmission timeout",
 
  134                      "ns3::Time::TracedValueCallback")
 
  135     .AddTraceSource (
"RTT",
 
  138                      "ns3::Time::TracedValueCallback")
 
  139     .AddTraceSource (
"NextTxSequence",
 
  140                      "Next sequence number to send (SND.NXT)",
 
  142                      "ns3::SequenceNumber32TracedValueCallback")
 
  143     .AddTraceSource (
"HighestSequence",
 
  144                      "Highest sequence number ever sent in socket's life time",
 
  146                      "ns3::SequenceNumber32TracedValueCallback")
 
  147     .AddTraceSource (
"State",
 
  150                      "ns3::TcpStatesTracedValueCallback")
 
  151     .AddTraceSource (
"CongState",
 
  152                      "TCP Congestion machine state",
 
  154                      "ns3::TcpSocketState::TcpCongStatesTracedValueCallback")
 
  155     .AddTraceSource (
"RWND",
 
  156                      "Remote side's flow control window",
 
  158                      "ns3::TracedValueCallback::Uint32")
 
  159     .AddTraceSource (
"HighestRxSequence",
 
  160                      "Highest sequence number received from peer",
 
  162                      "ns3::SequenceNumber32TracedValueCallback")
 
  163     .AddTraceSource (
"HighestRxAck",
 
  164                      "Highest ack received from peer",
 
  166                      "ns3::SequenceNumber32TracedValueCallback")
 
  167     .AddTraceSource (
"CongestionWindow",
 
  168                      "The TCP connection's congestion window",
 
  170                      "ns3::TracedValueCallback::Uint32")
 
  171     .AddTraceSource (
"SlowStartThreshold",
 
  172                      "TCP slow start threshold (bytes)",
 
  174                      "ns3::TracedValueCallback::Uint32")
 
  175     .AddTraceSource (
"Tx",
 
  176                      "Send tcp packet to IP protocol",
 
  178                      "ns3::TcpSocketBase::TcpTxRxTracedCallback")
 
  179     .AddTraceSource (
"Rx",
 
  180                      "Receive tcp packet from IP protocol",
 
  182                      "ns3::TcpSocketBase::TcpTxRxTracedCallback")
 
  193     .SetGroupName (
"Internet")
 
  195     .AddTraceSource (
"CongestionWindow",
 
  196                      "The TCP connection's congestion window",
 
  198                      "ns3::TracedValue::Uint32Callback")
 
  199     .AddTraceSource (
"SlowStartThreshold",
 
  200                      "TCP slow start threshold (bytes)",
 
  202                      "ns3::TracedValue::Uint32Callback")
 
  203     .AddTraceSource (
"CongState",
 
  204                      "TCP Congestion machine state",
 
  206                      "ns3::TracedValue::TcpCongStatesTracedValueCallback")
 
  216     m_initialSsThresh (0),
 
  218     m_congState (CA_OPEN)
 
  224     m_cWnd (other.m_cWnd),
 
  225     m_ssThresh (other.m_ssThresh),
 
  226     m_initialCWnd (other.m_initialCWnd),
 
  227     m_initialSsThresh (other.m_initialSsThresh),
 
  228     m_segmentSize (other.m_segmentSize),
 
  229     m_congState (other.m_congState)
 
  236   "CA_OPEN", 
"CA_DISORDER", 
"CA_CWR", 
"CA_RECOVERY", 
"CA_LOSS" 
  247     m_nextTxSequence (0),
 
  253     m_errno (ERROR_NOTERROR),
 
  254     m_closeNotified (false),
 
  255     m_closeOnEmpty (false),
 
  256     m_shutdownSend (false),
 
  257     m_shutdownRecv (false),
 
  263     m_bytesAckedNotProcessed (0),
 
  264     m_sndScaleFactor (0),
 
  265     m_rcvScaleFactor (0),
 
  266     m_timestampEnabled (true),
 
  267     m_timestampToEcho (0),
 
  270     m_congestionControl (0),
 
  271     m_isFirstPartialAck (true)
 
  276   m_tcb      = CreateObject<TcpSocketState> ();
 
  280   ok = m_tcb->TraceConnectWithoutContext (
"CongestionWindow",
 
  284   ok = m_tcb->TraceConnectWithoutContext (
"SlowStartThreshold",
 
  288   ok = m_tcb->TraceConnectWithoutContext (
"CongState",
 
  296     m_dupAckCount (sock.m_dupAckCount),
 
  298     m_delAckMaxCount (sock.m_delAckMaxCount),
 
  299     m_noDelay (sock.m_noDelay),
 
  300     m_synRetries (sock.m_synRetries),
 
  301     m_delAckTimeout (sock.m_delAckTimeout),
 
  302     m_persistTimeout (sock.m_persistTimeout),
 
  303     m_cnTimeout (sock.m_cnTimeout),
 
  306     m_node (sock.m_node),
 
  309     m_nextTxSequence (sock.m_nextTxSequence),
 
  310     m_highTxMark (sock.m_highTxMark),
 
  311     m_state (sock.m_state),
 
  312     m_errno (sock.m_errno),
 
  313     m_closeNotified (sock.m_closeNotified),
 
  314     m_closeOnEmpty (sock.m_closeOnEmpty),
 
  315     m_shutdownSend (sock.m_shutdownSend),
 
  316     m_shutdownRecv (sock.m_shutdownRecv),
 
  317     m_connected (sock.m_connected),
 
  319     m_maxWinSize (sock.m_maxWinSize),
 
  320     m_rWnd (sock.m_rWnd),
 
  321     m_highRxMark (sock.m_highRxMark),
 
  322     m_highRxAckMark (sock.m_highRxAckMark),
 
  323     m_bytesAckedNotProcessed (sock.m_bytesAckedNotProcessed),
 
  324     m_winScalingEnabled (sock.m_winScalingEnabled),
 
  325     m_sndScaleFactor (sock.m_sndScaleFactor),
 
  326     m_rcvScaleFactor (sock.m_rcvScaleFactor),
 
  327     m_timestampEnabled (sock.m_timestampEnabled),
 
  328     m_timestampToEcho (sock.m_timestampToEcho),
 
  329     m_retxThresh (sock.m_retxThresh),
 
  330     m_limitedTx (sock.m_limitedTx),
 
  332     m_isFirstPartialAck (sock.m_isFirstPartialAck),
 
  333     m_txTrace (sock.m_txTrace),
 
  334     m_rxTrace (sock.m_rxTrace)
 
  346   Callback<void, Ptr<Socket>, uint32_t> vPSUI = MakeNullCallback<void, Ptr<Socket>, uint32_t> ();
 
  361   ok = 
m_tcb->TraceConnectWithoutContext (
"CongestionWindow",
 
  365   ok = 
m_tcb->TraceConnectWithoutContext (
"SlowStartThreshold",
 
  369   ok = 
m_tcb->TraceConnectWithoutContext (
"CongState",
 
  458   m_tcp->AddSocket(
this);
 
  474   m_tcp->AddSocket(
this);
 
  544   m_tcp->AddSocket(
this);
 
  562     "TcpSocketBase::SetSSThresh() cannot change initial ssThresh after connection started.");
 
  564   m_tcb->m_initialSsThresh = threshold;
 
  570   return m_tcb->m_initialSsThresh;
 
  577     "TcpSocketBase::SetInitialCwnd() cannot change initial cwnd after connection started.");
 
  579   m_tcb->m_initialCWnd = cwnd;
 
  585   return m_tcb->m_initialCWnd;
 
  591   m_tcb->m_ssThresh <<= scaleFactor;
 
  699       NS_LOG_WARN (
"Socket " << 
this << 
" << unread rx data during close.  Sending reset." <<
 
  700                    "This is probably due to a bad sink application; check its code");
 
  766   NS_ABORT_MSG_IF (flags, 
"use of flags is not supported in TcpSocketBase::Send()");
 
  804   return Send (p, flags); 
 
  813   NS_ABORT_MSG_IF (flags, 
"use of flags is not supported in TcpSocketBase::Recv()");
 
  816       return Create<Packet> (); 
 
  819   if (outPacket != 0 && outPacket->
GetSize () != 0)
 
  842   if (packet != 0 && packet->
GetSize () != 0)
 
 1050       return (
m_rxBuffer->NextRxSequence () != head);
 
 1054   return (tail < m_rxBuffer->NextRxSequence () || 
m_rxBuffer->MaxRxSequence () <= head);
 
 1096                             uint8_t icmpType, uint8_t icmpCode,
 
 1099   NS_LOG_FUNCTION (
this << icmpSource << (uint32_t)icmpTtl << (uint32_t)icmpType <<
 
 1100                    (uint32_t)icmpCode << icmpInfo);
 
 1103       m_icmpCallback (icmpSource, icmpTtl, icmpType, icmpCode, icmpInfo);
 
 1109                             uint8_t icmpType, uint8_t icmpCode,
 
 1112   NS_LOG_FUNCTION (
this << icmpSource << (uint32_t)icmpTtl << (uint32_t)icmpType <<
 
 1113                    (uint32_t)icmpCode << icmpInfo);
 
 1126   uint32_t bytesRemoved = packet->
RemoveHeader (tcpHeader);
 
 1127   if (bytesRemoved == 0 || bytesRemoved > 60)
 
 1129       NS_LOG_ERROR (
"Bytes removed: " << bytesRemoved << 
" invalid");
 
 1149                     ") out of range [" << 
m_rxBuffer->NextRxSequence () << 
":" <<
 
 1175       NS_LOG_LOGIC (
this << 
" Enter zerowindow persist state");
 
 1176       NS_LOG_LOGIC (
this << 
" Cancelled ReTxTimeout event which was set to expire at " <<
 
 1240       NS_LOG_LOGIC (
this << 
" Leaving zerowindow persist state");
 
 1271                         " SND.UNA = " << 
m_txBuffer->HeadSequence ());
 
 1304   else if (tcpflags == 0)
 
 1333   uint32_t segsAcked  = bytesAcked / 
m_tcb->m_segmentSize;
 
 1343                 " Segments acked: " << segsAcked <<
 
 1347                 " SND.UNA=" << 
m_txBuffer->HeadSequence () <<
 
 1388                            "Reset cwnd to " << 
m_tcb->m_cWnd << 
", ssthresh to " <<
 
 1395                               "in DISORDER state");
 
 1402                        "Increase cwnd to " << 
m_tcb->m_cWnd);
 
 1416       bool callCongestionControl = 
true;
 
 1417       bool resetRTO = 
true;
 
 1430      uint32_t newSegsAcked = segsAcked;
 
 1471                   m_tcb->m_cWnd += 
m_tcb->m_segmentSize - bytesAcked;
 
 1475                   m_tcb->m_cWnd -= bytesAcked;
 
 1478               callCongestionControl = 
false; 
 
 1499                            " in fast recovery: cwnd set to " << 
m_tcb->m_cWnd <<
 
 1505               m_tcb->m_cWnd = std::min (
m_tcb->m_ssThresh.Get (),
 
 1520                            ". Leaving fast recovery with cwnd set to " << 
m_tcb->m_cWnd);
 
 1534       if (callCongestionControl)
 
 1539                         " cWnd: " << 
m_tcb->m_cWnd <<
 
 1540                         " ssTh: " << 
m_tcb->m_ssThresh);
 
 1596                           packet, tcpHeader, fromAddress, toAddress);
 
 1651                         " received. Reset packet is sent.");
 
 1732                         " received. Reset packet is sent.");
 
 1789                         " received. Reset packet is sent.");
 
 1944       NS_LOG_LOGIC (
"TCP " << 
this << 
" calling NotifyNormalClose");
 
 1958       NS_LOG_LOGIC (
"TcpSocketBase " << 
this << 
" scheduling LATO1");
 
 1973       m_tcp->RemoveSocket(
this);
 
 1975   NS_LOG_LOGIC (
this << 
" Cancelled ReTxTimeout event which was set to expire at " <<
 
 1989       m_tcp->RemoveSocket(
this);
 
 1991   NS_LOG_LOGIC (
this << 
" Cancelled ReTxTimeout event which was set to expire at " <<
 
 2041       NS_LOG_WARN (
"Failed to send empty packet due to null endpoint");
 
 2053   header.SetFlags (flags);
 
 2054   header.SetSequenceNumber (s);
 
 2055   header.SetAckNumber (
m_rxBuffer->NextRxSequence ());
 
 2111       NS_LOG_LOGIC (
"Schedule retransmission timeout at time " 
 2138       m_tcp->RemoveSocket(
this);
 
 2146       m_tcp->RemoveSocket(
this);
 
 2157   if (ipv4->GetRoutingProtocol () == 0)
 
 2168   route = ipv4->GetRoutingProtocol ()->RouteOutput (
Ptr<Packet> (), header, oif, errno_);
 
 2187   if (ipv6->GetRoutingProtocol () == 0)
 
 2198   route = ipv6->GetRoutingProtocol ()->RouteOutput (
Ptr<Packet> (), header, oif, errno_);
 
 2235   m_tcp->AddSocket(
this);
 
 2270   bool isRetransmission = 
false;
 
 2273       isRetransmission = 
true;
 
 2363       NS_LOG_LOGIC (
this << 
" SendDataPacket Schedule ReTxTimeout at time " <<
 
 2373       NS_LOG_DEBUG (
"Send segment of size " << sz << 
" with remaining data " <<
 
 2375                     ". Header " << header);
 
 2381       NS_LOG_DEBUG (
"Send segment of size " << sz << 
" with remaining data " <<
 
 2383                     ". Header " << header);
 
 2389   if (isRetransmission == 
false)
 
 2432   uint32_t nPacketsSent = 0;
 
 2439           NS_LOG_LOGIC (
"Preventing Silly Window Syndrome. Wait to send.");
 
 2447           NS_LOG_LOGIC (
"Invoking Nagle's algorithm. Wait to send.");
 
 2450       NS_LOG_LOGIC (
"TcpSocketBase " << 
this << 
" SendPendingData" <<
 
 2453                     " segsize " << 
m_tcb->m_segmentSize <<
 
 2455                     " highestRxAck " << 
m_txBuffer->HeadSequence () <<
 
 2460                     " cWnd: " << 
m_tcb->m_cWnd <<
 
 2463       uint32_t s = std::min (w, 
m_tcb->m_segmentSize);  
 
 2468   if (nPacketsSent > 0)
 
 2470       NS_LOG_DEBUG (
"SendPendingData sent " << nPacketsSent << 
" segments");
 
 2472   return (nPacketsSent > 0);
 
 2501   uint32_t win = 
Window ();           
 
 2503   NS_LOG_DEBUG (
"UnAckCount=" << unack << 
", Win=" << win);
 
 2504   return (win < unack) ? 0 : (win - unack);
 
 2516       NS_LOG_WARN (
"There is a loss in the adv win size, wrt buffer size");
 
 2520   return (uint16_t) 
w;
 
 2529                 " pkt size=" << p->
GetSize () );
 
 2560   if (expectedSeq < m_rxBuffer->NextRxSequence ())
 
 2569           NS_LOG_WARN (
"Why TCP " << 
this << 
" got data after close notification?");
 
 2624       m_rtt->Measurement (m);                
 
 2642       NS_LOG_LOGIC (
this << 
" Cancelled ReTxTimeout event which was set to expire at " <<
 
 2649       NS_LOG_LOGIC (
this << 
" Schedule ReTxTimeout at time " <<
 
 2657                 " numberAck " << (ack - 
m_txBuffer->HeadSequence ())); 
 
 2669       NS_LOG_LOGIC (
this << 
" Cancelled ReTxTimeout event which was set to expire at " <<
 
 2687   if (m_state <= ESTABLISHED && m_txBuffer->HeadSequence () >= 
m_highTxMark)
 
 2768   if (m_state <= ESTABLISHED && m_txBuffer->HeadSequence () >= 
m_highTxMark) 
return;
 
 2836       NS_LOG_INFO (
"No more data retries available. Dropping connection");
 
 2930   m_tcb->m_segmentSize = size;
 
 2938   return m_tcb->m_segmentSize;
 
 3037   return (!allowBroadcast);
 
 3104   if (m_rcvScaleFactor > 14)
 
 3106       NS_LOG_WARN (
"Possible error; m_rcvScaleFactor exceeds 14: " << m_rcvScaleFactor);
 
 3107       m_rcvScaleFactor = 14;
 
 3118   uint32_t maxSpace = 
m_rxBuffer->MaxBufferSize ();
 
 3123       maxSpace = maxSpace >> 1;
 
 3129       NS_LOG_WARN (
"Possible error; scale exceeds 14: " << scale);
 
 3134                static_cast<int> (scale) << 
" for buffer size " << 
m_rxBuffer->MaxBufferSize ());
 
 3150   option->SetScale (m_sndScaleFactor);
 
 3167                m_timestampToEcho << 
" and Echo="     << ts->GetEcho ());
 
 3192   NS_LOG_INFO (
"Received (scaled) window is " << receivedWindow << 
" bytes");
 
 3206   bool update = 
false;
 
 3296   return CopyObject<TcpSocketBase> (
this);
 
 3301   : seq (s), count (c), time (t), retx (false)
 
 3306   : seq (h.seq), count (h.count), time (h.time), retx (h.retx)
 
void SetCongestionControlAlgorithm(Ptr< TcpCongestionOps > algo)
Install a congestion control algorithm on this socket. 
static Time GetDelayLeft(const EventId &id)
Get the remaining time until this event will execute. 
Ipv6Address GetLocalAddress()
Get the local address. 
void PeerClose(Ptr< Packet > p, const TcpHeader &tcpHeader)
Received a FIN from peer, notify rx buffer. 
uint32_t RemoveHeader(Header &header)
Deserialize and remove the header from the internal buffer. 
Custom version of log2() to deal with Bug 1467. 
void SetTclass(uint8_t tclass)
Set the tag's Tclass. 
bool m_limitedTx
perform limited transmit 
void ProcessListen(Ptr< Packet > packet, const TcpHeader &tcpHeader, const Address &fromAddress, const Address &toAddress)
Received a packet upon LISTEN state. 
virtual void SetInitialCwnd(uint32_t cwnd)
Set the initial Congestion Window. 
Ipv6Address GetIpv6(void) const 
Get the IPv6 address. 
virtual int Listen(void)
Listen for incoming connections. 
Simulation virtual time values and global simulation resolution. 
bool IsManualIpTtl(void) const 
Checks if the socket has a specific IPv4 TTL set. 
virtual int GetSockName(Address &address) const 
Get socket address. 
Ipv4Address GetIpv4(void) const 
static Ipv4Address GetAny(void)
virtual uint32_t Window(void) const 
Return the max possible number of unacked bytes. 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void ProcessWait(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received a packet upon CLOSE_WAIT, FIN_WAIT_1, FIN_WAIT_2. 
Normal state, no dubious events. 
uint32_t m_dataRetries
Number of data retransmission attempts. 
SocketErrno
Enumeration of the possible errors returned by a socket. 
virtual void SetInitialSSThresh(uint32_t threshold)
Set the initial Slow Start Threshold. 
AttributeValue implementation for Boolean. 
virtual uint8_t GetIpTtl(void) const 
Query the value of IP Time to Live field of this socket. 
bool m_noDelay
Set to true to disable Nagle's algorithm. 
virtual uint32_t GetSegSize(void) const 
Get the segment size. 
CWND was reduced, we are fast-retransmitting. 
In all the respects it is "Open", but requires a bit more attention. 
Time GetClockGranularity(void) const 
Get the Clock Granularity (used in RTO calcs). 
uint8_t GetIpTos(void) const 
Query the value of IP Type of Service of this socket. 
This class implements a tag that carries the socket-specific HOPLIMIT of a packet to the IPv6 layer...
uint32_t SendDataPacket(SequenceNumber32 seq, uint32_t maxSize, bool withAck)
Extract at most maxSize bytes from the TxBuffer at sequence seq, add the TCP header, and send to TcpL4Protocol. 
(abstract) base class of all TcpSockets 
Ipv4EndPoint * m_endPoint
the IPv4 endpoint 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
static Time ElapsedTimeFromTsValue(uint32_t echoTime)
Estimate the Time elapsed from a TS echo value. 
virtual uint32_t BytesInFlight(void) const 
Return total bytes in flight. 
virtual ~TcpSocketBase(void)
Ptr< T > GetObject(void) const 
Get a pointer to the requested aggregated Object. 
uint32_t m_dataRetrCount
Count of remaining data retransmission attempts. 
TracedValue< Time > m_lastRtt
Last RTT sample collected. 
uint32_t m_synRetries
Number of connection attempts. 
Sent a connection request, waiting for ack. 
void NotifyDataRecv(void)
Notify through the callback (if set) that some data have been received. 
TracedValue< SequenceNumber32 > m_highRxAckMark
Highest ack received. 
virtual int ShutdownRecv(void)
void SetRxCallback(Callback< void, Ptr< Packet >, Ipv4Header, uint16_t, Ptr< Ipv4Interface > > callback)
Set the reception callback. 
TcpSocketBase(void)
Create an unbound TCP socket. 
void SetClockGranularity(Time clockGranularity)
Sets the Clock Granularity (used in RTO calcs). 
EventId m_retxEvent
Retransmission event. 
Ptr< Packet > Recv(void)
Read a single packet from the socket. 
IPv6 layer implementation. 
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void SetDestroyCallback(Callback< void > callback)
Set the default destroy callback. 
void ForwardUp6(Ptr< Packet > packet, Ipv6Header header, uint16_t port, Ptr< Ipv6Interface > incomingInterface)
Called by the L3 protocol when it received a packet to pass on to TCP. 
void AddPacketTag(const Tag &tag) const 
Add a packet tag. 
void SetAddress(Address addr)
Set the tag's address. 
virtual void SetPersistTimeout(Time timeout)
Set the timout for persistent connection. 
virtual int Send(Ptr< Packet > p, uint32_t flags)
Send data (or dummy data) to the remote host. 
virtual bool GetAllowBroadcast(void) const 
Query whether broadcast datagram transmissions are allowed. 
EventId m_timewaitEvent
TIME_WAIT expiration event: Move this socket to CLOSED state. 
void NotifyConnectionFailed(void)
Notify through the callback (if set) that the connection has not been established due to an error...
static const char *const TcpCongStateName[TcpSocketState::CA_LAST_STATE]
Literal names of TCP states for use in log messages. 
static TypeId GetTypeId(void)
Get the type ID. 
Received a connection request, sent ack, waiting for final ack in three-way handshake. 
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
void SendRST(void)
Send reset and tear down this socket. 
static Ipv6Address GetAny()
Get the "any" (::) Ipv6Address. 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
Ptr< TcpSocketState > m_tcb
Congestion control informations. 
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit. 
bool m_winScalingEnabled
Window Scale option enabled. 
bool m_timestampEnabled
Timestamp option enabled. 
uint16_t m_maxWinSize
Maximum window size to advertise. 
uint32_t GetSize(void) const 
Returns the the size in bytes of the packet (including the zero-filled initial payload). 
bool retx
True if this has been retransmitted. 
virtual void NewAck(SequenceNumber32 const &seq, bool resetRTO)
Update buffers w.r.t. 
bool IsManualIpTos(void) const 
Checks if the socket has a specific IPv4 ToS set. 
Callback< void, Ipv4Address, uint8_t, uint8_t, uint8_t, uint32_t > m_icmpCallback
ICMP callback. 
void CancelAllTimers(void)
Cancel all timer when endpoint is deleted. 
uint32_t count
Number of bytes sent. 
void BindToNetDevice(Ptr< NetDevice > netdevice)
Bind a socket to specific device. 
Both sides have shutdown but we still have data we have to finish sending. 
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO. 
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate. 
virtual uint8_t GetIpv6HopLimit(void) const 
Query the value of IP Hop Limit field of this socket. 
Time m_cnTimeout
Timeout for connection retry. 
void(* Time)(Time oldValue, Time newValue)
TracedValue callback signature for Time. 
Data structure that records the congestion state of a connection. 
bool IsRunning(void) const 
This method is syntactic sugar for !IsExpired(). 
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function. 
SocketType
Enumeration of the possible socket types. 
EventId m_lastAckEvent
Last ACK timeout event. 
void ConnectionSucceeded(void)
Schedule-friendly wrapper for Socket::NotifyConnectionSucceeded() 
void SetTos(uint8_t tos)
Set the tag's TOS. 
TracedValue< SequenceNumber32 > m_nextTxSequence
Next seqnum to be sent (SND.NXT), ReTx pushes it back. 
virtual void ReceivedAck(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received an ACK packet. 
T Get(void) const 
Get the underlying value. 
This class implements a tag that carries the socket-specific TTL of a packet to the IP layer...
virtual uint32_t GetDataRetries(void) const 
Get the number of data transmission retries before giving up. 
virtual Time GetPersistTimeout(void) const 
Get the timout for persistent connection. 
void DoPeerClose(void)
FIN is in sequence, notify app and respond with a FIN. 
bool NotifyConnectionRequest(const Address &from)
Notify through the callback (if set) that an incoming connection is being requested by a remote host...
virtual void PersistTimeout(void)
Send 1 byte probe to get an updated window size. 
virtual void SetSynRetries(uint32_t count)
Set the number of connection retries before giving up. 
Ptr< TcpTxBuffer > GetTxBuffer(void) const 
Get a pointer to the Tx buffer. 
TracedValue< TcpStates_t > m_state
TCP state. 
uint32_t m_delAckMaxCount
Number of packet to fire an ACK before delay timeout. 
uint8_t CalculateWScale() const 
Calculate window scale value based on receive buffer space. 
a polymophic address class 
void SetMinRto(Time minRto)
Sets the Minimum RTO. 
void SetDestroyCallback(Callback< void > callback)
Set the default destroy callback. 
uint16_t GetPeerPort()
Get the peer port. 
AttributeValue implementation for Callback. 
virtual uint32_t GetRcvBufSize(void) const 
Get the receive buffer size. 
Ptr< const TraceSourceAccessor > MakeTraceSourceAccessor(T a)
Create a TraceSourceAccessor which will control access to the underlying trace source. 
uint32_t m_delAckCount
Delayed ACK counter. 
virtual bool GetTcpNoDelay(void) const 
Check if Nagle's algorithm is enabled or not. 
Ptr< const AttributeChecker > MakeTimeChecker(const Time min, const Time max)
Helper to make a Time checker with bounded range. 
SequenceNumber32 m_recover
Previous highest Tx seqnum for fast recovery. 
void ForwardIcmp6(Ipv6Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo)
Called by the L3 protocol when it received an ICMPv6 packet to pass on to TCP. 
virtual int Bind(void)
Allocate a local IPv4 endpoint for this socket. 
virtual void Retransmit(void)
Halving cwnd and call DoRetransmit() 
Our side has shutdown, waiting to complete transmission of remaining buffered data. 
void SetLocalAddress(Ipv6Address addr)
Set the local address. 
virtual void SetDataRetries(uint32_t retries)
Set the number of data transmission retries before giving up. 
Ptr< TcpCongestionOps > m_congestionControl
Congestion control. 
virtual void ReadOptions(const TcpHeader &tcpHeader)
Read TCP options from incoming packets. 
static const char *const TcpStateName[TcpSocket::LAST_STATE]
Literal names of TCP states for use in log messages. 
int64x64_t Min(const int64x64_t &a, const int64x64_t &b)
Minimum. 
void BindToNetDevice(Ptr< NetDevice > netdevice)
Bind a socket to specific device. 
virtual int SendTo(Ptr< Packet > p, uint32_t flags, const Address &toAddress)
Send data to a specified peer. 
void UpdateCwnd(uint32_t oldValue, uint32_t newValue)
Callback function to hook to TcpSocketState congestion window. 
virtual void EstimateRtt(const TcpHeader &tcpHeader)
Take into account the packet for RTT estimation. 
Ptr< const AttributeAccessor > MakePointerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay. 
Time time
Time this one was sent. 
Ptr< TcpTxBuffer > m_txBuffer
Tx buffer. 
void ForwardUp(Ptr< Packet > packet, Ipv4Header header, uint16_t port, Ptr< Ipv4Interface > incomingInterface)
Called by the L3 protocol when it received a packet to pass on to TCP. 
void SetTtl(uint8_t ttl)
Set the tag's TTL. 
AttributeValue implementation for Time. 
virtual uint32_t GetSndBufSize(void) const 
Get the send buffer size. 
virtual enum SocketType GetSocketType(void) const 
uint16_t GetLocalPort()
Get the local port. 
void UpdateWindowSize(const TcpHeader &header)
Update the receiver window (RWND) based on the value of the window field in the header. 
void AddOptionTimestamp(TcpHeader &header)
Add the timestamp option to the header. 
Hold an unsigned integer type. 
TracedCallback< uint32_t, uint32_t > m_cWndTrace
Callback pointer for cWnd trace chaining. 
Ipv6EndPoint * m_endPoint6
the IPv6 endpoint 
virtual void BindToNetDevice(Ptr< NetDevice > netdevice)
Bind a socket to specific device. 
virtual uint32_t GetSynRetries(void) const 
Get the number of connection retries before giving up. 
bool OutOfRange(SequenceNumber32 head, SequenceNumber32 tail) const 
Check if a sequence number range is within the rx window. 
virtual bool SetAllowBroadcast(bool allowBroadcast)
Configure whether broadcast datagram transmissions are allowed. 
Ptr< const AttributeAccessor > MakeCallbackAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
Ipv4Address GetLocalAddress(void)
Get the local address. 
int64x64_t Max(const int64x64_t &a, const int64x64_t &b)
Maximum. 
virtual void SetTcpNoDelay(bool noDelay)
Enable/Disable Nagle's algorithm. 
This class implements a tag that carries an address of a packet across the socket interface...
RttHistory(SequenceNumber32 s, uint32_t c, Time t)
Constructor - builds an RttHistory with the given parameters. 
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
void UpdateCongState(TcpSocketState::TcpCongState_t oldValue, TcpSocketState::TcpCongState_t newValue)
Callback function to hook to TcpSocketState congestion state. 
bool IsManualIpv6Tclass(void) const 
Checks if the socket has a specific IPv6 Tclass set. 
void NotifyDataSent(uint32_t size)
Notify through the callback (if set) that some data have been sent. 
void SetRecvCallback(Callback< void, Ptr< Socket > >)
Notify application when new data is available to be read. 
enum SocketErrno m_errno
Socket error code. 
Ipv4Address GetSource(void) const 
friend Ptr< T > CopyObject(Ptr< T > object)
Copy an Object. 
A base class for implementation of a stream socket using TCP. 
uint8_t m_sndScaleFactor
Sent Window Scale (i.e., the one of the node) 
Ptr< RttEstimator > m_rtt
Round trip time estimator. 
bool m_closeNotified
Told app to close socket. 
void ProcessSynSent(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received a packet upon SYN_SENT. 
Ptr< TcpRxBuffer > m_rxBuffer
Rx buffer (reordering buffer) 
int SetupCallback(void)
Common part of the two Bind(), i.e. 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC. 
virtual void SetTcp(Ptr< TcpL4Protocol > tcp)
Set the associated TCP L4 protocol. 
bool m_isFirstPartialAck
First partial ACK during RECOVERY. 
Ptr< TcpL4Protocol > m_tcp
the associated TCP L4 protocol 
void SetHopLimit(uint8_t hopLimit)
Set the tag's Hop Limit. 
TracedValue< uint32_t > m_ssThresh
Slow start threshold. 
void ProcessSynRcvd(Ptr< Packet > packet, const TcpHeader &tcpHeader, const Address &fromAddress, const Address &toAddress)
Received a packet upon SYN_RCVD. 
virtual int ShutdownSend(void)
void NotifyConnectionSucceeded(void)
Notify through the callback (if set) that the connection has been established. 
uint32_t m_retxThresh
Fast Retransmit threshold. 
Access to the Ipv4 forwarding table, interfaces, and configuration. 
TcpCongState_t
Definition of the Congestion state machine. 
bool IsManualIpv6HopLimit(void) const 
Checks if the socket has a specific IPv6 Hop Limit set. 
virtual void SetDelAckMaxCount(uint32_t count)
Set the number of packet to fire an ACK before delay timeout. 
void NotifyNormalClose(void)
Notify through the callback (if set) that the connection has been closed. 
int DoConnect(void)
Perform the real connection tasks: Send SYN if allowed, RST if invalid. 
virtual void CompleteFork(Ptr< Packet > p, const TcpHeader &tcpHeader, const Address &fromAddress, const Address &toAddress)
Complete a connection by forking the socket. 
virtual void AddOptions(TcpHeader &tcpHeader)
Add options to TcpHeader. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
uint32_t m_dupAckCount
Dupack counter. 
static InetSocketAddress ConvertFrom(const Address &address)
Returns an InetSocketAddress which corresponds to the input Address. 
Used only in debug messages. 
Ptr< Node > m_node
the associated node 
Hold objects of type Ptr. 
virtual void ScaleSsThresh(uint8_t scaleFactor)
Scale the initial SsThresh value to the correct one. 
Generic "sequence number" class. 
void NotifyNewConnectionCreated(Ptr< Socket > socket, const Address &from)
Notify through the callback (if set) that a new connection has been created. 
TracedValue< TcpCongState_t > m_congState
State in the Congestion state machine. 
Ptr< const AttributeChecker > MakeBooleanChecker(void)
void TimeWait(void)
Move from CLOSING or FIN_WAIT_2 to TIME_WAIT state. 
virtual void SetNode(Ptr< Node > node)
Set the associated node. 
void SetIcmpCallback(Callback< void, Ipv6Address, uint8_t, uint8_t, uint8_t, uint32_t > callback)
Set the ICMP callback. 
virtual void InitializeCwnd()
Initialize congestion window. 
virtual uint32_t UnAckDataCount(void) const 
Return count of number of unacked bytes. 
indicates whether the socket has IPV6_TCLASS set. 
uint8_t GetIpv6Tclass(void) const 
Query the value of IPv6 Traffic Class field of this socket. 
void Destroy(void)
Kill this socket by zeroing its attributes (IPv4) 
static TypeId GetTypeId(void)
Get the type ID. 
virtual uint32_t GetInitialSSThresh(void) const 
Get the initial Slow Start Threshold. 
virtual int Connect(const Address &address)
Initiate a connection to a remote host. 
Time TimeStep(uint64_t ts)
static EventId ScheduleNow(MEM mem_ptr, OBJ obj)
Schedule an event to expire Now. 
virtual int Close(void)
Close a socket. 
static Ipv4Address GetZero(void)
Ptr< const AttributeAccessor > MakeTimeAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void SetPeer(Ipv4Address address, uint16_t port)
Set the peer informations (address and port). 
static Time Now(void)
Return the current simulation virtual time. 
void SetSendCallback(Callback< void, Ptr< Socket >, uint32_t > sendCb)
Notify application when space in transmit buffer is added. 
virtual void SetRtt(Ptr< RttEstimator > rtt)
Set the associated RTT estimator. 
double m_msl
Max segment lifetime. 
virtual void ReTxTimeout(void)
Call Retransmit() upon RTO event. 
Ptr< const AttributeChecker > MakeCallbackChecker(void)
All buffered data sent, waiting for remote to shutdown. 
TracedValue< SequenceNumber32 > m_highTxMark
Highest seqno ever sent, regardless of ReTx. 
static uint32_t NowToTsValue()
Return an uint32_t value which represent "now". 
Time m_minRto
minimum value of the Retransmit timeout 
virtual void BindToNetDevice(Ptr< NetDevice > netdevice)
Bind a socket to specific device. 
virtual void SendEmptyPacket(uint8_t flags)
Send a empty packet that carries a flag, e.g. 
Time m_delAckTimeout
Time to delay an ACK. 
TracedValue< uint32_t > m_cWnd
Congestion window. 
void SetDataSentCallback(Callback< void, Ptr< Socket >, uint32_t > dataSent)
Notify application when a packet has been sent from transport protocol (non-standard socket call) ...
virtual Ptr< Packet > RecvFrom(uint32_t maxSize, uint32_t flags, Address &fromAddress)
Read a single packet from the socket and retrieve the sender address. 
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
Ptr< const AttributeAccessor > MakeDoubleAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void SetLocalAddress(Ipv4Address address)
Set the local address. 
virtual void SetSndBufSize(uint32_t size)
Set the send buffer size. 
static Time FromDouble(double value, enum Unit unit)
Create a Time equal to value in unit unit. 
virtual void SetDelAckTimeout(Time timeout)
Set the time to delay an ACK. 
void DeallocateEndPoint(void)
Deallocate m_endPoint and m_endPoint6. 
Ptr< TcpRxBuffer > GetRxBuffer(void) const 
Get a pointer to the Rx buffer. 
Describes an IPv6 address. 
Ipv4 addresses are stored in host order in this class. 
Time GetMinRto(void) const 
Get the Minimum RTO. 
void ProcessEstablished(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received a packet upon ESTABLISHED state. 
void ProcessOptionWScale(const Ptr< const TcpOption > option)
Read and parse the Window scale option. 
Ptr< NetDevice > m_boundnetdevice
the device this socket is bound to (might be null). 
bool m_connected
Connection established. 
#define NS_ABORT_MSG_UNLESS(cond, msg)
Abnormal program termination if a condition is false, with a message. 
#define NS_ABORT_MSG_IF(cond, msg)
Abnormal program termination if a condition is true, with a message. 
uint32_t GetId(void) const 
TracedValue< Time > m_rto
Retransmit timeout. 
Helper class to store RTT measurements. 
uint16_t GetLocalPort(void)
Get the local port. 
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN. 
Ipv6Address GetPeerAddress()
Get the peer address. 
int DoClose(void)
Close a socket by sending RST, FIN, or FIN+ACK, depend on the current state. 
SequenceNumber32 seq
First sequence number in packet sent. 
CWND was reduced due to RTO timeout or SACK reneging. 
Timeout to catch resent junk before entering closed, can only be entered from FIN_WAIT2 or CLOSING...
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG. 
RttHistory_t m_history
List of sent packet. 
Time Seconds(double value)
Construct a Time in the indicated unit. 
static Inet6SocketAddress ConvertFrom(const Address &addr)
Convert the address to a InetSocketAddress. 
virtual uint32_t GetInitialCwnd(void) const 
Get the initial Congestion Window. 
Ipv4Address GetPeerAddress(void)
Get the peer address. 
uint32_t m_timestampToEcho
Timestamp to echo. 
uint32_t m_synCount
Count of remaining connection retries. 
void SetRxCallback(Callback< void, Ptr< Packet >, Ipv6Header, uint16_t, Ptr< Ipv6Interface > > callback)
Set the reception callback. 
static bool IsMatchingType(const Address &addr)
If the address match. 
uint16_t GetPeerPort(void)
Get the peer port. 
TracedValue< SequenceNumber32 > m_highRxMark
Highest seqno received. 
uint16_t GetPort(void) const 
Get the port. 
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method. 
virtual enum SocketErrno GetErrno(void) const 
Get last error number. 
void ProcessLastAck(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received a packet upon LAST_ACK. 
Ipv4Address GetIpv4MappedAddress() const 
Return the Ipv4 address. 
void UpdateSsThresh(uint32_t oldValue, uint32_t newValue)
Callback function to hook to TcpSocketState slow start threshold. 
virtual void SetSegSize(uint32_t size)
Set the segment size. 
void ProcessClosing(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received a packet upon CLOSING. 
Remote side has shutdown and is waiting for us to finish writing our data and to shutdown (we have to...
Listening for a connection. 
#define NS_LOG_ERROR(msg)
Use NS_LOG to output a message of level LOG_ERROR. 
uint16_t GetPort(void) const 
virtual void ReceivedData(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Recv of a data, put into buffer, call L7 to get it if necessary. 
void SetConnectCallback(Callback< void, Ptr< Socket > > connectionSucceeded, Callback< void, Ptr< Socket > > connectionFailed)
Specify callbacks to allow the caller to determine if the connection succeeds of fails. 
void CloseAndNotify(void)
Peacefully close the socket by notifying the upper layer and deallocate end point. 
Callback< void, Ipv6Address, uint8_t, uint8_t, uint8_t, uint32_t > m_icmpCallback6
ICMPv6 callback. 
A base class which provides memory management and object aggregation. 
virtual Ptr< Node > GetNode(void) const 
Return the node this socket is associated with. 
virtual void SetRcvBufSize(uint32_t size)
Set the receive buffer size. 
uint8_t m_rcvScaleFactor
Received Window Scale (i.e., the one of the peer) 
bool m_shutdownRecv
Receive no longer allowed. 
virtual Time GetDelAckTimeout(void) const 
Get the time to delay an ACK. 
TracedCallback< uint32_t, uint32_t > m_ssThTrace
Callback pointer for ssTh trace chaining. 
EventId m_sendPendingDataEvent
micro-delay event to send pending data 
virtual void DelAckTimeout(void)
Action upon delay ACK timeout, i.e. 
virtual void LastAckTimeout(void)
Timeout at LAST_ACK, close the connection. 
This class can be used to hold variables of floating point type such as 'double' or 'float'...
uint32_t m_bytesAckedNotProcessed
Bytes acked, but not processed. 
virtual int Bind6(void)
Allocate a local IPv6 endpoint for this socket. 
indicates whether the socket has IP_TOS set. 
void ProcessOptionTimestamp(const Ptr< const TcpOption > option)
Process the timestamp option from other side. 
bool IsExpired(void) const 
This method is syntactic sugar for the ns3::Simulator::IsExpired method. 
Our side has shutdown after remote has shutdown. 
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
void SetIcmpCallback(Callback< void, Ipv4Address, uint8_t, uint8_t, uint8_t, uint32_t > callback)
Set the ICMP callback. 
bool IsIpv4MappedAddress() const 
If the address is an IPv4-mapped address. 
EventId m_delAckEvent
Delayed ACK timeout event. 
a unique identifier for an interface. 
bool m_shutdownSend
Send no longer allowed. 
virtual Ptr< TcpSocketBase > Fork(void)
Call CopyObject<> to clone me. 
int SetupEndpoint6(void)
Configure the endpoint v6 to a local address. 
void NotifySend(uint32_t spaceAvailable)
Notify through the callback (if set) that some data have been sent. 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
Time m_clockGranularity
Clock Granularity used in RTO calcs. 
bool SendPendingData(bool withAck=false)
Send as much pending data as possible according to the Tx window. 
void ForwardIcmp(Ipv4Address icmpSource, uint8_t icmpTtl, uint8_t icmpType, uint8_t icmpCode, uint32_t icmpInfo)
Called by the L3 protocol when it received an ICMP packet to pass on to TCP. 
TracedValue< uint32_t > m_rWnd
Receiver window (RCV.WND in RFC793) 
TracedCallback< Ptr< const Packet >, const TcpHeader &, Ptr< const TcpSocketBase > > m_rxTrace
Trace of received packets. 
virtual void DoForwardUp(Ptr< Packet > packet, const Address &fromAddress, const Address &toAddress)
Called by TcpSocketBase::ForwardUp{,6}(). 
static bool IsMatchingType(const Address &address)
void NotifyErrorClose(void)
Notify through the callback (if set) that the connection has been closed due to an error...
virtual uint16_t AdvertisedWindowSize(void) const 
The amount of Rx window announced to the peer. 
SequenceNumber< uint32_t, int32_t > SequenceNumber32
32 bit Sequence number. 
virtual void DoRetransmit(void)
Retransmit the oldest packet. 
bool m_closeOnEmpty
Close socket upon tx buffer emptied. 
TracedCallback< Ptr< const Packet >, const TcpHeader &, Ptr< const TcpSocketBase > > m_txTrace
Trace of transmitted packets. 
void AddOptionWScale(TcpHeader &header)
Add the window scale option to the header. 
virtual uint32_t GetDelAckMaxCount(void) const 
Get the number of packet to fire an ACK before delay timeout. 
virtual void SetConnTimeout(Time timeout)
Set the connection timeout. 
EventId m_persistEvent
Persist event: Send 1 byte to probe for a non-zero Rx window. 
void SetPeer(Ipv6Address addr, uint16_t port)
Set the peer informations (address and port). 
int SetupEndpoint(void)
Configure the endpoint to a local address. 
virtual Time GetConnTimeout(void) const 
Get the connection timeout. 
TracedCallback< TcpSocketState::TcpCongState_t, TcpSocketState::TcpCongState_t > m_congStateTrace
Callback pointer for congestion state trace chaining. 
void Destroy6(void)
Kill this socket by zeroing its attributes (IPv6) 
virtual uint32_t AvailableWindow(void) const 
Return unfilled portion of window. 
Time m_persistTimeout
Time between sending 1-byte probes. 
virtual uint32_t GetTxAvailable(void) const 
Returns the number of bytes which can be sent in a single call to Send. 
virtual uint32_t GetRxAvailable(void) const 
Return number of bytes which can be returned from one or multiple calls to Recv.