A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
tcp-prr-recovery.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_PRR_RECOVERY_H
23
#define TCP_PRR_RECOVERY_H
24
25
#include "
tcp-recovery-ops.h
"
26
27
namespace
ns3
28
{
29
42
class
TcpPrrRecovery
:
public
TcpClassicRecovery
43
{
44
public
:
49
static
TypeId
GetTypeId
();
50
54
TcpPrrRecovery
();
55
60
TcpPrrRecovery
(
const
TcpPrrRecovery
& sock);
61
62
~TcpPrrRecovery
()
override
;
63
67
enum
ReductionBound_t
68
{
69
CRB
,
70
SSRB
71
};
72
73
std::string
GetName
()
const override
;
74
75
void
EnterRecovery
(
Ptr<TcpSocketState>
tcb,
76
uint32_t dupAckCount,
77
uint32_t unAckDataCount,
78
uint32_t deliveredBytes)
override
;
79
80
void
DoRecovery
(
Ptr<TcpSocketState>
tcb, uint32_t deliveredBytes)
override
;
81
82
void
ExitRecovery
(
Ptr<TcpSocketState>
tcb)
override
;
83
84
void
UpdateBytesSent
(uint32_t bytesSent)
override
;
85
86
Ptr<TcpRecoveryOps>
Fork
()
override
;
87
88
private
:
89
uint32_t
m_prrDelivered
{0};
90
uint32_t
m_prrOut
{0};
91
uint32_t
m_recoveryFlightSize
{0};
92
ReductionBound_t
m_reductionBoundMode
{
SSRB
};
93
};
94
}
// namespace ns3
95
96
#endif
/* TCP_PRR_RECOVERY_H */
ns3::Ptr< TcpSocketState >
ns3::TcpClassicRecovery
The Classic recovery implementation.
Definition:
tcp-recovery-ops.h:161
ns3::TcpPrrRecovery
An implementation of PRR.
Definition:
tcp-prr-recovery.h:43
ns3::TcpPrrRecovery::m_reductionBoundMode
ReductionBound_t m_reductionBoundMode
mode of Reduction Bound to be used
Definition:
tcp-prr-recovery.h:92
ns3::TcpPrrRecovery::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-prr-recovery.cc:73
ns3::TcpPrrRecovery::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
tcp-prr-recovery.cc:36
ns3::TcpPrrRecovery::UpdateBytesSent
void UpdateBytesSent(uint32_t bytesSent) override
Keeps track of bytes sent during recovery phase.
Definition:
tcp-prr-recovery.cc:134
ns3::TcpPrrRecovery::ReductionBound_t
ReductionBound_t
Reduction Bound variant (CRB or SSRB)
Definition:
tcp-prr-recovery.h:68
ns3::TcpPrrRecovery::CRB
@ CRB
Conservative Reduction Bound.
Definition:
tcp-prr-recovery.h:69
ns3::TcpPrrRecovery::SSRB
@ SSRB
Slow Start Reduction Bound.
Definition:
tcp-prr-recovery.h:70
ns3::TcpPrrRecovery::ExitRecovery
void ExitRecovery(Ptr< TcpSocketState > tcb) override
Performs cwnd adjustments at the end of recovery.
Definition:
tcp-prr-recovery.cc:127
ns3::TcpPrrRecovery::GetName
std::string GetName() const override
Get the name of the recovery algorithm.
Definition:
tcp-prr-recovery.cc:147
ns3::TcpPrrRecovery::m_prrOut
uint32_t m_prrOut
total bytes sent during recovery phase
Definition:
tcp-prr-recovery.h:90
ns3::TcpPrrRecovery::~TcpPrrRecovery
~TcpPrrRecovery() override
Definition:
tcp-prr-recovery.cc:67
ns3::TcpPrrRecovery::TcpPrrRecovery
TcpPrrRecovery()
Create an unbound tcp socket.
Definition:
tcp-prr-recovery.cc:51
ns3::TcpPrrRecovery::m_prrDelivered
uint32_t m_prrDelivered
total bytes delivered during recovery phase
Definition:
tcp-prr-recovery.h:89
ns3::TcpPrrRecovery::Fork
Ptr< TcpRecoveryOps > Fork() override
Copy the recovery algorithm across socket.
Definition:
tcp-prr-recovery.cc:141
ns3::TcpPrrRecovery::DoRecovery
void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes) override
Performs recovery based on the recovery algorithm.
Definition:
tcp-prr-recovery.cc:88
ns3::TcpPrrRecovery::m_recoveryFlightSize
uint32_t m_recoveryFlightSize
value of bytesInFlight at the start of recovery phase
Definition:
tcp-prr-recovery.h:91
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
tcp-recovery-ops.h
src
internet
model
tcp-prr-recovery.h
Generated on Sun Mar 3 2024 17:10:59 for ns-3 by
1.9.1