60 m_zeroWindowProbe (false),
61 m_windowUpdated (false),
62 m_senderFinished (false),
63 m_receiverFinished (false)
112 "Data packet sent anyway");
122 "Data packet sent instead of window probe");
124 "Data packet sent instead of window probe");
131 NS_FATAL_ERROR (
"No packets should be sent before the window update");
141 "RECEIVER window size is not 0 in the SYN-ACK");
148 "Data packet sent instead of window probe");
150 "No zero window advertised by RECEIVER");
155 NS_FATAL_ERROR (
"No packets should be sent before the window update");
160 "Receiver window not updated");
165 "Sender State is not OPEN");
167 "Receiver State is not OPEN");
180 "RECEIVER window size is not 0 in the SYN-ACK");
186 "Receiver window not updated");
213 "Zero window probe not sent");
215 "Window has not updated during the connection");
217 "Connection not closed successfully (SENDER)");
219 "Connection not closed successfully (RECEIVER)");
232 "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.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
#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.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
virtual void ConfigureProperties(void)
Change the configuration of the socket properties.
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.
void SetInitialCwnd(SocketWho who, uint32_t initialCwnd)
Forcefully set the initial cwnd.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
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.
virtual void ConfigureEnvironment(void)
Change the configuration of the evironment.
virtual void ConfigureProperties()
Change the configuration of the socket properties.
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.
virtual void ConfigureEnvironment()
Change the configuration of the evironment.
SequenceNumber< uint32_t, int32_t > SequenceNumber32
32 bit Sequence number.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.