A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
tcp-recovery-ops.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 NITK Surathkal
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Viyom Mittal <viyommittal@gmail.com>
18
* Vivek Jain <jain.vivek.anand@gmail.com>
19
* Mohit P. Tahiliani <tahiliani@nitk.edu.in>
20
*
21
*/
22
#ifndef TCP_RECOVERY_OPS_H
23
#define TCP_RECOVERY_OPS_H
24
25
#include "ns3/object.h"
26
27
namespace
ns3
28
{
29
30
class
TcpSocketState;
31
60
class
TcpRecoveryOps
:
public
Object
61
{
62
public
:
67
static
TypeId
GetTypeId
();
68
72
TcpRecoveryOps
();
73
78
TcpRecoveryOps
(
const
TcpRecoveryOps
& other);
79
83
~TcpRecoveryOps
()
override
;
84
90
virtual
std::string
GetName
()
const
= 0;
91
102
virtual
void
EnterRecovery
(
Ptr<TcpSocketState>
tcb,
103
uint32_t
dupAckCount,
104
uint32_t
unAckDataCount,
105
uint32_t
deliveredBytes) = 0;
106
117
virtual
void
DoRecovery
(
Ptr<TcpSocketState>
tcb,
uint32_t
deliveredBytes) = 0;
118
126
virtual
void
ExitRecovery
(
Ptr<TcpSocketState>
tcb) = 0;
127
136
virtual
void
UpdateBytesSent
(
uint32_t
bytesSent);
137
143
virtual
Ptr<TcpRecoveryOps>
Fork
() = 0;
144
};
145
160
class
TcpClassicRecovery
:
public
TcpRecoveryOps
161
{
162
public
:
167
static
TypeId
GetTypeId
();
168
172
TcpClassicRecovery
();
173
178
TcpClassicRecovery
(
const
TcpClassicRecovery
& recovery);
179
183
~TcpClassicRecovery
()
override
;
184
185
std::string
GetName
()
const override
;
186
187
void
EnterRecovery
(
Ptr<TcpSocketState>
tcb,
188
uint32_t
dupAckCount,
189
uint32_t
unAckDataCount,
190
uint32_t
deliveredBytes)
override
;
191
192
void
DoRecovery
(
Ptr<TcpSocketState>
tcb,
uint32_t
deliveredBytes)
override
;
193
194
void
ExitRecovery
(
Ptr<TcpSocketState>
tcb)
override
;
195
196
Ptr<TcpRecoveryOps>
Fork
()
override
;
197
};
198
199
}
// namespace ns3
200
201
#endif
/* TCP_RECOVERY_OPS_H */
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::Ptr< TcpSocketState >
ns3::TcpClassicRecovery
The Classic recovery implementation.
Definition:
tcp-recovery-ops.h:161
ns3::TcpClassicRecovery::Fork
Ptr< TcpRecoveryOps > Fork() override
Copy the recovery algorithm across socket.
Definition:
tcp-recovery-ops.cc:133
ns3::TcpClassicRecovery::EnterRecovery
void EnterRecovery(Ptr< TcpSocketState > tcb, uint32_t dupAckCount, uint32_t unAckDataCount, uint32_t deliveredBytes) override
Performs variable initialization at the start of recovery.
Definition:
tcp-recovery-ops.cc:97
ns3::TcpClassicRecovery::DoRecovery
void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes) override
Performs recovery based on the recovery algorithm.
Definition:
tcp-recovery-ops.cc:108
ns3::TcpClassicRecovery::ExitRecovery
void ExitRecovery(Ptr< TcpSocketState > tcb) override
Performs cwnd adjustments at the end of recovery.
Definition:
tcp-recovery-ops.cc:115
ns3::TcpClassicRecovery::GetName
std::string GetName() const override
Get the name of the recovery algorithm.
Definition:
tcp-recovery-ops.cc:127
ns3::TcpClassicRecovery::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
tcp-recovery-ops.cc:70
ns3::TcpClassicRecovery::TcpClassicRecovery
TcpClassicRecovery()
Constructor.
Definition:
tcp-recovery-ops.cc:79
ns3::TcpClassicRecovery::~TcpClassicRecovery
~TcpClassicRecovery() override
Constructor.
Definition:
tcp-recovery-ops.cc:91
ns3::TcpRecoveryOps
recovery abstract class
Definition:
tcp-recovery-ops.h:61
ns3::TcpRecoveryOps::EnterRecovery
virtual void EnterRecovery(Ptr< TcpSocketState > tcb, uint32_t dupAckCount, uint32_t unAckDataCount, uint32_t deliveredBytes)=0
Performs variable initialization at the start of recovery.
ns3::TcpRecoveryOps::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
tcp-recovery-ops.cc:36
ns3::TcpRecoveryOps::UpdateBytesSent
virtual void UpdateBytesSent(uint32_t bytesSent)
Keeps track of bytes sent during recovery phase.
Definition:
tcp-recovery-ops.cc:60
ns3::TcpRecoveryOps::GetName
virtual std::string GetName() const =0
Get the name of the recovery algorithm.
ns3::TcpRecoveryOps::TcpRecoveryOps
TcpRecoveryOps()
Constructor.
Definition:
tcp-recovery-ops.cc:42
ns3::TcpRecoveryOps::~TcpRecoveryOps
~TcpRecoveryOps() override
Deconstructor.
Definition:
tcp-recovery-ops.cc:54
ns3::TcpRecoveryOps::DoRecovery
virtual void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes)=0
Performs recovery based on the recovery algorithm.
ns3::TcpRecoveryOps::ExitRecovery
virtual void ExitRecovery(Ptr< TcpSocketState > tcb)=0
Performs cwnd adjustments at the end of recovery.
ns3::TcpRecoveryOps::Fork
virtual Ptr< TcpRecoveryOps > Fork()=0
Copy the recovery algorithm across socket.
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
tcp-recovery-ops.h
Generated on Fri Mar 17 2023 12:35:43 for ns-3 by
1.9.3