19 #define __STDC_LIMIT_MACROS 21 #include "ns3/node-container.h" 22 #include "ns3/tcp-socket-base.h" 23 #include "ns3/simple-net-device-helper.h" 24 #include "ns3/ipv4-address-helper.h" 25 #include "ns3/internet-stack-helper.h" 27 #include "ns3/queue.h" 28 #include "ns3/tcp-l4-protocol.h" 29 #include "../model/ipv4-end-point.h" 30 #include "../model/ipv6-end-point.h" 31 #include "ns3/tcp-header.h" 32 #include "ns3/tcp-tx-buffer.h" 33 #include "ns3/tcp-rx-buffer.h" 34 #include "ns3/rtt-estimator.h" 44 m_congControlTypeId (
TcpNewReno::GetTypeId ()),
63 while ((packet = socket->
RecvFrom (from)))
74 uint32_t pktCount,
Time pktInterval )
80 socket->
Send (Create<Packet> (pktSize));
82 socket, pktSize, pktCount - 1, pktInterval);
152 senderDev->
GetQueue ()->TraceConnect (
"Drop",
"SENDER",
157 receiverDev->SetMtu (
m_mtu);
158 receiverDev->GetQueue ()->TraceConnect (
"Drop",
"RECEIVER",
160 receiverDev->TraceConnect (
"PhyRxDrop",
"RECEIVER",
164 receiverDev->SetReceiveErrorModel (receiverEM);
167 ipv4.
SetBase (
"10.1.1.0",
"255.255.255.0");
207 m_senderSocket->TraceConnectWithoutContext (
"CongestionWindowInflated",
290 congestionAlgorithmFactory.
SetTypeId (congControl);
291 recoveryAlgorithmFactory.
SetTypeId (recoveryAlgorithm);
299 socket->SetNode (node);
301 socket->SetRtt (rtt);
302 socket->SetCongestionControlAlgorithm (algo);
303 socket->SetRecoveryAlgorithm (recovery);
334 if (context.compare (
"SENDER") == 0)
338 else if (context.compare (
"RECEIVER") == 0)
344 NS_FATAL_ERROR (
"Packet dropped in a queue, but queue not recognized");
352 if (context.compare (
"SENDER") == 0)
356 else if (context.compare (
"RECEIVER") == 0)
362 NS_FATAL_ERROR (
"Packet dropped in a queue, but queue not recognized");
386 bool isRetransmission)
569 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_retxThresh;
586 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_dupAckCount;
603 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_delAckMaxCount;
677 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->GetInitialSSThresh ();
681 return DynamicCast<TcpSocketMsgBase> (
m_receiverSocket)->GetInitialSSThresh ();
694 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_rto.Get ();
728 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_cnTimeout;
762 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_clockGranularity;
766 return DynamicCast<TcpSocketMsgBase> (
m_receiverSocket)->m_clockGranularity;
779 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_state.Get ();
797 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_rWnd.Get ();
815 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_persistEvent;
833 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_persistTimeout;
869 return DynamicCast<TcpSocketMsgBase> (
m_senderSocket)->m_rxBuffer;
973 .SetGroupName (
"Internet")
982 return CopyObject<TcpSocketMsgBase> (
this);
1048 bool isRetransmission)
1076 .SetGroupName (
"Internet")
1132 NS_LOG_WARN (
"Failed to send empty packet due to null endpoint");
1148 header.SetFlags (flags);
1149 header.SetSequenceNumber (s);
1152 if (hasSyn || hasFin)
1154 header.SetAckNumber (
m_rxBuffer->NextRxSequence ());
1173 header.SetAckNumber (ackSeq);
1231 NS_LOG_LOGIC (
"Schedule retransmission timeout at time " 1247 return CopyObject<TcpSocketSmallAcks> (
this);
virtual void ProcessedAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who)
Processed ack.
void TxPacketCb(const Ptr< const Packet > p, const TcpHeader &h, const Ptr< const TcpSocketBase > tcp)
Tx packet Callback.
Ipv6Address GetLocalAddress()
Get the local address.
void SetTclass(uint8_t tclass)
Set the tag's Tclass.
virtual void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
uint32_t GetReTxThreshold(SocketWho who)
Get the retransmission threshold.
virtual void RtoTrace(Time oldValue, Time newValue)
RTO changes.
Ptr< NetDevice > Get(uint32_t i) const
Get the Ptr<NetDevice> stored in this container at a given index.
Simulation virtual time values and global simulation resolution.
static Ipv4Address GetAny(void)
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Ptr< TcpSocketMsgBase > m_senderSocket
Pointer to sender socket.
void SetSegmentSize(SocketWho who, uint32_t segmentSize)
Forcefully set the segment size.
Time m_propagationDelay
Propagation delay of the channel.
RetrCb m_afterRetrCallback
After retransmission callback.
Class for inserting callbacks special points of the flow of TCP sockets.
This class implements a tag that carries the socket-specific HOPLIMIT of a packet to the IPv6 layer...
Ipv4EndPoint * m_endPoint
the IPv4 endpoint
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
holds a vector of std::pair of Ptr<Ipv4> and interface index.
virtual void DoTeardown(void)
Teardown the TCP test.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
void SetProcessedAckCb(AckManagementCb cb)
Set the callback invoked when an ACK is received and processed (at the end of the processing) ...
AckManagementCb m_rcvAckCb
Receive ACK callback.
uint32_t m_synRetries
Number of connection attempts.
virtual Ptr< ErrorModel > CreateReceiverErrorModel()
Create and return the error model to install in the receiver node.
uint32_t GetRWnd(SocketWho who)
Get the rWnd of the selected socket.
void SetCongestionControl(TypeId congControl)
Congestion control of the sender socket.
void SetRecoveryAlgorithm(TypeId reccovery)
recovery algorithm of the sender socket
EventId m_retxEvent
Retransmission event.
virtual void PhyDrop(SocketWho who)
Link drop.
virtual void DataSent(uint32_t size, SocketWho who)
Notifying application for sent data.
void DoConnect()
Scheduled at 0.0, SENDER starts the connection to RECEIVER.
virtual void ErrorClose(SocketWho who)
Socket closed with an error.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
Both sides have shutdown but we still have data we have to finish sending.
virtual void FinalChecks()
Performs the (eventual) final checks through test asserts.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
static void Run(void)
Run the simulation.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Ptr< TcpSocketState > m_tcb
Congestion control information.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
void SetTypeId(TypeId tid)
Set the TypeId of the Objects to be created by this factory.
void SetAppPktSize(uint32_t pktSize)
Set app packet size.
aggregate IP/TCP/UDP functionality to existing Nodes.
void ErrorCloseCb(Ptr< Socket > socket)
Error Close Callback.
#define NS_UNUSED(x)
Mark a local variable as unused.
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
void ForkCb(Ptr< TcpSocketMsgBase > tcp)
Fork Callback.
void SetCloseCallbacks(Callback< void, Ptr< Socket > > normalClose, Callback< void, Ptr< Socket > > errorClose)
Detect socket recv() events such as graceful shutdown or error.
#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.
Time m_cnTimeout
Timeout for connection retry.
Time GetMinRto(SocketWho who)
Get the minimum RTO attribute.
virtual void SsThreshTrace(uint32_t oldValue, uint32_t newValue)
Slow start threshold changes.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Callback< R > MakeNullCallback(void)
static TypeId GetTypeId(void)
Get the type ID.
void SetTos(uint8_t tos)
Set the tag's TOS.
The NewReno implementation.
virtual void ReceivedAck(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received an ACK packet.
virtual void ConfigureProperties(void)
Change the configuration of the socket properties.
uint32_t GetDelAckCount(SocketWho who)
Get the number of delayed ack (if present)
This class implements a tag that carries the socket-specific TTL of a packet to the IP layer...
virtual void CWndInflTrace(uint32_t oldValue, uint32_t newValue)
Tracks the inflated congestion window changes.
TracedValue< TcpStates_t > m_state
TCP state.
virtual void ReceivedAck(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received an ACK packet.
bool IsExpired(void) const
This method is syntactic sugar for the ns3::Simulator::IsExpired method.
void SetAfterRetransmitCb(RetrCb cb)
Set the callback invoked after the processing of a retransmit timeout.
virtual Ptr< ErrorModel > CreateSenderErrorModel()
Create and return the error model to install in the sender node.
void UpdateRttHistoryCb(Ptr< const TcpSocketBase > tcp, const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission)
Update RTT with new data.
a polymophic address class
uint16_t GetPeerPort()
Get the peer port.
TCP socket creation and multiplexing/demultiplexing.
uint32_t m_delAckCount
Delayed ACK counter.
SequenceNumber32 GetHighestTxMark(SocketWho who)
Get the highest tx mark of the node specified.
virtual uint8_t GetIpTtl(void) const
Query the value of IP Time to Live field of this socket.
void SetUpdateRttHistoryCb(UpdateRttCallback cb)
Set the callback invoked when we update rtt history.
virtual Ptr< TcpSocketBase > Fork(void)
Call CopyObject<> to clone me.
void BeforeRetransmitCb(const Ptr< const TcpSocketState > tcb, const Ptr< const TcpSocketBase > tcp)
Invoked before a retransmit event.
virtual void SendEmptyPacket(uint8_t flags)
Send a empty packet that carries a flag, e.g., ACK.
TypeId m_recoveryTypeId
Recovery.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
virtual void UpdateRttHistory(const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission)
Update the RTT history, when we send TCP segments.
static void EnablePrinting(void)
Enable printing packets metadata.
void SetForkCb(Callback< void, Ptr< TcpSocketMsgBase > > cb)
Set the callback invoked after the forking.
void SetTtl(uint8_t ttl)
Set the tag's TTL.
AttributeValue implementation for Time.
Ptr< Object > Create(void) const
Create an Object instance of the configured TypeId.
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
uint16_t GetLocalPort()
Get the local port.
TcpSocket::TcpStates_t GetTcpState(SocketWho who)
Get the state of the TCP state machine.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
virtual bool SetMtu(const uint16_t mtu)
Ipv6EndPoint * m_endPoint6
the IPv6 endpoint
virtual void NextTxSeqTrace(SequenceNumber32 oldValue, SequenceNumber32 newValue)
Next tx seq changes.
uint32_t GetInitialSsThresh(SocketWho who)
Get the initial slow start threshold.
static TypeId GetTypeId(void)
Get the type ID.
Base class for all RTT Estimators.
virtual void ReceivePacket(Ptr< Socket > socket)
Packet received.
Ipv4Address GetLocalAddress(void)
Get the local address.
holds a vector of ns3::NetDevice pointers
int64x64_t Max(const int64x64_t &a, const int64x64_t &b)
Maximum.
uint32_t m_pktCount
Count of the application packet.
Time m_interPacketInterval
Time between sending application packet down to tcp socket.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
void SetRecvCallback(Callback< void, Ptr< Socket > >)
Notify application when new data is available to be read.
A base class for implementation of a stream socket using TCP.
Ptr< RttEstimator > m_rtt
Round trip time estimator.
void SetInitialSsThresh(SocketWho who, uint32_t initialSsThresh)
Forcefully set the initial ssth.
Ptr< TcpRxBuffer > m_rxBuffer
Rx buffer (reordering buffer)
Ptr< TcpSocketState > GetTcb(SocketWho who)
Get the TCB from selected socket.
Ptr< TcpL4Protocol > m_tcp
the associated TCP L4 protocol
void SetHopLimit(uint8_t hopLimit)
Set the tag's Hop Limit.
void DataSentCb(Ptr< Socket > socket, uint32_t size)
Data sent Callback.
static void Destroy(void)
Execute the events scheduled with ScheduleDestroy().
virtual Ptr< SimpleChannel > CreateChannel()
Create and return the channel installed between the two socket.
virtual void RcvAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who)
Received ack.
Ptr< T > GetObject(void) const
Get a pointer to the requested aggregated Object.
void ProcessedAckCb(Ptr< const Packet > p, const TcpHeader &h, Ptr< const TcpSocketBase > tcp)
ACK processed Callback.
virtual Ptr< TcpSocketMsgBase > CreateSocket(Ptr< Node > node, TypeId socketType, TypeId congControl)
Create a socket.
void SetEcn(SocketWho who, TcpSocketBase::EcnMode_t ecnMode)
Forcefully set the ecn mode on.
virtual void UpdateRttHistory(const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission)
Update the RTT history, when we send TCP segments.
virtual void CompleteFork(Ptr< Packet > p, const TcpHeader &tcpHeader, const Address &fromAddress, const Address &toAddress)
Complete a connection by forking the socket.
static TypeId GetTypeId(void)
Get the type ID.
void AddOptions(TcpHeader &tcpHeader)
Add options to TcpHeader.
AckManagementCb m_processedAckCb
Processed ACK callback.
Ptr< TcpSocketMsgBase > m_receiverSocket
Pointer to receiver socket.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Time GetClockGranularity(SocketWho who)
Get the clock granularity attribute.
keep track of a set of node pointers.
uint32_t GetSegSize(SocketWho who)
Get the segment size of the node specified.
virtual void QueueDrop(SocketWho who)
Drop on the queue.
bool IsManualIpv6Tclass(void) const
Checks if the socket has a specific IPv6 Tclass set.
Congestion control abstract class.
uint32_t GetDupAckCount(SocketWho who)
Get the number of dupack received.
void HandleAccept(Ptr< Socket > socket, const Address &from)
Handle an accept connection.
void SetNetDevicePointToPointMode(bool pointToPointMode)
SimpleNetDevice is Broadcast capable and ARP needing.
void NormalCloseCb(Ptr< Socket > socket)
Normal Close Callback.
indicates whether the socket has IPV6_TCLASS set.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
void SetAppPktInterval(Time pktInterval)
Interval between app-generated packet.
EventId GetPersistentEvent(SocketWho who)
Get the persistent event of the selected socket.
TcpGeneralTest(const std::string &desc)
TcpGeneralTest constructor.
void SetReceiveErrorModel(Ptr< ErrorModel > em)
Attach a receive ErrorModel to the SimpleNetDevice.
void SetRcvBufSize(SocketWho who, uint32_t size)
Forcefully set a defined size for rx buffer.
Our side has shutdown after remote has shutdown.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
static Time Now(void)
Return the current simulation virtual time.
virtual void ReTxTimeout(void)
An RTO event happened.
Time GetDelAckTimeout(SocketWho who)
Get the timeout of delayed ack (if present)
virtual void ReTxTimeout(void)
An RTO event happened.
NS_LOG_LOGIC("Net device "<< nd<< " is not bridged")
Time m_minRto
minimum value of the Retransmit timeout
virtual void CongStateTrace(const TcpSocketState::TcpCongState_t oldValue, const TcpSocketState::TcpCongState_t newValue)
State on Ack state machine changes.
virtual void ConfigureEnvironment(void)
Change the configuration of the environment.
uint8_t GetIpv6Tclass(void) const
Query the value of IPv6 Traffic Class field of this socket.
void Install(std::string nodeName) const
Aggregate implementations of the ns3::Ipv4, ns3::Ipv6, ns3::Udp, and ns3::Tcp classes onto the provid...
bool IsManualIpv6HopLimit(void) const
Checks if the socket has a specific IPv6 Hop Limit set.
virtual void CompleteFork(Ptr< Packet > p, const TcpHeader &tcpHeader, const Address &fromAddress, const Address &toAddress)
Complete a connection by forking the socket.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
UpdateRttCallback m_updateRttCb
Update RTT callback.
TcpStates_t
Names of the 11 TCP states.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
Instantiate subclasses of ns3::Object.
static void ScheduleWithContext(uint32_t context, Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event with the given context.
Ipv4 addresses are stored in host order in this class.
virtual void NormalClose(SocketWho who)
Socket closed normally.
Ipv4InterfaceContainer Assign(const NetDeviceContainer &c)
Assign IP addresses to the net devices specified in the container based on the current network prefix...
Ptr< NetDevice > m_boundnetdevice
the device this socket is bound to (might be null).
TracedValue< Time > m_rto
Retransmit timeout.
An identifier for simulation events.
void AddPacketTag(const Tag &tag) const
Add a packet tag.
uint16_t GetLocalPort(void)
Get the local port.
void PhyDropCb(std::string context, Ptr< const Packet > p)
Drop at Phy layer Callback.
virtual uint16_t AdvertisedWindowSize(bool scale=true) const
The amount of Rx window announced to the peer.
virtual uint8_t GetIpv6HopLimit(void) const
Query the value of IP Hop Limit field of this socket.
#define NS_LOG_WARN(msg)
Use NS_LOG to output a message of level LOG_WARN.
virtual Ptr< Node > GetNode(void) const =0
Return the node this socket is associated with.
Ipv6Address GetPeerAddress()
Get the peer address.
Our side has shutdown, waiting to complete transmission of remaining buffered data.
T Get(void) const
Get the underlying value.
Time Seconds(double value)
Construct a Time in the indicated unit.
uint32_t GetInitialCwnd(SocketWho who)
Get the initial congestion window.
Ipv4Address GetPeerAddress(void)
Get the peer address.
void AfterRetransmitCb(const Ptr< const TcpSocketState > tcb, const Ptr< const TcpSocketBase > tcp)
Invoked after a retransmit event.
uint32_t m_synCount
Count of remaining connection retries.
void SetInitialCwnd(SocketWho who, uint32_t initialCwnd)
Forcefully set the initial cwnd.
virtual void BytesInFlightTrace(uint32_t oldValue, uint32_t newValue)
Bytes in flight changes.
uint16_t GetPeerPort(void)
Get the peer port.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
void SendPacket(Ptr< Socket > socket, uint32_t pktSize, uint32_t pktCount, Time pktInterval)
Send packets to other endpoint.
uint32_t m_mtu
MTU of the environment.
Callback< void, Ptr< TcpSocketMsgBase > > m_forkCb
Fork callback.
virtual void UpdatedRttHistory(const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission, SocketWho who)
Updated the Rtt history.
virtual void HighestTxSeqTrace(SequenceNumber32 oldValue, SequenceNumber32 newValue)
Highest tx seq changes.
TracedValue< SequenceNumber32 > m_highTxMark
Highest seqno ever sent, regardless of ReTx.
RetrCb m_beforeRetrCallback
Before retransmission callback.
bool TraceConnect(std::string name, std::string context, const CallbackBase &cb)
Connect a TraceSource to a Callback with a context.
A TCP socket which sends ACKs smaller than the segment received.
Ptr< TcpSocketBase > Fork(void)
Call CopyObject<> to clone me.
virtual void RttTrace(Time oldTime, Time newTime)
Rtt changes.
Ptr< TcpRxBuffer > GetRxBuffer(SocketWho who)
Get the Rx buffer from selected socket.
A helper class to make life easier while doing simple IPv4 address assignment in scripts.
void QueueDropCb(std::string context, Ptr< const Packet > p)
Queue Drop Callback.
The Classic recovery implementation.
uint32_t m_bytesLeftToBeAcked
Number of bytes to be ACKed left.
Time GetPersistentTimeout(SocketWho who)
Get the persistent timeout of the selected socket.
void CloseAndNotify(void)
Peacefully close the socket by notifying the upper layer and deallocate end point.
SequenceNumber32 m_lastAckedSeq
Last sequence number ACKed.
void SetRcvAckCb(AckManagementCb cb)
Set the callback invoked when an ACK is received (at the beginning of the processing) ...
InetSocketAddress m_remoteAddr
Remote peer address.
virtual Ptr< Packet > RecvFrom(uint32_t maxSize, uint32_t flags, Address &fromAddress)=0
Read a single packet from the socket and retrieve the sender address.
virtual Ptr< Node > GetNode(void) const
Return the node this socket is associated with.
void RxPacketCb(const Ptr< const Packet > p, const TcpHeader &h, const Ptr< const TcpSocketBase > tcp)
Rx packet Callback.
build a set of SimpleNetDevice objects
Time GetConnTimeout(SocketWho who)
Get the retransmission time for the SYN segments.
virtual void BeforeRTOExpired(const Ptr< const TcpSocketState > tcb, SocketWho who)
Rto has expired.
void SetBeforeRetransmitCb(RetrCb cb)
Set the callback invoked before the processing of a retransmit timeout.
virtual int Send(Ptr< Packet > p, uint32_t flags)=0
Send data (or dummy data) to the remote host.
virtual int Close(void)=0
Close a socket.
bool IsNull(void) const
Check for null implementation.
NetDeviceContainer Install(Ptr< Node > node) const
This method creates an ns3::SimpleChannel with the attributes configured by SimpleNetDeviceHelper::Se...
uint32_t m_bytesToAck
Number of bytes to be ACKed.
indicates whether the socket has IP_TOS set.
bool IsManualIpTtl(void) const
Checks if the socket has a specific IPv4 TTL set.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
uint8_t GetIpTos(void) const
Query the value of IP Type of Service of this socket.
Ptr< Queue< Packet > > GetQueue(void) const
Get a copy of the attached Queue.
EventId m_delAckEvent
Delayed ACK timeout event.
Ptr< RttEstimator > GetRttEstimator(SocketWho who)
Get the Rtt estimator of the socket.
a unique identifier for an interface.
virtual void CWndTrace(uint32_t oldValue, uint32_t newValue)
Tracks the congestion window changes.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Time m_clockGranularity
Clock Granularity used in RTO calcs.
virtual void DoRun(void)
Execute the tcp test.
uint32_t m_pktSize
Size of the application packet.
void RcvAckCb(Ptr< const Packet > p, const TcpHeader &h, Ptr< const TcpSocketBase > tcp)
Receive ACK Callback.
TracedCallback< Ptr< const Packet >, const TcpHeader &, Ptr< const TcpSocketBase > > m_txTrace
Trace of transmitted packets.
Time m_startTime
Data transmission time.
void SetBase(Ipv4Address network, Ipv4Mask mask, Ipv4Address base="0.0.0.1")
Set the base network number, network mask and base address.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.
virtual void AfterRTOExpired(const Ptr< const TcpSocketState > tcb, SocketWho who)
Rto has expired.
TracedValue< SequenceNumber32 > m_nextTxSequence
Next seqnum to be sent (SND.NXT), ReTx pushes it back.
TypeId m_congControlTypeId
Congestion control.
Time GetRto(SocketWho who)
Get the retransmission time.