tcp: Documentation corrected
This commit is contained in:
@@ -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<const TcpOption> option);
|
||||
|
||||
/**
|
||||
* \brief Read the SACK option
|
||||
*
|
||||
* \param SACK option from the header
|
||||
* \param option SACK option from the header
|
||||
*/
|
||||
bool ProcessOptionSack (const Ptr<const TcpOption> option);
|
||||
|
||||
|
||||
@@ -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<const TcpOptionSack> 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<TcpTxItem*> 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,
|
||||
|
||||
@@ -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<TcpSocketMsgBase> CreateReceiverSocket (Ptr<Node> node);
|
||||
@@ -44,7 +53,7 @@ protected:
|
||||
|
||||
virtual void Tx (const Ptr<const Packet> 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<const Packet> 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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user