|
A Discrete-Event Network Simulator
|
API
|
Go to the documentation of this file.
56 virtual void ConfigureEnvironment ();
57 virtual void ConfigureProperties ();
62 void IncreaseBufSize ();
74 m_zeroWindowProbe (false),
75 m_windowUpdated (false),
76 m_senderFinished (false),
77 m_receiverFinished (false)
84 TcpGeneralTest::ConfigureEnvironment ();
94 TcpGeneralTest::ConfigureProperties ();
110 Simulator::Schedule (
Seconds (10.0),
126 "Data packet sent anyway");
136 "Data packet sent instead of window probe");
138 "Data packet sent instead of window probe");
145 NS_FATAL_ERROR (
"No packets should be sent before the window update");
155 "RECEIVER window size is not 0 in the SYN-ACK");
162 "Data packet sent instead of window probe");
164 "No zero window advertised by RECEIVER");
169 NS_FATAL_ERROR (
"No packets should be sent before the window update");
174 "Receiver window not updated");
179 "Sender State is not OPEN");
181 "Receiver State is not OPEN");
194 "RECEIVER window size is not 0 in the SYN-ACK");
200 "Receiver window not updated");
227 "Zero window probe not sent");
229 "Window has not updated during the connection");
231 "Connection not closed successfully (SENDER)");
233 "Connection not closed successfully (RECEIVER)");
246 "Persistent event not started");
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
bool m_windowUpdated
Window updated.
virtual void ProcessedAck(const Ptr< const TcpSocketState > tcb, const TcpHeader &h, SocketWho who)
Processed ack.
An identifier for simulation events.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void SetTransmitStart(Time startTime)
Set the initial time at which the application sends the first data packet.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
static TcpSocketState::TcpCongState_t GetCongStateFrom(Ptr< const TcpSocketState > tcb)
Convenience function to retrieve the ACK state from a TCB.
void SetInitialCwnd(SocketWho who, uint32_t initialCwnd)
Forcefully set the initial cwnd.
void IncreaseBufSize()
Increase the receiver buffer size.
void SetRcvBufSize(SocketWho who, uint32_t size)
Forcefully set a defined size for rx buffer.
void SetAttribute(std::string name, const AttributeValue &value)
Set a single attribute, raising fatal errors if unsuccessful.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
Smart pointer class similar to boost::intrusive_ptr.
#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().
bool m_zeroWindowProbe
ZeroWindow probe.
Time Now(void)
create an ns3::Time instance which contains the current simulation time.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
Time MilliSeconds(uint64_t value)
Construct a Time in the indicated unit.
virtual void ConfigureEnvironment()
Change the configuration of the environment.
virtual Ptr< TcpSocketMsgBase > CreateReceiverSocket(Ptr< Node > node)
Create and install the socket to install on the receiver.
Ptr< TcpSocketState > GetTcb(SocketWho who)
Get the TCB from selected socket.
General infrastructure for TCP testing.
#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.
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
void FinalChecks()
Performs the (eventual) final checks through test asserts.
@ UNIT
This test suite implements a Unit Test.
EventId GetPersistentEvent(SocketWho who)
Get the persistent event of the selected socket.
Time Seconds(double value)
Construct a Time in the indicated unit.
Testing the congestion avoidance increment on TCP ZeroWindow.
static TcpZeroWindowTestSuite g_tcpZeroWindowTestSuite
Static variable for test initialization.
Hold an unsigned integer type.
virtual void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
TcpZeroWindowTest(const std::string &desc)
Constructor.
bool m_senderFinished
Send finished.
TCP ZeroWindow TestSuite.
void NormalClose(SocketWho who)
Socket closed normally.
virtual void ConfigureProperties()
Change the configuration of the socket properties.
bool m_receiverFinished
Receiver finished.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.
EventId m_receivePktEvent
Receive packet event.