21 #define NS_LOG_APPEND_CONTEXT \ 
   22   if (m_node) { std::clog << Simulator::Now ().GetSeconds () << " [node " << m_node->GetId () << "] "; } 
   26 #include "ns3/trace-source-accessor.h" 
   27 #include "ns3/simulator.h" 
   28 #include "ns3/abort.h" 
   42     .SetGroupName (
"Internet")
 
   44     .AddAttribute (
"ReTxThreshold", 
"Threshold for fast retransmit",
 
   47                     MakeUintegerChecker<uint32_t> ())
 
   48     .AddAttribute (
"LimitedTransmit", 
"Enable limited transmit",
 
   66     m_retxThresh (sock.m_retxThresh),
 
   68     m_limitedTx (sock.m_limitedTx)
 
   81   return CopyObject<TcpNewReno> (
this);
 
   89   NS_LOG_LOGIC (
"TcpNewReno received ACK for seq " << seq <<
 
   97       NS_LOG_INFO (
"Partial ACK for seq " << seq << 
" in fast recovery: cwnd set to " << 
m_cWnd);
 
  107       NS_LOG_INFO (
"Received full ACK for seq " << seq <<
". Leaving fast recovery with cwnd set to " << 
m_cWnd);
 
  120       adder = std::max (1.0, adder);
 
  121       m_cWnd += 
static_cast<uint32_t
> (adder);
 
  140       NS_LOG_INFO (
"Triple dupack. Enter fast recovery mode. Reset cwnd to " << 
m_cWnd <<
 
  172   if (m_state <= ESTABLISHED && m_txBuffer->HeadSequence () >= 
m_highTxMark) 
return;
 
Smart pointer class similar to boost::intrusive_ptr. 
 
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
 
virtual void NewAck(SequenceNumber32 const &seq)
Update buffers w.r.t. 
 
AttributeValue implementation for Boolean. 
 
bool m_limitedTx
perform limited transmit 
 
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. 
 
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system. 
 
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
TracedValue< uint32_t > m_cWnd
Congestion window. 
 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
 
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO. 
 
bool IsRunning(void) const 
This method is syntactic sugar for !IsExpired(). 
 
uint32_t m_segmentSize
Segment size. 
 
TracedValue< SequenceNumber32 > m_nextTxSequence
Next seqnum to be sent (SND.NXT), ReTx pushes it back. 
 
An implementation of a stream socket using TCP. 
 
T Get(void) const 
Get the underlying value. 
 
TracedValue< TcpStates_t > m_state
TCP state. 
 
static TypeId GetTypeId(void)
Get the type ID. 
 
Ptr< TcpTxBuffer > m_txBuffer
Tx buffer. 
 
virtual void DupAck(const TcpHeader &t, uint32_t count)
Received dupack (duplicate ACK) 
 
Hold an unsigned integer type. 
 
A base class for implementation of a stream socket using TCP. 
 
#define NS_LOG_LOGIC(msg)
Use NS_LOG to output a message of level LOG_LOGIC. 
 
bool m_inFastRec
currently in fast recovery 
 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
 
uint32_t m_retxThresh
Fast Retransmit threshold. 
 
Ptr< const AttributeChecker > MakeBooleanChecker(void)
 
virtual uint32_t BytesInFlight(void)
Return total bytes in flight. 
 
virtual void Retransmit(void)
Halving cwnd and call DoRetransmit() 
 
static Time Now(void)
Return the current simulation virtual time. 
 
TracedValue< SequenceNumber32 > m_highTxMark
Highest seqno ever sent, regardless of ReTx. 
 
virtual void NewAck(SequenceNumber32 const &seq)
Update buffers w.r.t. 
 
bool m_connected
Connection established. 
 
Timeout to catch resent junk before entering closed, can only be entered from FIN_WAIT2 or CLOSING...
 
TracedValue< uint32_t > m_ssThresh
Slow start threshold. 
 
virtual Ptr< TcpSocketBase > Fork(void)
Call CopyObject<> to clone me. 
 
EventId m_sendPendingDataEvent
micro-delay event to send pending data 
 
TcpNewReno(void)
Create an unbound tcp socket. 
 
Ptr< const AttributeAccessor > MakeUintegerAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method...
 
a unique identifier for an interface. 
 
TypeId SetParent(TypeId tid)
Set the parent TypeId. 
 
bool SendPendingData(bool withAck=false)
Send as much pending data as possible according to the Tx window. 
 
virtual void DoRetransmit(void)
Retransmit the oldest packet. 
 
SequenceNumber32 m_recover
Previous highest Tx seqnum for fast recovery. 
 
virtual ~TcpNewReno(void)