author | Tommaso Pecorella <tommaso.pecorella@unifi.it> |
Fri, 24 Jul 2015 08:59:57 +0200 | |
changeset 11542 | 457d8732ca24 |
parent 10440 | 1e48ff9185f1 |
permissions | -rw-r--r-- |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
1 |
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
2 |
// |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
3 |
// Copyright (c) 2006 Georgia Tech Research Corporation |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
4 |
// |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
5 |
// This program is free software; you can redistribute it and/or modify |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
6 |
// it under the terms of the GNU General Public License version 2 as |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
7 |
// published by the Free Software Foundation; |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
8 |
// |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
9 |
// This program is distributed in the hope that it will be useful, |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
10 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
11 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
12 |
// GNU General Public License for more details. |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
13 |
// |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
14 |
// You should have received a copy of the GNU General Public License |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
15 |
// along with this program; if not, write to the Free Software |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
16 |
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
17 |
// |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
18 |
// Author: Rajib Bhattacharjea<raj.b@gatech.edu> |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
19 |
// |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
20 |
|
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
21 |
// Georgia Tech Network Simulator - Data Descriptors |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
22 |
// George F. Riley. Georgia Tech, Spring 2002 |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
23 |
|
7353
09fccf6195ea
bug 1203: Inconsistently named ifndef/define macros in ns-3 headers
Vedran Miletic <rivanvx@gmail.com>
parents:
7252
diff
changeset
|
24 |
#ifndef PENDING_DATA_H |
09fccf6195ea
bug 1203: Inconsistently named ifndef/define macros in ns-3 headers
Vedran Miletic <rivanvx@gmail.com>
parents:
7252
diff
changeset
|
25 |
#define PENDING_DATA_H |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
26 |
|
3249
a7203cfb5f37
Tcp tx buffer (pendingdata) uses Ptr<Packet> internally; tagging should work
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
2834
diff
changeset
|
27 |
#include "ns3/packet.h" |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
28 |
#include "pending-data.h" |
6434
ac8b4bf77e50
Bug 385 - Add a generic "sequence number" class.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6163
diff
changeset
|
29 |
#include "ns3/sequence-number.h" |
2354
ba9d1cad1a7c
Fix memory leaks in PendingData class by returning Ptr<Packet> instead of PendingData* where appropriate
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
2224
diff
changeset
|
30 |
|
ba9d1cad1a7c
Fix memory leaks in PendingData class by returning Ptr<Packet> instead of PendingData* where appropriate
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
2224
diff
changeset
|
31 |
#include "ns3/ptr.h" |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
32 |
namespace ns3 |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
33 |
{ |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
34 |
class Packet; |
3266
1ae7df5cf87b
Update the internet-stack documentation
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
3260
diff
changeset
|
35 |
|
3691 | 36 |
/** |
37 |
* \ingroup tcp |
|
38 |
* |
|
39 |
* \brief class for managing I/O between applications and TCP |
|
40 |
*/ |
|
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
41 |
class PendingData { |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
42 |
public: |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
43 |
PendingData (); |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
44 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
45 |
* Constructor |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
46 |
* \param s size |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
47 |
* \param d data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
48 |
* \param msg message size |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
49 |
* \param resp response size |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
50 |
*/ |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
51 |
PendingData (uint32_t s, uint8_t* d = NULL, uint32_t msg = 0, uint32_t resp = 0); |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
52 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
53 |
* Constructor from string |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
54 |
* \param s string |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
55 |
*/ |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
56 |
PendingData (const std::string& s); // Construct from string |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
57 |
|
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
58 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
59 |
* Copy constructor |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
60 |
* \param o object to copy |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
61 |
*/ |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
62 |
PendingData (const PendingData& o); // Copy constructor |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
63 |
virtual ~PendingData (); // Destructor |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
64 |
|
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
65 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
66 |
* Returns the size of the pending data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
67 |
* \returns size of pending data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
68 |
*/ |
7252
c8200621e252
rerun check-style.py with uncrustify-0.58
Tom Henderson <tomh@tomh.org>
parents:
7176
diff
changeset
|
69 |
uint32_t Size () const { return size; } |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
70 |
|
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
71 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
72 |
* \brief Remove all associated data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
73 |
*/ |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
74 |
virtual void Clear (); |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
75 |
|
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
76 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
77 |
* \brief Add some data to end |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
78 |
* \param s the data size. |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
79 |
* \param d the data to store. |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
80 |
*/ |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
81 |
virtual void Add (uint32_t s, const uint8_t* d = 0); // |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
82 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
83 |
* \brief Add some data to end |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
84 |
* \param p packet containing the data. |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
85 |
*/ |
3250
464a2a2690e8
Update tcpsocket to use Ptr<Packet> in Send
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
3249
diff
changeset
|
86 |
virtual void Add (Ptr<Packet> p); |
6161 | 87 |
/** |
88 |
* This method returns the number of bytes in the PendingData buffer |
|
89 |
* beyond the sequence number specified by seqOffset. |
|
90 |
* |
|
91 |
* The variables seqFront and seqOffset correspond to a sequence number |
|
92 |
* space in use by the user. What is significant in this method is the |
|
93 |
* difference between them; i.e. the quantity (seqOffset - seqFront). |
|
94 |
* This difference is subtracted from Size(), yielding the number of |
|
95 |
* bytes beyond seqOffset, from the user perspective, in the PendingData |
|
96 |
* buffer. |
|
97 |
* |
|
98 |
* If the first number specified is not a sequence number that corresponds |
|
99 |
* to the first data byte in the PendingData buffer, the computation |
|
100 |
* returned will be in error. |
|
101 |
* |
|
102 |
* \return number of bytes |
|
103 |
* \param seqFront sequence number of assumed first byte in the PendingData |
|
104 |
* \param seqOffset sequence number of offset |
|
105 |
*/ |
|
6434
ac8b4bf77e50
Bug 385 - Add a generic "sequence number" class.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6163
diff
changeset
|
106 |
virtual uint32_t SizeFromSeq (const SequenceNumber32& seqFront, const SequenceNumber32& seqOffset); |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
107 |
// Inquire available data from offset |
6161 | 108 |
/** |
109 |
* \return number of bytes in the data buffer beyond the offset specified |
|
110 |
* \param offset offset (from zero) |
|
111 |
*/ |
|
112 |
virtual uint32_t SizeFromOffset (uint32_t offset); |
|
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
113 |
// Available size from sequence difference |
6161 | 114 |
/** |
115 |
* Subtracts seqFront from seqOffset after enforcing seqFront is less |
|
116 |
* than seqOffset |
|
117 |
* |
|
118 |
* \param seqFront sequence number to be subtracted from seqOffset |
|
119 |
* \param seqOffset higher sequence number |
|
120 |
* \return seqOffset-seqFront |
|
121 |
*/ |
|
6434
ac8b4bf77e50
Bug 385 - Add a generic "sequence number" class.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6163
diff
changeset
|
122 |
virtual uint32_t OffsetFromSeq (const SequenceNumber32& seqFront, const SequenceNumber32& seqOffset); |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
123 |
|
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
124 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
125 |
* \brief Copy data starting from a give offset |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
126 |
* \param s size of data to copy |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
127 |
* \param o offset |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
128 |
* \returns a packet containing the requested data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
129 |
*/ |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
130 |
virtual Ptr<Packet> CopyFromOffset (uint32_t s, uint32_t o); // Size, offset, ret packet |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
131 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
132 |
* \brief Copy data starting from a give offset |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
133 |
* \param s size of data to copy |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
134 |
* \param f Front sequence |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
135 |
* \param o Offset sequence |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
136 |
* |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
137 |
* \see PendingData::OffsetFromSeq() |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
138 |
* \returns a packet containing the requested data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
139 |
*/ |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
140 |
virtual Ptr<Packet> CopyFromSeq (uint32_t s, const SequenceNumber32& f, const SequenceNumber32& o); |
6163
cdabef59da08
Bug 829 - TCP unbound memory problem (pending data)
Josh Pelkey <jpelkey@gatech.edu>
parents:
6161
diff
changeset
|
141 |
/** |
cdabef59da08
Bug 829 - TCP unbound memory problem (pending data)
Josh Pelkey <jpelkey@gatech.edu>
parents:
6161
diff
changeset
|
142 |
* Permits object to clear any pending data between seqFront and |
cdabef59da08
Bug 829 - TCP unbound memory problem (pending data)
Josh Pelkey <jpelkey@gatech.edu>
parents:
6161
diff
changeset
|
143 |
* seqOffset - 1). Callers should check the return value to determine |
cdabef59da08
Bug 829 - TCP unbound memory problem (pending data)
Josh Pelkey <jpelkey@gatech.edu>
parents:
6161
diff
changeset
|
144 |
* whether any data was removed from the front. |
cdabef59da08
Bug 829 - TCP unbound memory problem (pending data)
Josh Pelkey <jpelkey@gatech.edu>
parents:
6161
diff
changeset
|
145 |
* |
cdabef59da08
Bug 829 - TCP unbound memory problem (pending data)
Josh Pelkey <jpelkey@gatech.edu>
parents:
6161
diff
changeset
|
146 |
* \param seqFront sequence number to start to try to remove from |
cdabef59da08
Bug 829 - TCP unbound memory problem (pending data)
Josh Pelkey <jpelkey@gatech.edu>
parents:
6161
diff
changeset
|
147 |
* \param seqOffset first sequence number in buffer that should be retained |
cdabef59da08
Bug 829 - TCP unbound memory problem (pending data)
Josh Pelkey <jpelkey@gatech.edu>
parents:
6161
diff
changeset
|
148 |
* \return number of bytes from the front that were removed from the buffer |
cdabef59da08
Bug 829 - TCP unbound memory problem (pending data)
Josh Pelkey <jpelkey@gatech.edu>
parents:
6161
diff
changeset
|
149 |
*/ |
6434
ac8b4bf77e50
Bug 385 - Add a generic "sequence number" class.
Gustavo J. A. M. Carneiro <gjc@inescporto.pt>
parents:
6163
diff
changeset
|
150 |
virtual uint32_t RemoveToSeq (const SequenceNumber32& seqFront, const SequenceNumber32& seqOffset); |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
151 |
|
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
152 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
153 |
* \brief Create a copy of self |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
154 |
* \returns copy of pending data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
155 |
*/ |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
156 |
PendingData* Copy () const; |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
157 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
158 |
* \brief Create a copy of self with new size |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
159 |
* |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
160 |
* Assumes no associated data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
161 |
* \param s new size |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
162 |
* \returns copy of pending data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
163 |
*/ |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
164 |
PendingData* CopyS (uint32_t s); // Copy |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
165 |
/** |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
166 |
* \brief Create a copy of self with new size, new data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
167 |
* |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
168 |
* Assumes no associated data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
169 |
* \param s new size |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
170 |
* \param d new data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
171 |
* \returns copy of pending data |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
172 |
*/ |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
173 |
PendingData* CopySD (uint32_t s, uint8_t* d); |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
174 |
public: |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
175 |
uint32_t size; //!< Number of data bytes |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
176 |
std::vector<Ptr<Packet> > data; //!< Corresponding data (may be null) |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
177 |
// The next two fields allow simulated applications to exchange some info |
10440
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
178 |
uint32_t msgSize; //!< Total size of message |
1e48ff9185f1
Bug 938 - missing Doxygen in ns-3 (internet model + helper)
Tommaso Pecorella <tommaso.pecorella@unifi.it>
parents:
7353
diff
changeset
|
179 |
uint32_t responseSize; //!< Size of response requested |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
180 |
}; |
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
181 |
|
7176
9f2663992e99
internet coding style changes
Josh Pelkey <jpelkey@gatech.edu>
parents:
6834
diff
changeset
|
182 |
} //namepsace ns3 |
2224
6f97d21a99c2
Added in ns-3-tcp (second try)
Raj Bhattacharjea <raj.b@gatech.edu>
parents:
diff
changeset
|
183 |
|
7353
09fccf6195ea
bug 1203: Inconsistently named ifndef/define macros in ns-3 headers
Vedran Miletic <rivanvx@gmail.com>
parents:
7252
diff
changeset
|
184 |
#endif /* PENDING_DATA_H */ |