12#include "ns3/tcp-header.h"
13#include "ns3/tcp-rx-buffer.h"
14#include "ns3/tcp-tx-buffer.h"
83 socket->SetAttribute(
"WindowScaling",
BooleanValue(
false));
87 socket->SetAttribute(
"WindowScaling",
BooleanValue(
true));
91 socket->SetAttribute(
"WindowScaling",
BooleanValue(
false));
95 socket->SetAttribute(
"WindowScaling",
BooleanValue(
true));
111 socket->SetAttribute(
"WindowScaling",
BooleanValue(
false));
116 socket->SetAttribute(
"WindowScaling",
BooleanValue(
true));
132 "wscale present in non-SYN packets");
140 "wscale disabled but option enabled");
146 "wscale enabled but option disabled");
170 "wscale disabled but option enabled");
176 "wscale enabled but option disabled");
197 "sender has not ws, but receiver sent anyway");
203 "receiver has not ws enabled but sent anyway");
222 TestCase::Duration::QUICK);
226 "Window scaling not used, all enabled"),
227 TestCase::Duration::QUICK);
229 TestCase::Duration::QUICK);
233 "WS enabled client"),
234 TestCase::Duration::QUICK);
238 "WS disabled client"),
239 TestCase::Duration::QUICK);
243 TestCase::Duration::QUICK);
246 TestCase::Duration::QUICK);
249 TestCase::Duration::QUICK);
252 TestCase::Duration::QUICK);
256 "WS small window, sender"),
257 TestCase::Duration::QUICK);
TCP Window Scaling TestSuite.
TCP Window Scaling enabling Test.
WScalingTestCase(WScalingTestCase::Configuration conf, uint32_t maxRcvBufferSize, uint32_t maxSndBufferSize, std::string name)
Constructor.
Configuration
Window Scaling configuration.
Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node) override
Create and install the socket to install on the receiver.
Configuration m_configuration
Test configuration.
Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node) override
Create and install the socket to install on the sender.
uint32_t m_maxRcvBufferSize
Maximum receiver buffer size.
uint32_t m_maxSndBufferSize
Maximum sender buffer size.
void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who) override
Packet transmitted down to IP layer.
Smart pointer class similar to boost::intrusive_ptr.
General infrastructure for TCP testing.
virtual Ptr< TcpSocketMsgBase > CreateSenderSocket(Ptr< Node > node)
Create and install the socket to install on the sender.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
Ptr< TcpRxBuffer > GetRxBuffer(SocketWho who)
Get the Rx buffer from selected socket.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
#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.