62 m_zeroWindowProbe(false),
63 m_windowUpdated(false),
64 m_senderFinished(false),
65 m_receiverFinished(false)
108 NS_LOG_INFO(
"\tSENDER TX " << h <<
" size " << p->GetSize());
123 "Data packet sent instead of window probe");
129 NS_FATAL_ERROR(
"No packets should be sent before the window update");
134 NS_LOG_INFO(
"\tRECEIVER TX " << h <<
" size " << p->GetSize());
140 "RECEIVER window size is not 0 in the SYN-ACK");
147 "Data packet sent instead of window probe");
152 NS_FATAL_ERROR(
"No packets should be sent before the window update");
162 "Sender State is not OPEN");
165 "Receiver State is not OPEN");
173 NS_LOG_INFO(
"\tSENDER RX " << h <<
" size " << p->GetSize());
179 "RECEIVER window size is not 0 in the SYN-ACK");
190 NS_LOG_INFO(
"\tRECEIVER RX " << h <<
" size " << p->GetSize());
215 "Connection not closed successfully (RECEIVER)");
230 "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
Socket closed normally.
bool m_windowUpdated
Window updated.
void ProcessedAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who) override
Processed ack.
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 IsPending() const
This method is syntactic sugar for !IsExpired().
Smart pointer class similar to boost::intrusive_ptr.
static EventId Schedule(const Time &delay, FUNC f, Ts &&... args)
Schedule an event to expire after delay.
static Time Now()
Return the current simulation virtual time.
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.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
virtual void ConfigureProperties()
Change the configuration of the socket properties.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
virtual void ConfigureEnvironment()
Change the configuration of the environment.
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
@ CA_OPEN
Normal state, no dubious events.
void AddTestCase(TestCase *testCase, Duration duration=Duration::QUICK)
Add an individual child TestCase to this test suite.
static constexpr auto UNIT
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.
#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.