20 #include "ns3/simple-channel.h"
21 #include "ns3/internet-module.h"
22 #include "ns3/config.h"
33 const std::string &desc)
35 Seconds (10), 0, 1, segmentSize, typeId, 1500),
69 NS_FATAL_ERROR (
"Drop on the queue; cannot validate congestion avoidance");
75 NS_FATAL_ERROR (
"Drop on the phy: cannot validate congestion avoidance");
90 "Increment exceeded segment size in one RTT");
116 std::list<TypeId> types;
120 for (std::list<TypeId>::iterator it = types.begin (); it != types.end (); ++it)
122 for (uint32_t i = 10; i <= 50; i += 10)
125 "cong avoid MSS=500, pkt_size=500," + (*it).GetName ()),
128 "cong avoid MSS=500, pkt_size=1000," + (*it).GetName ()),
uint32_t GetSegSize(SocketWho who)
Get the segment size of the node specified.
void PhyDrop(SocketWho who)
Link drop.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
void QueueDrop(SocketWho who)
Drop on the queue.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
void NormalClose(SocketWho who)
Socket closed normally.
This test suite implements a Unit Test.
static TypeId GetTypeId(void)
Get the type ID.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
virtual void CWndTrace(uint32_t oldValue, uint32_t newValue)
Check the increment of the congestion window in the congestion avoidance.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
TcpNewRenoCongAvoidNormalTest(uint32_t segmentSize, uint32_t packetSize, uint32_t packets, TypeId &congControl, const std::string &msg)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TypeId GetTypeId(void)
Get the type ID.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
General infrastructure for TCP testing.
TcpRenoCongAvoidTestSuite()
Time Seconds(double value)
Construct a Time in the indicated unit.
ns3::TcpRenoCongAvoidTestSuite g_tcpCongAvoidNormalTest
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
void Check()
Called each RTT (1.0 sec in the testing environment) and check that the overall increment in this RTT...
Test the behavior of RFC congestion avoidance.
#define NS_TEST_ASSERT_MSG_LT_OR_EQ(actual, limit, msg)
Test that an actual value is less than or equal to a limit and report and abort if not...
static const uint32_t packetSize
a unique identifier for an interface.