diff --git a/src/internet/model/tcp-socket-base.h b/src/internet/model/tcp-socket-base.h index 08a91d5b7..8f65ab594 100644 --- a/src/internet/model/tcp-socket-base.h +++ b/src/internet/model/tcp-socket-base.h @@ -1009,14 +1009,14 @@ protected: * Currently this is a placeholder, since no operations should be done * on such option. * - * \param SACK PERMITTED option from the header + * \param option SACK PERMITTED option from the header */ void ProcessOptionSackPermitted (const Ptr option); /** * \brief Read the SACK option * - * \param SACK option from the header + * \param option SACK option from the header */ bool ProcessOptionSack (const Ptr option); diff --git a/src/internet/model/tcp-tx-buffer.h b/src/internet/model/tcp-tx-buffer.h index 216f8cc9c..18179a0eb 100644 --- a/src/internet/model/tcp-tx-buffer.h +++ b/src/internet/model/tcp-tx-buffer.h @@ -233,6 +233,7 @@ public: /** * \brief Update the scoreboard * \param list list of SACKed blocks + * \returns true in case of an update */ bool Update (const TcpOptionSack::SackList &list); @@ -262,6 +263,8 @@ public: * * The routine follows the "SetPipe" function in RFC 6675 * + * \param dupThresh duplicate ACK threshold + * \param segmentSize segment size * \returns total bytes in flight */ uint32_t BytesInFlight (uint32_t dupThresh, uint32_t segmentSize) const; @@ -314,6 +317,7 @@ public: Ptr CraftSackOption (const SequenceNumber32 &seq, uint8_t available) const; private: + /** \brief operator<< used for messages */ friend std::ostream & operator<< (std::ostream & os, TcpTxBuffer const & tcpTxBuf); typedef std::list PacketList; //!< container for data stored in the buffer @@ -357,7 +361,7 @@ private: * * \param numBytes number of bytes to copy * \param seq sequence requested - * \return the item that contains the right packet + * \returns the item that contains the right packet */ TcpTxItem* GetTransmittedSegment (uint32_t numBytes, const SequenceNumber32 &seq); @@ -428,6 +432,7 @@ private: * \param startingSeq Starting sequence of the list * \param numBytes Bytes to extract, starting from requestedSeq * \param requestedSeq Requested sequence + * \param listEdited output parameter which indicates if the list has been edited * \return the item that contains the right packet */ TcpTxItem* GetPacketFromList (PacketList &list, const SequenceNumber32 &startingSeq, diff --git a/src/internet/test/tcp-sack-permitted-test.cc b/src/internet/test/tcp-sack-permitted-test.cc index ff76b34e8..308f1494d 100644 --- a/src/internet/test/tcp-sack-permitted-test.cc +++ b/src/internet/test/tcp-sack-permitted-test.cc @@ -22,13 +22,21 @@ #include "ns3/log.h" #include "ns3/tcp-option-sack-permitted.h" -namespace ns3 { +using namespace ns3; NS_LOG_COMPONENT_DEFINE ("SackPermittedTestSuite"); +/** + * \ingroup internet-test + * \ingroup tests + * + * \brief Test case for checking the SACK-PERMITTED option. + * + */ class SackPermittedTestCase : public TcpGeneralTest { public: + /** \brief Configuration of the test */ enum Configuration { DISABLED, @@ -37,6 +45,7 @@ public: ENABLED }; + /** \brief Constructor */ SackPermittedTestCase (SackPermittedTestCase::Configuration conf); protected: virtual Ptr CreateReceiverSocket (Ptr node); @@ -44,7 +53,7 @@ protected: virtual void Tx (const Ptr p, const TcpHeader&h, SocketWho who); - Configuration m_configuration; + Configuration m_configuration; //!< The configuration }; SackPermittedTestCase::SackPermittedTestCase (SackPermittedTestCase::Configuration conf) @@ -181,9 +190,16 @@ SackPermittedTestCase::Tx (const Ptr p, const TcpHeader &h, Socket } } -static class TcpSackPermittedTestSuite : public TestSuite +/** + * \ingroup internet-test + * \ingroup tests + * + * The test case for testing the TCP SACK PERMITTED option. + */ +class TcpSackPermittedTestSuite : public TestSuite { public: + /** \brief Constructor */ TcpSackPermittedTestSuite () : TestSuite ("tcp-sack-permitted", UNIT) { @@ -193,6 +209,6 @@ public: AddTestCase (new SackPermittedTestCase (SackPermittedTestCase::ENABLED), TestCase::QUICK); } -} g_tcpSackPermittedTestSuite; +}; -} // namespace ns3 +static TcpSackPermittedTestSuite g_tcpSackPermittedTestSuite; //!< Static variable for test initialization diff --git a/src/internet/test/tcp-tx-buffer-test.cc b/src/internet/test/tcp-tx-buffer-test.cc index e02666d09..83d1a6f29 100644 --- a/src/internet/test/tcp-tx-buffer-test.cc +++ b/src/internet/test/tcp-tx-buffer-test.cc @@ -25,18 +25,29 @@ using namespace ns3; NS_LOG_COMPONENT_DEFINE ("TcpTxBufferTestSuite"); +/** + * \ingroup internet-tests + * \ingroup tests + * + * \brief The TcpTxBuffer Test + */ class TcpTxBufferTestCase : public TestCase { public: + /** \brief Constructor */ TcpTxBufferTestCase (); private: virtual void DoRun (void); virtual void DoTeardown (void); + /** \brief Test the generation of an unsent block */ void TestNewBlock (); + /** \brief Test the generation of a previously sent block */ void TestTransmittedBlock (); + /** \brief Test the generation of the "next" block */ void TestNextSeg (); + /** \brief Test the scoreboard with emulated SACK */ void TestUpdateScoreboardWithCraftedSACK (); }; @@ -389,6 +400,12 @@ TcpTxBufferTestCase::DoTeardown () { } +/** + * \ingroup internet-test + * \ingroup tests + * + * \brief the TestSuite for the TcpTxBuffer test case + */ class TcpTxBufferTestSuite : public TestSuite { public: @@ -398,4 +415,5 @@ public: AddTestCase (new TcpTxBufferTestCase, TestCase::QUICK); } }; -static TcpTxBufferTestSuite g_tcpTxBufferTestSuite; + +static TcpTxBufferTestSuite g_tcpTxBufferTestSuite; //!< Static variable for test initialization