66 m_enableTs (enableTs),
69 m_pktCount (pktCount),
123 "Default Estimate for the RTT");
148 "A retransmission is not flagged as such");
153 "Incorrectly flagging seq as retransmission");
159 "A retransmission is not flagged as such");
181 uint32_t pktCount, std::vector<uint32_t> toDrop);
193 std::vector<uint32_t> toDrop)
205 std::vector<uint32_t>::iterator it;
231 std::vector<uint32_t> toDrop;
232 toDrop.push_back (501);
235 " some data, with retr",
239 " some data, with retr",
243 toDrop.push_back (501);
245 " some data, with retr",
249 " some data, with retr",
253 toDrop.push_back (54001);
254 toDrop.push_back (58001);
255 toDrop.push_back (58501);
256 toDrop.push_back (60001);
257 toDrop.push_back (68501);
259 " a lot of data, with retr",
260 false, 1000, toDrop),
263 " a lot of data, with retr",
Simulation virtual time values and global simulation resolution.
Smart pointer class similar to boost::intrusive_ptr.
void FinalChecks()
Performs the (eventual) final checks through test asserts.
AttributeValue implementation for Boolean.
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
#define NS_ASSERT(condition)
At runtime, in debugging builds, if this condition is not true, the program prints the source file...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
This test suite implements a Unit Test.
TcpRttEstimationTestSuite()
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
TcpRttEstimationTest(const std::string &desc, bool enableTs, uint32_t dataPkt)
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
virtual void ConfigureEnvironment()
Change the configuration of the evironment.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
virtual void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
#define NS_TEST_ASSERT_MSG_EQ(actual, limit, msg)
Test that an actual and expected (limit) value are equal and report and abort if not.
ns3::TcpRttEstimationTestSuite g_tcpRttEstimationTestSuite
TcpRttEstimationWithLossTest(const std::string &desc, bool enableTs, uint32_t pktCount, std::vector< uint32_t > toDrop)
SequenceNumber32 m_highestTxSeq
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void RttTrace(Time oldTime, Time newTime)
Rtt changes.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
virtual void UpdatedRttHistory(const SequenceNumber32 &seq, uint32_t sz, bool isRetransmission, SocketWho who)
Updated the Rtt history.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
Ptr< RttEstimator > GetRttEstimator(SocketWho who)
Get the Rtt estimator of the socket.
General infrastructure for TCP testing.
#define NS_TEST_ASSERT_MSG_NE(actual, limit, msg)
Test that an actual and expected (limit) value are not equal and report and abort if not...
virtual void ConfigureEnvironment(void)
Change the configuration of the evironment.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Time Seconds(double value)
Construct a Time in the indicated unit.
std::vector< uint32_t > m_toDrop
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
Ptr< ErrorModel > CreateReceiverErrorModel()
Create and return the error model to install in the receiver node.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.