24 #include "ns3/config.h" 75 :
TcpGeneralTest (
"Testing connection closing with retransmissions")
TcpCloseWithLossTestCase(bool sackEnabled)
Constructor.
Ptr< ErrorModel > CreateReceiverErrorModel()
Create and return the error model to install in the receiver node.
bool m_sendClose
true when the sender has closed
Smart pointer class similar to boost::intrusive_ptr.
void SetSegmentSize(SocketWho who, uint32_t segmentSize)
Forcefully set the segment size.
AttributeValue implementation for Boolean.
uint32_t GetSize(void) const
Returns the the size in bytes of the packet (including the zero-filled initial payload).
Ptr< TcpSocketMsgBase > GetSenderSocket()
Get the pointer to a previously created sender socket.
static TcpTcpCloseTestSuite g_tcpTcpCloseTestSuite
Static variable for test initialization.
void SetDropCallback(Callback< void, const Ipv4Header &, const TcpHeader &, Ptr< const Packet > > cb)
Set the drop callback.
#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.
void SetAppPktSize(uint32_t pktSize)
Set app packet size.
void PktDropped(const Ipv4Header &ipH, const TcpHeader &tcpH, Ptr< const Packet > pkt)
Called when a packet is dropped.
#define NS_LOG_INFO(msg)
Use NS_LOG to output a message of level LOG_INFO.
virtual void ConfigureProperties(void)
Change the configuration of the socket properties.
void FinalChecks()
Performs the (eventual) final checks through test asserts.
void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
Check if the TCP correctly close the connection after receiving previously lost data.
void AddTestCase(TestCase *testCase, TestDuration duration=QUICK)
Add an individual child TestCase to this test suite.
void SetMTU(uint32_t mtu)
MTU of the bottleneck link.
#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.
bool m_synReceived
true when the receiver gets SYN
Ptr< TcpSeqErrorModel > m_errorModel
The error model.
virtual void NormalClose(SocketWho who)
Socket closed normally.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
void AddSeqToKill(const SequenceNumber32 &seq)
Add the sequence number to the list of segments to be killed.
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
void SetAppPktInterval(Time pktInterval)
Interval between app-generated packet.
Check if the TCP is correctly closing its state.
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
General infrastructure for TCP testing.
Ptr< TcpSocketMsgBase > GetReceiverSocket()
Get the pointer to a previously created receiver socket.
void SetInitialCwnd(SocketWho who, uint32_t initialCwnd)
Forcefully set the initial cwnd.
virtual void ConfigureProperties()
Change the configuration of the socket properties.
This test suite implements a Unit Test.
bool m_recvClose
true when the receiver has closed
Callback< R, Ts... > MakeCallback(R(T::*memPtr)(Ts...), OBJ objPtr)
Build Callbacks for class method members which take varying numbers of arguments and potentially retu...
bool m_sackEnabled
true if sack should be enabled