21 #include "ns3/error-model.h" 68 void ConfigureProperties (
void);
69 void ConfigureEnvironment (
void);
70 void FinalChecks (
void);
80 uint32_t m_received {0};
81 uint32_t m_lastSegment {0};
87 m_firstLoss (firstLoss),
88 m_secondLoss (secondLoss),
89 m_lastSegment (lastSegment)
116 TcpGeneralTest::ConfigureEnvironment ();
130 TcpGeneralTest::ConfigureProperties ();
139 std::list<uint32_t> errorList;
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
void SetSegmentSize(SocketWho who, uint32_t segmentSize)
Forcefully set the segment size.
std::list< int > m_expectedStates
void FinalChecks(void)
Performs the (eventual) final checks through test asserts.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void SetAppPktSize(uint32_t pktSize)
Set app packet size.
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
void ConfigureEnvironment(void)
Change the configuration of the environment.
void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
static TcpLossTestSuite g_tcpLossTest
static var for test initialization
Test various packet losses.
void ConfigureProperties(void)
Change the configuration of the socket properties.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
Check rollover of sequence number and how that affects loss recovery.
#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.
TcpCongState_t
Definition of the Congestion state machine.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetList(const std::list< uint32_t > &packetlist)
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
void SetAppPktInterval(Time pktInterval)
Interval between app-generated packet.
void CongStateTrace(const TcpSocketState::TcpCongState_t oldValue, const TcpSocketState::TcpCongState_t newValue)
State on Ack state machine changes.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
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...
Ptr< ErrorModel > CreateReceiverErrorModel()
Create and return the error model to install in the receiver node.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
This test suite implements a Unit Test.
#define NS_TEST_ASSERT_MSG_GT(actual, limit, msg)
Test that an actual value is greater than a limit and report and abort if not.
TcpLargeTransferLossTest(uint32_t firstLoss, uint32_t secondLoss, uint32_t lastSegment, const std::string &desc)
Constructor.
void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.