58 m_zeroWindowProbe (false),
59 m_windowUpdated (false),
60 m_senderFinished (false),
61 m_receiverFinished (false)
93 "Data packet sent anyway");
103 "Data packet sent instead of window probe");
105 "Data packet sent instead of window probe");
112 NS_FATAL_ERROR (
"No packets should be sent before the window update");
122 "RECEIVER window size is not 0 in the SYN-ACK");
129 "Data packet sent instead of window probe");
131 "No zero window advertised by RECEIVER");
136 NS_FATAL_ERROR (
"No packets should be sent before the window update");
141 "Receiver window not updated");
146 "Sender State is not OPEN");
148 "Receiver State is not OPEN");
161 "RECEIVER window size is not 0 in the SYN-ACK");
167 "Receiver window not updated");
194 "Zero window probe not sent");
196 "Window has not updated during the connection");
198 "Connection not closed successfully (SENDER)");
200 "Connection not closed successfully (RECEIVER)");
213 "Persistent event not started");
Smart pointer class similar to boost::intrusive_ptr.
Normal state, no dubious events.
EventId m_receivePktEvent
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
TcpZeroWindowTest(const std::string &desc)
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
#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.
bool IsRunning(void) const
This method is syntactic sugar for !IsExpired().
This test suite implements a Unit Test.
static TcpSocketState::TcpCongState_t GetCongStateFrom(Ptr< const TcpSocketState > tcb)
Convenience function to retrieve the ACK state from a TCB.
void NormalClose(SocketWho who)
Socket closed normally.
ns3::TcpZeroWindowTestSuite g_tcpZeroWindowTestSuite
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
double GetSeconds(void) const
Get an approximation of the time stored in this instance in the indicated unit.
void FinalChecks()
Performs the (eventual) final checks through test asserts.
static EventId Schedule(Time const &delay, MEM mem_ptr, OBJ obj)
Schedule an event to expire after delay.
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
virtual void ProcessedAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who)
Processed ack.
Hold an unsigned integer type.
#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 Time Now(void)
Return the current simulation virtual time.
virtual void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
General infrastructure for TCP testing.
An identifier for simulation events.
Time Seconds(double value)
Construct a Time in the indicated unit.
Ptr< TcpSocketState > GetTcb(SocketWho who)
Get the TCB from selected socket.
EventId GetPersistentEvent(SocketWho who)
Get the persistent event of the selected socket.
void SetRcvBufSize(SocketWho who, uint32_t size)
Forcefully set a defined size for rx buffer.
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
SequenceNumber< uint32_t, int32_t > SequenceNumber32
32 bit Sequence number.