A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
tcp-prr-recovery.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_PRR_RECOVERY_H
24
#define TCP_PRR_RECOVERY_H
25
26
#include "ns3/tcp-recovery-ops.h"
27
28
namespace
ns3
{
29
42
class
TcpPrrRecovery
:
public
TcpClassicRecovery
43
{
44
public
:
49
static
TypeId
GetTypeId
(
void
);
50
54
TcpPrrRecovery
(
void
);
55
60
TcpPrrRecovery
(
const
TcpPrrRecovery
& sock);
61
62
virtual
~TcpPrrRecovery
(
void
)
override
;
63
67
typedef
enum
68
{
69
CRB
,
70
SSRB
71
}
ReductionBound_t
;
72
73
std::string
GetName
()
const override
;
74
75
virtual
void
EnterRecovery
(
Ptr<TcpSocketState>
tcb, uint32_t dupAckCount,
76
uint32_t unAckDataCount, uint32_t deliveredBytes)
override
;
77
78
virtual
void
DoRecovery
(
Ptr<TcpSocketState>
tcb, uint32_t deliveredBytes)
override
;
79
80
virtual
void
ExitRecovery
(
Ptr<TcpSocketState>
tcb)
override
;
81
82
virtual
void
UpdateBytesSent
(uint32_t bytesSent)
override
;
83
84
virtual
Ptr<TcpRecoveryOps>
Fork
()
override
;
85
86
private
:
87
uint32_t
m_prrDelivered
{0};
88
uint32_t
m_prrOut
{0};
89
uint32_t
m_recoveryFlightSize
{0};
90
ReductionBound_t
m_reductionBoundMode
{
SSRB
};
91
};
92
}
// namespace ns3
93
94
#endif
/* TCP_PRR_RECOVERY_H */
ns3::Ptr< TcpSocketState >
ns3::TcpClassicRecovery
The Classic recovery implementation.
Definition:
tcp-recovery-ops.h:159
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:90
ns3::TcpPrrRecovery::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-prr-recovery.cc:72
ns3::TcpPrrRecovery::~TcpPrrRecovery
virtual ~TcpPrrRecovery(void) override
Definition:
tcp-prr-recovery.cc:66
ns3::TcpPrrRecovery::UpdateBytesSent
virtual void UpdateBytesSent(uint32_t bytesSent) override
Keeps track of bytes sent during recovery phase.
Definition:
tcp-prr-recovery.cc:131
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
virtual void ExitRecovery(Ptr< TcpSocketState > tcb) override
Performs cwnd adjustments at the end of recovery.
Definition:
tcp-prr-recovery.cc:124
ns3::TcpPrrRecovery::GetName
std::string GetName() const override
Get the name of the recovery algorithm.
Definition:
tcp-prr-recovery.cc:144
ns3::TcpPrrRecovery::m_prrOut
uint32_t m_prrOut
total bytes sent during recovery phase
Definition:
tcp-prr-recovery.h:88
ns3::TcpPrrRecovery::m_prrDelivered
uint32_t m_prrDelivered
total bytes delivered during recovery phase
Definition:
tcp-prr-recovery.h:87
ns3::TcpPrrRecovery::TcpPrrRecovery
TcpPrrRecovery(void)
Create an unbound tcp socket.
Definition:
tcp-prr-recovery.cc:50
ns3::TcpPrrRecovery::Fork
virtual Ptr< TcpRecoveryOps > Fork() override
Copy the recovery algorithm across socket.
Definition:
tcp-prr-recovery.cc:138
ns3::TcpPrrRecovery::DoRecovery
virtual void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes) override
Performs recovery based on the recovery algorithm.
Definition:
tcp-prr-recovery.cc:86
ns3::TcpPrrRecovery::m_recoveryFlightSize
uint32_t m_recoveryFlightSize
value of bytesInFlight at the start of recovery phase
Definition:
tcp-prr-recovery.h:89
ns3::TcpPrrRecovery::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-prr-recovery.cc:35
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.
src
internet
model
tcp-prr-recovery.h
Generated on Tue Feb 6 2024 19:21:20 for ns-3 by
1.9.1