A Discrete-Event Network Simulator
API
tcp-general-test.h
Go to the documentation of this file.
1 /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2015 Natale Patriciello <natale.patriciello@gmail.com>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  */
19 #ifndef TCPGENERALTEST_H
20 #define TCPGENERALTEST_H
21 
22 #include "ns3/simple-net-device.h"
23 #include "ns3/error-model.h"
24 #include "ns3/tcp-socket-base.h"
25 #include "ns3/tcp-congestion-ops.h"
26 #include "ns3/tcp-recovery-ops.h"
27 #include "ns3/test.h"
28 
29 namespace ns3 {
30 
52 {
53 public:
58  static TypeId GetTypeId (void);
59 
61  {
62  }
63 
69  {
70  m_rcvAckCb = other.m_rcvAckCb;
74  m_forkCb = other.m_forkCb;
76  }
77 
86  uint32_t, bool> UpdateRttCallback;
87 
94  void SetRcvAckCb (AckManagementCb cb);
95 
103 
109  void SetAfterRetransmitCb (RetrCb cb);
110 
116  void SetBeforeRetransmitCb (RetrCb cb);
117 
122  void SetForkCb (Callback<void, Ptr<TcpSocketMsgBase> > cb);
123 
130 
131 protected:
132  virtual void ReceivedAck (Ptr<Packet> packet, const TcpHeader& tcpHeader);
133  virtual void ReTxTimeout (void);
134  virtual Ptr<TcpSocketBase> Fork (void);
135  virtual void CompleteFork (Ptr<Packet> p, const TcpHeader& tcpHeader,
136  const Address& fromAddress, const Address& toAddress);
137  virtual void UpdateRttHistory (const SequenceNumber32 &seq, uint32_t sz,
138  bool isRetransmission);
139 
140 private:
147 };
148 
149 
168 {
169 public:
174  static TypeId GetTypeId (void);
175 
177  : TcpSocketMsgBase (),
178  m_bytesToAck (125),
180  m_lastAckedSeq (1)
181  {
182  }
183 
189  : TcpSocketMsgBase (other),
190  m_bytesToAck (other.m_bytesToAck),
193  {
194  }
195 
200  void SetBytesToAck (uint32_t bytes)
201  {
202  m_bytesToAck = bytes;
203  }
204 
205 protected:
206  virtual void SendEmptyPacket (uint8_t flags);
207  Ptr<TcpSocketBase> Fork (void);
208 
209  uint32_t m_bytesToAck;
212 };
213 
255 class TcpGeneralTest : public TestCase
256 {
257 public:
266  TcpGeneralTest (const std::string &desc);
267  ~TcpGeneralTest ();
268 
274  {
277  };
278 
279 protected:
286 
293 
300 
307 
314 
323  virtual Ptr<TcpSocketMsgBase> CreateSocket (Ptr<Node> node, TypeId socketType,
324  TypeId congControl);
325 
335  virtual Ptr<TcpSocketMsgBase> CreateSocket (Ptr<Node> node, TypeId socketType,
336  TypeId congControl, TypeId recoveryAlgorithm);
337 
343  {
344  return m_senderSocket;
345  }
346 
352  {
353  return m_receiverSocket;
354  }
355 
372  virtual void DoRun (void);
373 
377  virtual void ConfigureEnvironment (void);
378 
382  virtual void ConfigureProperties (void);
383 
387  virtual void DoTeardown (void);
388 
392  void DoConnect ();
393 
400  virtual void ReceivePacket (Ptr<Socket> socket);
401 
410  void SendPacket (Ptr<Socket> socket, uint32_t pktSize,
411  uint32_t pktCount, Time pktInterval);
412 
420  uint32_t GetSegSize (SocketWho who);
421 
430 
436  uint32_t GetReTxThreshold (SocketWho who);
437 
443  uint32_t GetInitialSsThresh (SocketWho who);
444 
450  uint32_t GetInitialCwnd (SocketWho who);
451 
457  uint32_t GetDupAckCount (SocketWho who);
458 
464  uint32_t GetDelAckCount (SocketWho who);
465 
472 
479  Time GetRto (SocketWho who);
480 
487  Time GetMinRto (SocketWho who);
488 
496 
504 
512 
520 
528 
536 
544 
551  uint32_t GetRWnd (SocketWho who);
552 
560 
568 
575  void SetRcvBufSize (SocketWho who, uint32_t size);
576 
583  void SetSegmentSize (SocketWho who, uint32_t segmentSize);
584 
591  void SetInitialCwnd (SocketWho who, uint32_t initialCwnd);
592 
599  void SetEcn (SocketWho who, TcpSocketBase::EcnMode_t ecnMode);
600 
607  void SetInitialSsThresh (SocketWho who, uint32_t initialSsThresh);
608 
616  void SetAppPktSize (uint32_t pktSize) { m_pktSize = pktSize; }
617 
625  void SetAppPktCount (uint32_t pktCount) { m_pktCount = pktCount; }
626 
632  void SetAppPktInterval (Time pktInterval) { m_interPacketInterval = pktInterval; }
633 
639  void SetPropagationDelay (Time propDelay) { m_propagationDelay = propDelay; }
640 
647 
653  void SetCongestionControl (TypeId congControl) { m_congControlTypeId = congControl; }
654 
660  void SetRecoveryAlgorithm (TypeId reccovery) { m_recoveryTypeId = reccovery; }
661 
667  void SetMTU (uint32_t mtu) { m_mtu = mtu; }
668 
674  virtual void CongStateTrace (const TcpSocketState::TcpCongState_t oldValue,
675  const TcpSocketState::TcpCongState_t newValue)
676  {
677  NS_UNUSED (oldValue);
678  NS_UNUSED (newValue);
679  }
680 
687  virtual void CWndTrace (uint32_t oldValue, uint32_t newValue)
688  {
689  NS_UNUSED (oldValue);
690  NS_UNUSED (newValue);
691  }
692 
699  virtual void CWndInflTrace (uint32_t oldValue, uint32_t newValue)
700  {
701  NS_UNUSED (oldValue);
702  NS_UNUSED (newValue);
703  }
704 
713  virtual void RttTrace (Time oldTime, Time newTime)
714  {
715  NS_UNUSED (oldTime);
716  NS_UNUSED (newTime);
717  }
718 
727  virtual void SsThreshTrace (uint32_t oldValue, uint32_t newValue)
728  {
729  NS_UNUSED (oldValue);
730  NS_UNUSED (newValue);
731  }
732 
741  virtual void BytesInFlightTrace (uint32_t oldValue, uint32_t newValue)
742  {
743  NS_UNUSED (oldValue);
744  NS_UNUSED (newValue);
745  }
746 
755  virtual void RtoTrace (Time oldValue, Time newValue)
756  {
757  NS_UNUSED (oldValue);
758  NS_UNUSED (newValue);
759  }
760 
769  virtual void NextTxSeqTrace (SequenceNumber32 oldValue, SequenceNumber32 newValue)
770  {
771  NS_UNUSED (oldValue);
772  NS_UNUSED (newValue);
773  }
774 
783  virtual void HighestTxSeqTrace (SequenceNumber32 oldValue, SequenceNumber32 newValue)
784  {
785  NS_UNUSED (oldValue);
786  NS_UNUSED (newValue);
787  }
788 
793  virtual void NormalClose (SocketWho who)
794  {
795  NS_UNUSED (who);
796  }
797 
803  virtual void ErrorClose (SocketWho who)
804  {
806  NS_UNUSED (who);
807  }
808 
813  virtual void QueueDrop (SocketWho who)
814  {
815  NS_UNUSED (who);
816  }
817 
822  virtual void PhyDrop (SocketWho who)
823  {
824  NS_UNUSED (who);
825  }
826 
836  virtual void RcvAck (const Ptr<const TcpSocketState> tcb,
837  const TcpHeader& h, SocketWho who)
838  {
839  NS_UNUSED (tcb);
840  NS_UNUSED (h);
841  NS_UNUSED (who);
842  }
843 
853  virtual void ProcessedAck (const Ptr<const TcpSocketState> tcb,
854  const TcpHeader& h, SocketWho who)
855  {
856  NS_UNUSED (tcb);
857  NS_UNUSED (h);
858  NS_UNUSED (who);
859  }
860 
868  virtual void Tx (const Ptr<const Packet> p, const TcpHeader&h, SocketWho who);
869 
877  virtual void Rx (const Ptr<const Packet> p, const TcpHeader&h, SocketWho who);
878 
886  {
887  NS_UNUSED (tcb);
888  NS_UNUSED (who);
889  }
890 
898  {
899  NS_UNUSED (tcb);
900  NS_UNUSED (who);
901  }
902 
910  virtual void UpdatedRttHistory (const SequenceNumber32 & seq, uint32_t sz,
911  bool isRetransmission, SocketWho who)
912  {
913  NS_UNUSED (seq);
914  NS_UNUSED (sz);
915  NS_UNUSED (isRetransmission);
916  NS_UNUSED (who);
917  }
918 
925  virtual void DataSent (uint32_t size, SocketWho who)
926  {
927  NS_UNUSED (size);
928  NS_UNUSED (who);
929  }
930 
934  virtual void FinalChecks ()
935  {
936  }
937 
943  {
944  return m_propagationDelay;
945  }
946 
952  {
953  return m_startTime;
954  }
955 
960  uint32_t GetMtu () const
961  {
962  return m_mtu;
963  }
964 
969  uint32_t GetPktSize () const
970  {
971  return m_pktSize;
972  }
973 
978  uint32_t GetPktCount () const
979  {
980  return m_pktCount;
981  }
982 
989  {
990  return m_interPacketInterval;
991  }
992 
995 
996 private:
997  // Member variables, accessible through getters
998  // giving write access to subclass can be dangerous
1000 
1002  uint32_t m_mtu;
1003 
1004  uint32_t m_pktSize;
1005  uint32_t m_pktCount;
1007 
1010 
1011 private:
1012  // De-multiplexing callbacks.
1013 
1018  void NormalCloseCb (Ptr<Socket> socket);
1023  void ErrorCloseCb (Ptr<Socket> socket);
1029  void QueueDropCb (std::string context, Ptr<const Packet> p);
1035  void PhyDropCb (std::string context, Ptr<const Packet> p);
1042  void RcvAckCb (Ptr<const Packet> p, const TcpHeader& h,
1050  void ProcessedAckCb (Ptr<const Packet> p, const TcpHeader& h,
1058  void TxPacketCb (const Ptr<const Packet> p, const TcpHeader& h,
1059  const Ptr<const TcpSocketBase> tcp);
1066  void RxPacketCb (const Ptr<const Packet> p, const TcpHeader& h,
1067  const Ptr<const TcpSocketBase> tcp);
1073  void RtoExpiredCb (const Ptr<const TcpSocketState> tcb,
1074  const Ptr<const TcpSocketBase> tcp);
1083  uint32_t sz, bool isRetransmission);
1084 
1091  const Ptr<const TcpSocketBase> tcp);
1092 
1099  const Ptr<const TcpSocketBase> tcp);
1100 
1106  void DataSentCb (Ptr<Socket> socket, uint32_t size);
1111  void ForkCb (Ptr<TcpSocketMsgBase> tcp);
1117  void HandleAccept (Ptr<Socket> socket, const Address& from);
1118 
1120 };
1121 
1131 static inline TcpSocketState::TcpCongState_t
1133 {
1134  return tcb->m_congState.Get ();
1135 }
1136 
1137 } // namespace ns3
1138 
1139 #endif // TCPGENERALTEST_H
1140 
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.
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.
Simulation virtual time values and global simulation resolution.
Definition: nstime.h:102
an Inet address class
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:73
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.
Callback template class.
Definition: callback.h:1176
RetrCb m_afterRetrCallback
After retransmission callback.
Class for inserting callbacks special points of the flow of TCP sockets.
virtual void DoTeardown(void)
Teardown the TCP test.
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.
Ptr< TcpSocketMsgBase > GetSenderSocket()
Get the pointer to a previously created sender socket.
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
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.
Callback< void, Ptr< const TcpSocketState >, Ptr< const TcpSocketBase > > RetrCb
Callback for the packet retransmission management.
void SetBytesToAck(uint32_t bytes)
Set the bytes to be ACKed.
virtual void FinalChecks()
Performs the (eventual) final checks through test asserts.
void SetAppPktSize(uint32_t pktSize)
Set app packet size.
void ErrorCloseCb(Ptr< Socket > socket)
Error Close Callback.
#define NS_UNUSED(x)
Mark a local variable as unused.
Definition: unused.h:36
static TcpSocketState::TcpCongState_t GetCongStateFrom(Ptr< const TcpSocketState > tcb)
Convenience function to retrieve the ACK state from a TCB.
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.
Time GetMinRto(SocketWho who)
Get the minimum RTO attribute.
virtual void SsThreshTrace(uint32_t oldValue, uint32_t newValue)
Slow start threshold changes.
encapsulates test code
Definition: test.h:1155
virtual void ConfigureProperties(void)
Change the configuration of the socket properties.
uint32_t GetDelAckCount(SocketWho who)
Get the number of delayed ack (if present)
virtual void CWndInflTrace(uint32_t oldValue, uint32_t newValue)
Tracks the inflated congestion window changes.
Time GetPropagationDelay() const
Get the channel Propagation Delay.
virtual void ReceivedAck(Ptr< Packet > packet, const TcpHeader &tcpHeader)
Received an ACK packet.
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
Definition: address.h:90
Time GetStartTime() const
Get the data start time.
SequenceNumber32 GetHighestTxMark(SocketWho who)
Get the highest tx mark of the node specified.
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.
void SetForkCb(Callback< void, Ptr< TcpSocketMsgBase > > cb)
Set the callback invoked after the forking.
TcpSocketMsgBase(const TcpSocketMsgBase &other)
Constructor.
TcpSocket::TcpStates_t GetTcpState(SocketWho who)
Get the state of the TCP state machine.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
double startTime
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.
virtual void ReceivePacket(Ptr< Socket > socket)
Packet received.
uint32_t m_pktCount
Count of the application packet.
Time m_interPacketInterval
Time between sending application packet down to tcp socket.
A base class for implementation of a stream socket using TCP.
void SetInitialSsThresh(SocketWho who, uint32_t initialSsThresh)
Forcefully set the initial ssth.
Ptr< TcpSocketState > GetTcb(SocketWho who)
Get the TCB from selected socket.
void DataSentCb(Ptr< Socket > socket, uint32_t size)
Data sent Callback.
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.
TcpCongState_t
Definition of the Congestion state machine.
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.
uint32_t GetPktSize() const
Get the application packet size.
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.
static TypeId GetTypeId(void)
Get the type ID.
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.
uint32_t GetSegSize(SocketWho who)
Get the segment size of the node specified.
virtual void QueueDrop(SocketWho who)
Drop on the queue.
TracedValue< TcpCongState_t > m_congState
State in the Congestion state machine.
Header for the Transmission Control Protocol.
Definition: tcp-header.h:44
uint32_t GetDupAckCount(SocketWho who)
Get the number of dupack received.
void HandleAccept(Ptr< Socket > socket, const Address &from)
Handle an accept connection.
void NormalCloseCb(Ptr< Socket > socket)
Normal Close Callback.
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.
uint32_t GetPktCount() const
Get the number of application packets.
TcpGeneralTest(const std::string &desc)
TcpGeneralTest constructor.
TcpSocketSmallAcks(const TcpSocketSmallAcks &other)
Constructor.
void SetRcvBufSize(SocketWho who, uint32_t size)
Forcefully set a defined size for rx buffer.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
virtual void ReTxTimeout(void)
An RTO event happened.
Time GetDelAckTimeout(SocketWho who)
Get the timeout of delayed ack (if present)
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.
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.
Definition: tcp-socket.h:65
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
virtual void NormalClose(SocketWho who)
Socket closed normally.
General infrastructure for TCP testing.
uint32_t GetMtu() const
Get the MTU of the environment.
An identifier for simulation events.
Definition: event-id.h:53
void PhyDropCb(std::string context, Ptr< const Packet > p)
Drop at Phy layer Callback.
Ptr< TcpSocketMsgBase > GetReceiverSocket()
Get the pointer to a previously created receiver socket.
T Get(void) const
Get the underlying value.
Definition: traced-value.h:218
uint32_t GetInitialCwnd(SocketWho who)
Get the initial congestion window.
void AfterRetransmitCb(const Ptr< const TcpSocketState > tcb, const Ptr< const TcpSocketBase > tcp)
Invoked after a retransmit event.
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.
void RtoExpiredCb(const Ptr< const TcpSocketState > tcb, const Ptr< const TcpSocketBase > tcp)
RTO expired Callback.
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.
RetrCb m_beforeRetrCallback
Before retransmission callback.
Time GetPktInterval() const
Get the interval to wait for each packet sent down from application to TCP.
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.
void QueueDropCb(std::string context, Ptr< const Packet > p)
Queue Drop Callback.
uint32_t m_bytesLeftToBeAcked
Number of bytes to be ACKed left.
Time GetPersistentTimeout(SocketWho who)
Get the persistent timeout of the selected socket.
Ptr< TcpTxBuffer > GetTxBuffer(SocketWho who)
Get the Tx buffer from selected socket.
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.
void RxPacketCb(const Ptr< const Packet > p, const TcpHeader &h, const Ptr< const TcpSocketBase > tcp)
Rx packet Callback.
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.
uint32_t m_bytesToAck
Number of bytes to be ACKed.
Callback< void, Ptr< const Packet >, const TcpHeader &, Ptr< const TcpSocketBase > > AckManagementCb
Callback for the ACK management.
Ptr< RttEstimator > GetRttEstimator(SocketWho who)
Get the Rtt estimator of the socket.
a unique identifier for an interface.
Definition: type-id.h:58
virtual void CWndTrace(uint32_t oldValue, uint32_t newValue)
Tracks the congestion window changes.
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.
Time m_startTime
Data transmission time.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.
virtual void AfterRTOExpired(const Ptr< const TcpSocketState > tcb, SocketWho who)
Rto has expired.
TypeId m_congControlTypeId
Congestion control.
Time GetRto(SocketWho who)
Get the retransmission time.
Callback< void, Ptr< const TcpSocketBase >, const SequenceNumber32 &, uint32_t, bool > UpdateRttCallback
Callback for the RTT update management.