53 void FinalChecks()
override;
55 void ConfigureEnvironment()
override;
56 void ConfigureProperties()
override;
61 void IncreaseBufSize();
73 m_zeroWindowProbe(false),
74 m_windowUpdated(false),
75 m_senderFinished(false),
76 m_receiverFinished(false)
83 TcpGeneralTest::ConfigureEnvironment();
93 TcpGeneralTest::ConfigureProperties();
134 "Data packet sent instead of window probe");
140 NS_FATAL_ERROR(
"No packets should be sent before the window update");
151 "RECEIVER window size is not 0 in the SYN-ACK");
158 "Data packet sent instead of window probe");
163 NS_FATAL_ERROR(
"No packets should be sent before the window update");
172 TcpSocketState::CA_OPEN,
173 "Sender State is not OPEN");
175 TcpSocketState::CA_OPEN,
176 "Receiver State is not OPEN");
190 "RECEIVER window size is not 0 in the SYN-ACK");
226 "Connection not closed successfully (RECEIVER)");
241 "Persistent event not started");
Testing the congestion avoidance increment on TCP ZeroWindow.
void ConfigureEnvironment() override
Change the configuration of the environment.
void FinalChecks() override
Performs the (eventual) final checks through test asserts.
void NormalClose(SocketWho who) override
bool m_windowUpdated
Window updated.
void ProcessedAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who) override
bool m_senderFinished
Send finished.
bool m_receiverFinished
Receiver finished.
Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node) override
Create and install the socket to install on the receiver.
void IncreaseBufSize()
Increase the receiver buffer size.
void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who) override
Packet received from IP layer.
void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who) override
Packet transmitted down to IP layer.
bool m_zeroWindowProbe
ZeroWindow probe.
TcpZeroWindowTest(const std::string &desc)
Constructor.
EventId m_receivePktEvent
Receive packet event.
void ConfigureProperties() override
Change the configuration of the socket properties.
TCP ZeroWindow TestSuite.
An identifier for simulation events.
bool IsRunning() const
This method is syntactic sugar for !IsExpired().
uint32_t GetSize() const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Smart pointer class similar to boost::intrusive_ptr.
General infrastructure for TCP testing.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.
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.
Ptr< TcpSocketState > GetTcb(SocketWho who)
Get the TCB from selected socket.
void SetRcvBufSize(SocketWho who, uint32_t size)
Forcefully set a defined size for rx buffer.
EventId GetPersistentEvent(SocketWho who)
Get the persistent event of the selected socket.
void SetInitialCwnd(SocketWho who, uint32_t initialCwnd)
Forcefully set the initial cwnd.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
@ UNIT
This test suite implements a Unit Test.
Hold an unsigned integer type.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#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.
Time Now()
create an ns3::Time instance which contains the current simulation time.
#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.
Time Seconds(double value)
Construct a Time in the indicated unit.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
static TcpZeroWindowTestSuite g_tcpZeroWindowTestSuite
Static variable for test initialization.