24 #include "ns3/tcp-header.h"
25 #include "ns3/tcp-tx-buffer.h"
26 #include "ns3/tcp-rx-buffer.h"
62 uint32_t maxRcvBufferSize,
63 uint32_t maxSndBufferSize, std::string name);
77 uint32_t maxRcvBufferSize,
78 uint32_t maxSndBufferSize, std::string name)
94 socket->SetAttribute (
"WindowScaling",
BooleanValue (
false));
98 socket->SetAttribute (
"WindowScaling",
BooleanValue (
true));
102 socket->SetAttribute (
"WindowScaling",
BooleanValue (
false));
106 socket->SetAttribute (
"WindowScaling",
BooleanValue (
true));
121 socket->SetAttribute (
"WindowScaling",
BooleanValue (
false));
125 socket->SetAttribute (
"WindowScaling",
BooleanValue (
false));
129 socket->SetAttribute (
"WindowScaling",
BooleanValue (
true));
133 socket->SetAttribute (
"WindowScaling",
BooleanValue (
true));
145 if (! (h.
GetFlags() & TcpHeader::SYN))
148 "wscale present in non-SYN packets");
155 "wscale disabled but option enabled");
160 "wscale enabled but option disabled");
183 "wscale disabled but option enabled");
188 "wscale enabled but option disabled");
208 "sender has not ws, but receiver sent anyway");
213 "receiver has not ws enabled but sent anyway");
TCP Window Scaling TestSuite.
TCP Window Scaling enabling Test.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
WScalingTestCase(WScalingTestCase::Configuration conf, uint32_t maxRcvBufferSize, uint32_t maxSndBufferSize, std::string name)
Constructor.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
Configuration
Window Scaling configuration.
Configuration m_configuration
Test configuration.
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
uint32_t m_maxRcvBufferSize
Maximum receiver buffer size.
uint32_t m_maxSndBufferSize
Maximum sender buffer size.
AttributeValue implementation for Boolean.
Smart pointer class similar to boost::intrusive_ptr.
General infrastructure for TCP testing.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
Ptr< TcpRxBuffer > GetRxBuffer(SocketWho who)
Get the Rx buffer from selected socket.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
#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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TcpWScalingTestSuite g_tcpWScalingTestSuite
Static variable for test initialization.