65 std::vector<uint32_t> &toDrop)
67 m_realBytesInFlight (0),
68 m_guessedBytesInFlight (0),
71 m_greatestSeqSent (0),
90 for (std::vector<uint32_t>::iterator it =
m_toDrop.begin (); it !=
m_toDrop.end (); ++it)
165 NS_LOG_DEBUG (
"Dupack received, Update m_guessedBytesInFlight to " <<
198 "Guessed and measured bytes in flight differs");
205 "Still present bytes in flight at the end of the transmission");
215 std::vector<uint32_t> toDrop;
218 toDrop.push_back (4001);
221 toDrop.push_back (4001);
225 toDrop.push_back (4501);
Smart pointer class similar to boost::intrusive_ptr.
uint32_t GetSegSize(SocketWho who)
Get the segment size of the node specified.
#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.
TcpBytesInFlightTest(const std::string &desc, std::vector< uint32_t > &toDrop)
This test suite implements a Unit Test.
uint32_t m_realBytesInFlight
void AddTestCase(TestCase *testCase, enum TestDuration duration)
Add an individual child TestCase to this test suite.
virtual void Rx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet received from IP layer.
#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 FinalChecks()
Performs the (eventual) final checks through test asserts.
uint32_t m_guessedBytesInFlight
SequenceNumber32 m_lastAckRecv
SequenceNumber32 m_greatestSeqSent
TcpBytesInFlightTestSuite()
Callback< R > MakeCallback(R(T::*memPtr)(void), OBJ objPtr)
Check the value of BytesInFlight against a home-made guess.
virtual void BytesInFlightTrace(uint32_t oldValue, uint32_t newValue)
Bytes in flight changes.
void PktDropped(const Ipv4Header &ipH, const TcpHeader &tcpH, Ptr< const Packet > p)
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TcpBytesInFlightTestSuite g_tcpBytesInFlightTestSuite
void SetAppPktCount(uint32_t pktCount)
Set app packet count.
std::vector< uint32_t > m_toDrop
SocketWho
Used as parameter of methods, specifies on what node the caller is interested (e.g.
General infrastructure for TCP testing.
virtual void ConfigureEnvironment(void)
Change the configuration of the evironment.
#define NS_LOG_DEBUG(msg)
Use NS_LOG to output a message of level LOG_DEBUG.
Time Seconds(double value)
Construct a Time in the indicated unit.
virtual void Tx(const Ptr< const Packet > p, const TcpHeader &h, SocketWho who)
Packet transmitted down to IP layer.
void ConfigureEnvironment()
Change the configuration of the evironment.
virtual Ptr< ErrorModel > CreateReceiverErrorModel()
Create and return the error model to install in the receiver node.
SequenceNumber< uint32_t, int32_t > SequenceNumber32
32 bit Sequence number.
void SetPropagationDelay(Time propDelay)
Propagation delay of the bottleneck link.