|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
20 #include "ns3/simple-channel.h"
21 #include "ns3/tcp-westwood.h"
22 #include "ns3/config.h"
69 uint32_t packets,
TypeId& congControl,
70 const std::string &desc);
72 virtual void CWndTrace (uint32_t oldValue, uint32_t newValue);
82 virtual void ConfigureEnvironment ();
83 virtual void ConfigureProperties ();
99 const std::string &desc)
113 TcpGeneralTest::ConfigureEnvironment ();
121 TcpGeneralTest::ConfigureProperties ();
147 NS_FATAL_ERROR (
"Drop on the queue; cannot validate congestion avoidance");
153 NS_FATAL_ERROR (
"Drop on the phy: cannot validate congestion avoidance");
159 uint32_t segSize =
GetSegSize (TcpGeneralTest::SENDER);
164 "Increment exceeded segment size in one RTT");
196 std::list<TypeId> types;
197 types.insert (types.begin (), TcpWestwood::GetTypeId ());
198 types.insert (types.begin (), TcpNewReno::GetTypeId ());
200 for (std::list<TypeId>::iterator it = types.begin (); it != types.end (); ++it)
202 for (uint32_t i = 10; i <= 50; i += 10)
205 "cong avoid MSS=500, pkt_size=500," + (*it).GetName ()),
208 "cong avoid MSS=500, pkt_size=1000," + (*it).GetName ()),
a unique identifier for an interface.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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.
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_packets
Number of packets.
An identifier for simulation events.
virtual void QueueDrop(SocketWho who)
Drop on the queue.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
virtual void ConfigureEnvironment()
Change the configuration of the environment.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
uint32_t m_segmentSize
Segment size.
virtual void ConfigureProperties()
Change the configuration of the socket properties.
uint32_t GetSegSize(SocketWho who)
Get the segment size of the node specified.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
virtual void CWndTrace(uint32_t oldValue, uint32_t newValue)
Tracks the congestion window changes.
virtual void NormalClose(SocketWho who)
Socket closed normally.
#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().
uint32_t m_packetSize
Size of the packets.
void Cancel(void)
This method is syntactic sugar for the ns3::Simulator::Cancel method.
Test the behavior of RFC congestion avoidance.
TcpRenoCongAvoidTestSuite()
static TcpRenoCongAvoidTestSuite g_tcpCongAvoidNormalTest
Static variable for test initialization.
General infrastructure for TCP testing.
TestSuite for the behavior of RFC congestion avoidance.
static const uint32_t packetSize
@ UNIT
This test suite implements a Unit Test.
Time Seconds(double value)
Construct a Time in the indicated unit.
TypeId m_congControlTypeId
Congestion control.
TcpNewRenoCongAvoidNormalTest(uint32_t segmentSize, uint32_t packetSize, uint32_t packets, TypeId &congControl, const std::string &desc)
Constructor.
virtual void PhyDrop(SocketWho who)
Link drop.
void SetAppPktSize(uint32_t pktSize)
Set app packet size.
EventId m_event
Check event.
void SetInitialSsThresh(SocketWho who, uint32_t initialSsThresh)
Forcefully set the initial ssthresh.
void Check()
Called each RTT (1.0 sec in the testing environment) and check that the overall increment in this RTT...
bool m_initial
True on first run.
uint32_t m_increment
Congestion window increment.
void SetSegmentSize(SocketWho who, uint32_t segmentSize)
Forcefully set the segment size.