A Discrete-Event Network Simulator
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
28namespace ns3 {
29
43{
44public:
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 {
70 SSRB
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
86private:
91};
92} // namespace ns3
93
94#endif /* TCP_PRR_RECOVERY_H */
The Classic recovery implementation.
An implementation of PRR.
ReductionBound_t m_reductionBoundMode
mode of Reduction Bound to be used
virtual void EnterRecovery(Ptr< TcpSocketState > tcb, uint32_t dupAckCount, uint32_t unAckDataCount, uint32_t deliveredBytes) override
Performs variable initialization at the start of recovery.
virtual ~TcpPrrRecovery(void) override
virtual void UpdateBytesSent(uint32_t bytesSent) override
Keeps track of bytes sent during recovery phase.
ReductionBound_t
Reduction Bound variant (CRB or SSRB)
@ CRB
Conservative Reduction Bound.
@ SSRB
Slow Start Reduction Bound.
virtual void ExitRecovery(Ptr< TcpSocketState > tcb) override
Performs cwnd adjustments at the end of recovery.
std::string GetName() const override
Get the name of the recovery algorithm.
uint32_t m_prrOut
total bytes sent during recovery phase
uint32_t m_prrDelivered
total bytes delivered during recovery phase
TcpPrrRecovery(void)
Create an unbound tcp socket.
virtual Ptr< TcpRecoveryOps > Fork() override
Copy the recovery algorithm across socket.
virtual void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes) override
Performs recovery based on the recovery algorithm.
uint32_t m_recoveryFlightSize
value of bytesInFlight at the start of recovery phase
static TypeId GetTypeId(void)
Get the type ID.
a unique identifier for an interface.
Definition: type-id.h:59
Every class exported by the ns3 library is enclosed in the ns3 namespace.