A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
tcp-prr-recovery.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018 NITK Surathkal
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Viyom Mittal <viyommittal@gmail.com>
7
* Vivek Jain <jain.vivek.anand@gmail.com>
8
* Mohit P. Tahiliani <tahiliani@nitk.edu.in>
9
*
10
*/
11
#ifndef TCP_PRR_RECOVERY_H
12
#define TCP_PRR_RECOVERY_H
13
14
#include "
tcp-recovery-ops.h
"
15
16
namespace
ns3
17
{
18
19
/**
20
* \ingroup recoveryOps
21
*
22
* \brief An implementation of PRR
23
*
24
* PRR is an algorithm that determines TCP's sending rate in fast
25
* recovery. PRR avoids excessive window reductions and aims for
26
* the actual congestion window size at the end of recovery to be as
27
* close as possible to the window determined by the congestion control
28
* algorithm. PRR also improves accuracy of the amount of data sent
29
* during loss recovery.
30
*/
31
class
TcpPrrRecovery
:
public
TcpClassicRecovery
32
{
33
public
:
34
/**
35
* \brief Get the type ID.
36
* \return the object TypeId
37
*/
38
static
TypeId
GetTypeId
();
39
40
/**
41
* Create an unbound tcp socket.
42
*/
43
TcpPrrRecovery
();
44
45
/**
46
* \brief Copy constructor
47
* \param sock the object to copy
48
*/
49
TcpPrrRecovery
(
const
TcpPrrRecovery
& sock);
50
51
~TcpPrrRecovery
()
override
;
52
53
std::string
GetName
()
const override
;
54
55
void
EnterRecovery
(
Ptr<TcpSocketState>
tcb,
56
uint32_t
dupAckCount,
57
uint32_t
unAckDataCount,
58
uint32_t
deliveredBytes)
override
;
59
60
void
DoRecovery
(
Ptr<TcpSocketState>
tcb,
uint32_t
deliveredBytes,
bool
isDupAck)
override
;
61
62
void
ExitRecovery
(
Ptr<TcpSocketState>
tcb)
override
;
63
64
void
UpdateBytesSent
(
uint32_t
bytesSent)
override
;
65
66
Ptr<TcpRecoveryOps>
Fork
()
override
;
67
68
private
:
69
uint32_t
m_prrDelivered
{0};
//!< total bytes delivered during recovery phase
70
uint32_t
m_prrOut
{0};
//!< total bytes sent during recovery phase
71
uint32_t
m_recoveryFlightSize
{0};
//!< value of bytesInFlight at the start of recovery phase
72
};
73
}
// namespace ns3
74
75
#endif
/* TCP_PRR_RECOVERY_H */
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3::TcpClassicRecovery
The Classic recovery implementation.
Definition
tcp-recovery-ops.h:152
ns3::TcpPrrRecovery
An implementation of PRR.
Definition
tcp-prr-recovery.h:32
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:55
ns3::TcpPrrRecovery::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition
tcp-prr-recovery.cc:25
ns3::TcpPrrRecovery::UpdateBytesSent
void UpdateBytesSent(uint32_t bytesSent) override
Keeps track of bytes sent during recovery phase.
Definition
tcp-prr-recovery.cc:125
ns3::TcpPrrRecovery::DoRecovery
void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes, bool isDupAck) override
Performs recovery based on the recovery algorithm.
Definition
tcp-prr-recovery.cc:70
ns3::TcpPrrRecovery::ExitRecovery
void ExitRecovery(Ptr< TcpSocketState > tcb) override
Performs cwnd adjustments at the end of recovery.
Definition
tcp-prr-recovery.cc:118
ns3::TcpPrrRecovery::GetName
std::string GetName() const override
Get the name of the recovery algorithm.
Definition
tcp-prr-recovery.cc:138
ns3::TcpPrrRecovery::m_prrOut
uint32_t m_prrOut
total bytes sent during recovery phase
Definition
tcp-prr-recovery.h:70
ns3::TcpPrrRecovery::~TcpPrrRecovery
~TcpPrrRecovery() override
Definition
tcp-prr-recovery.cc:49
ns3::TcpPrrRecovery::TcpPrrRecovery
TcpPrrRecovery()
Create an unbound tcp socket.
Definition
tcp-prr-recovery.cc:34
ns3::TcpPrrRecovery::m_prrDelivered
uint32_t m_prrDelivered
total bytes delivered during recovery phase
Definition
tcp-prr-recovery.h:69
ns3::TcpPrrRecovery::Fork
Ptr< TcpRecoveryOps > Fork() override
Copy the recovery algorithm across socket.
Definition
tcp-prr-recovery.cc:132
ns3::TcpPrrRecovery::m_recoveryFlightSize
uint32_t m_recoveryFlightSize
value of bytesInFlight at the start of recovery phase
Definition
tcp-prr-recovery.h:71
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
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 Fri Nov 8 2024 13:59:01 for ns-3 by
1.11.0