24 #include "ns3/tcp-westwood.h"
32 Seconds (10), 0, 1, 500, congControl, 1500),
34 m_segmentReceived (false)
56 "Second RTO expired");
58 "Ack state machine not in LOSS state after a loss");
76 "Ack state machine not in LOSS state after a loss");
81 "Ack state machine not in OPEN state after recovering "
94 "Ack state machine not in OPEN state after recovering "
111 "Retransmission has not been done");
118 Seconds (10), 0xffff, 1, 500, congControl, 1500),
119 m_senderSentSegments (0),
140 for (uint32_t i = 0; i<7; ++i)
167 "SYN packet sent without respecting "
168 "ConnTimeout attribute");
176 "First packet has been correctly sent");
190 if (clockGranularity > rttEstimator->GetVariation ()*4)
202 "RTO value differs from calculation");
208 "RTO value has changed unexpectedly");
235 "RTO has not doubled after an expiration");
241 "RTO goes beyond 60 second limit");
255 "Socket has not been closed after retrying data retransmissions");
265 std::list<TypeId> types;
269 for (std::list<TypeId>::iterator it = types.begin (); it != types.end (); ++it)
Time GetMinRto(SocketWho who)
Get the minimun RTO attribute.
virtual void ErrorClose(SocketWho who)
Socket closed with an error.
Simulation virtual time values and global simulation resolution.
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 "...
Normal state, no dubious events.
NUMERIC_TYPE GetValue() const
Extracts the numeric value of the sequence number.
uint32_t m_senderSentSegments
ns3::TcpRtoTestSuite g_TcpRtoTestSuite
#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.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
This test suite implements a Unit Test.
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.
virtual void ProcessedAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who)
Processed ack.
static TypeId GetTypeId(void)
Get the type ID.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
AttributeValue implementation for Time.
TcpTimeRtoTest(TypeId &congControl, const std::string &msg)
Testing the moments after an RTO expiration.
virtual void FinalChecks()
Performs the (eventual) final checks through test asserts.
Hold an unsigned integer type.
#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.
virtual Ptr< ErrorModel > CreateReceiverErrorModel()
Create and return the error model to install in the receiver node.
int64x64_t Max(const int64x64_t &a, const int64x64_t &b)
Maximum.
Time GetConnTimeout(SocketWho who)
Get the retransmission time for the SYN segments.
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
#define NS_TEST_ASSERT_MSG_EQ_TOL(actual, limit, tol, msg)
Test that actual and expected (limit) values are equal to plus or minus some tolerance and report and...
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
Time GetRto(SocketWho who)
Get the retransmission time.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void RTOExpired(const Ptr< const TcpSocketState > tcb, SocketWho who)
Rto has expired.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
static TypeId GetTypeId(void)
Get the type ID.
virtual void RcvAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who)
Received ack.
void PktDropped(const Ipv4Header &ipH, const TcpHeader &tcpH)
Time GetClockGranularity(SocketWho who)
Get the clock granularity attribute.
static Time Now(void)
Return the current simulation virtual time.
TcpRtoTest(TypeId &congControl, const std::string &msg)
virtual void RTOExpired(const Ptr< const TcpSocketState > tcb, SocketWho who)
Rto has expired.
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.
CWND was reduced due to RTO timeout or SACK reneging.
virtual void FinalChecks()
Performs the (eventual) final checks through test asserts.
Time Seconds(double value)
Construct a Time in the indicated unit.
a unique identifier for an interface.
Testing the timing of RTO.