A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
tcp-recovery-ops.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2018 NITK Surathkal
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Author: Viyom Mittal <viyommittal@gmail.com>
19
* Vivek Jain <jain.vivek.anand@gmail.com>
20
* Mohit P. Tahiliani <tahiliani@nitk.edu.in>
21
*
22
*/
23
#ifndef TCP_RECOVERY_OPS_H
24
#define TCP_RECOVERY_OPS_H
25
26
#include "ns3/object.h"
27
28
namespace
ns3
{
29
30
class
TcpSocketState;
31
60
class
TcpRecoveryOps
:
public
Object
61
{
62
public
:
67
static
TypeId
GetTypeId
(
void
);
68
72
TcpRecoveryOps
();
73
78
TcpRecoveryOps
(
const
TcpRecoveryOps
&other);
79
83
virtual
~TcpRecoveryOps
();
84
90
virtual
std::string
GetName
()
const
= 0;
91
102
virtual
void
EnterRecovery
(
Ptr<TcpSocketState>
tcb, uint32_t dupAckCount,
103
uint32_t unAckDataCount, uint32_t deliveredBytes) = 0;
104
115
virtual
void
DoRecovery
(
Ptr<TcpSocketState>
tcb, uint32_t deliveredBytes) = 0;
116
124
virtual
void
ExitRecovery
(
Ptr<TcpSocketState>
tcb) = 0;
125
134
virtual
void
UpdateBytesSent
(uint32_t bytesSent);
135
141
virtual
Ptr<TcpRecoveryOps>
Fork
() = 0;
142
};
143
158
class
TcpClassicRecovery
:
public
TcpRecoveryOps
159
{
160
public
:
165
static
TypeId
GetTypeId
(
void
);
166
170
TcpClassicRecovery
();
171
176
TcpClassicRecovery
(
const
TcpClassicRecovery
& recovery);
177
181
virtual
~TcpClassicRecovery
()
override
;
182
183
virtual
std::string
GetName
()
const override
;
184
185
virtual
void
EnterRecovery
(
Ptr<TcpSocketState>
tcb, uint32_t dupAckCount,
186
uint32_t unAckDataCount, uint32_t deliveredBytes)
override
;
187
188
virtual
void
DoRecovery
(
Ptr<TcpSocketState>
tcb, uint32_t deliveredBytes)
override
;
189
190
virtual
void
ExitRecovery
(
Ptr<TcpSocketState>
tcb)
override
;
191
192
virtual
Ptr<TcpRecoveryOps>
Fork
()
override
;
193
};
194
195
}
// namespace ns3
196
197
#endif
/* TCP_RECOVERY_OPS_H */
ns3::TcpClassicRecovery::~TcpClassicRecovery
virtual ~TcpClassicRecovery() override
Constructor.
Definition:
tcp-recovery-ops.cc:91
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::TcpRecoveryOps::ExitRecovery
virtual void ExitRecovery(Ptr< TcpSocketState > tcb)=0
Performs cwnd adjustments at the end of recovery.
ns3::TcpClassicRecovery::TcpClassicRecovery
TcpClassicRecovery()
Constructor.
Definition:
tcp-recovery-ops.cc:80
ns3::TcpRecoveryOps::GetName
virtual std::string GetName() const =0
Get the name of the recovery algorithm.
ns3::TcpRecoveryOps::UpdateBytesSent
virtual void UpdateBytesSent(uint32_t bytesSent)
Keeps track of bytes sent during recovery phase.
Definition:
tcp-recovery-ops.cc:60
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::TcpClassicRecovery::EnterRecovery
virtual 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::TcpRecoveryOps::Fork
virtual Ptr< TcpRecoveryOps > Fork()=0
Copy the recovery algorithm across socket.
ns3::TcpRecoveryOps::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-recovery-ops.cc:35
ns3::Ptr< TcpSocketState >
ns3::TcpRecoveryOps::DoRecovery
virtual void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes)=0
Performs recovery based on the recovery algorithm.
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:88
ns3::TcpClassicRecovery::GetName
virtual std::string GetName() const override
Get the name of the recovery algorithm.
Definition:
tcp-recovery-ops.cc:128
ns3::TcpRecoveryOps::~TcpRecoveryOps
virtual ~TcpRecoveryOps()
Deconstructor.
Definition:
tcp-recovery-ops.cc:54
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::TcpClassicRecovery
The Classic recovery implementation.
Definition:
tcp-recovery-ops.h:159
ns3::TcpClassicRecovery::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-recovery-ops.cc:70
ns3::TcpClassicRecovery::ExitRecovery
virtual void ExitRecovery(Ptr< TcpSocketState > tcb) override
Performs cwnd adjustments at the end of recovery.
Definition:
tcp-recovery-ops.cc:116
ns3::TcpRecoveryOps::TcpRecoveryOps
TcpRecoveryOps()
Constructor.
Definition:
tcp-recovery-ops.cc:44
ns3::TcpClassicRecovery::DoRecovery
virtual void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes) override
Performs recovery based on the recovery algorithm.
Definition:
tcp-recovery-ops.cc:108
ns3::TcpClassicRecovery::Fork
virtual Ptr< TcpRecoveryOps > Fork() override
Copy the recovery algorithm across socket.
Definition:
tcp-recovery-ops.cc:134
ns3::TcpRecoveryOps
recovery abstract class
Definition:
tcp-recovery-ops.h:61
src
internet
model
tcp-recovery-ops.h
Generated on Fri Oct 1 2021 17:03:10 for ns-3 by
1.8.20