|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
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_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
uint32_t m_sent
Number of segments sent.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Check rollover of sequence number and how that affects loss recovery.
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
uint32_t m_lastSegment
Last received segment.
std::list< int > m_expectedStates
Expected TCP states.
void ConfigureEnvironment(void)
Change the configuration of the environment.
Time MicroSeconds(uint64_t value)
Construct a Time in the indicated unit.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
TcpCongState_t
Definition of the Congestion state machine.
static TcpLossTestSuite g_tcpLossTest
static var for test initialization
#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.
void SetList(const std::list< uint32_t > &packetlist)
void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
void SetAppPktInterval(Time pktInterval)
Interval between app-generated packet.
void ConfigureProperties(void)
Change the configuration of the socket properties.
uint32_t m_received
Number of segments received.
General infrastructure for TCP testing.
#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.
void CongStateTrace(const TcpSocketState::TcpCongState_t oldValue, const TcpSocketState::TcpCongState_t newValue)
State on Ack state machine changes.
Ptr< ErrorModel > CreateReceiverErrorModel()
Create and return the error model to install in the receiver node.
@ UNIT
This test suite implements a Unit Test.
Time Seconds(double value)
Construct a Time in the indicated unit.
#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.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
void SetAppPktSize(uint32_t pktSize)
Set app packet size.
void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
uint32_t m_firstLoss
First segment loss.
Test various packet losses.
TcpLargeTransferLossTest(uint32_t firstLoss, uint32_t secondLoss, uint32_t lastSegment, const std::string &desc)
Constructor.
void FinalChecks(void)
Performs the (eventual) final checks through test asserts.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.
uint32_t m_secondLoss
Second segment loss.
void SetSegmentSize(SocketWho who, uint32_t segmentSize)
Forcefully set the segment size.