Index: src/internet/model/tcp-rx-buffer.h |
=================================================================== |
--- a/src/internet/model/tcp-rx-buffer.h |
+++ b/src/internet/model/tcp-rx-buffer.h |
@@ -29,6 +29,9 @@ |
#include "ns3/tcp-header.h" |
namespace ns3 { |
+ |
+typedef std::list<std::pair<SequenceNumber32, SequenceNumber32> > List; |
+ |
class Packet; |
/** |
@@ -104,7 +107,7 @@ |
bool Finished (void); |
/** |
- * Insert a packet into the buffer and update the availBytes counter to |
+ * \brief Insert a packet into the buffer and update the availBytes counter to |
* reflect the number of bytes ready to send to the application. This |
* function handles overlap by triming the head of the inputted packet and |
* removing data from the buffer that overlaps the tail of the inputted |
@@ -117,7 +120,16 @@ |
bool Add (Ptr<Packet> p, TcpHeader const& tcph); |
/** |
- * Extract data from the head of the buffer as indicated by nextRxSeq. |
+ * \brief Find all isolated blocks of data in the buffer following m_nextRxSeq, |
+ * merge all consecutive blocks, and then store the blocks after merging |
+ * in a list |
+ * |
+ * \param list the list of isolated blocks of data |
+ */ |
+ void GetIsolatedDataChunks (List& list); |
+ |
+ /** |
+ * \brief Extract data from the head of the buffer as indicated by nextRxSeq. |
* The extracted data is going to be forwarded to the application. |
* |
* \param maxSize maximum number of bytes to extract |