21 #include "ns3/simple-channel.h"    23 #include "ns3/config.h"    24 #include "ns3/tcp-westwood.h"    25 #include "ns3/tcp-header.h"    61                           uint32_t initSsTh, uint32_t packets, 
TypeId& congControl,
    62                           const std::string &desc);
    65   virtual void CWndTrace (uint32_t oldValue, uint32_t newValue);
    71   virtual void ConfigureEnvironment ();
    72   virtual void ConfigureProperties ();
    92                                                 const std::string &desc)
    96     m_totalAckedBytes (0),
    97     m_allowedIncrease (0),
   109   TcpGeneralTest::ConfigureEnvironment ();
   117   TcpGeneralTest::ConfigureProperties ();
   149   uint32_t segSize = 
GetSegSize (TcpGeneralTest::SENDER);
   150   uint32_t increase = newValue - oldValue;
   156                    " with a segsize of " << segSize);
   164   NS_LOG_INFO (
"Incremented cWnd by " << segSize << 
" bytes in Slow Start " <<
   165                "achieving a value of " << newValue);
   234                             uint32_t initSsTh, uint32_t packets, 
TypeId& congControl,
   235                             const std::string &desc);
   245                                                     TypeId &typeId, 
const std::string &msg)
   256                     TcpSocketSmallAcks::GetTypeId (),
   276     std::list<TypeId> types;
   277     types.insert (types.begin (), TcpNewReno::GetTypeId ());
   278     types.insert (types.begin (), TcpWestwood::GetTypeId ());
   280     for (std::list<TypeId>::iterator it = types.begin (); it != types.end (); ++it)
   283                                                  "slow start 500 byte, " + (*it).GetName ()),
   286                                                  "slow start 1000 byte, " + (*it).GetName ()),
   289                                                  "slow start small packets, " + (*it).GetName ()),
   292                                                    "slow start ack attacker, 500 byte, " + (*it).GetName ()),
   295                                                    "slow start ack attacker, 1000 byte, " + (*it).GetName ()),
 virtual void ConfigureEnvironment()
Change the configuration of the environment. 
#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. 
TcpSlowStartAttackerTest(uint32_t segmentSize, uint32_t packetSize, uint32_t initSsTh, uint32_t packets, TypeId &congControl, const std::string &desc)
Constructor. 
virtual void ConfigureProperties()
Change the configuration of the socket properties. 
bool m_initial
First cycle flag. 
static const uint32_t packetSize
virtual void CWndTrace(uint32_t oldValue, uint32_t newValue)
Trace the cWnd over the slow start. 
void SetBytesToAck(uint32_t bytes)
Set the bytes to be ACKed. 
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name. 
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver. 
void SetAppPktSize(uint32_t pktSize)
Set app packet size. 
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO. 
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate. 
Test the normal behavior for slow start. 
void PhyDrop(SocketWho who)
Link drop. 
uint32_t m_allowedIncrease
Allowed increase. 
TCP Slow Start TestSuite. 
uint32_t m_packetSize
Packet size. 
A slow start test using a socket which sends smaller ACKs. 
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite. 
void QueueDrop(SocketWho who)
Drop on the queue. 
uint32_t GetInitialSsThresh(SocketWho who)
Get the initial slow start threshold. 
#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. 
static TcpSlowStartTestSuite g_tcpSlowStartTestSuite
Static variable for test initialization. 
virtual void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer. 
void SetInitialSsThresh(SocketWho who, uint32_t initialSsThresh)
Forcefully set the initial ssthresh. 
uint32_t m_packets
Packet counter. 
virtual Ptr< TcpSocketMsgBase > CreateSocket(Ptr< Node > node, TypeId socketType, TypeId congControl)
Create a socket. 
Every class exported by the ns3 library is enclosed in the ns3 namespace. 
TcpSlowStartNormalTest(uint32_t segmentSize, uint32_t packetSize, uint32_t initSsTh, uint32_t packets, TypeId &congControl, const std::string &desc)
Constructor. 
uint32_t GetSegSize(SocketWho who)
Get the segment size of the node specified. 
void SetAppPktCount(uint32_t pktCount)
Set app packet count. 
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g. 
uint32_t m_segmentSize
Segment size. 
General infrastructure for TCP testing. 
uint32_t m_ackedBytes
ACKed bytes. 
uint32_t m_totalAckedBytes
Total ACKed bytes. 
Time Now(void)
create an ns3::Time instance which contains the current simulation time. 
#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...
This test suite implements a Unit Test. 
NUMERIC_TYPE GetValue() const
Extracts the numeric value of the sequence number. 
#define NS_TEST_ASSERT_MSG_GT_OR_EQ(actual, limit, msg)
Test that an actual value is greater than or equal to a limit and report and abort if not...
a unique identifier for an interface. 
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer. 
TypeId m_congControlTypeId
Congestion control. 
uint32_t m_sentBytes
Sent bytes.