A Discrete-Event Network Simulator
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
16namespace 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 */
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 */
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
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 */
Smart pointer class similar to boost::intrusive_ptr.
The Classic recovery implementation.
An implementation of PRR.
void EnterRecovery(Ptr< TcpSocketState > tcb, uint32_t dupAckCount, uint32_t unAckDataCount, uint32_t deliveredBytes) override
Performs variable initialization at the start of recovery.
static TypeId GetTypeId()
Get the type ID.
void UpdateBytesSent(uint32_t bytesSent) override
Keeps track of bytes sent during recovery phase.
void DoRecovery(Ptr< TcpSocketState > tcb, uint32_t deliveredBytes, bool isDupAck) override
Performs recovery based on the recovery algorithm.
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
TcpPrrRecovery()
Create an unbound tcp socket.
uint32_t m_prrDelivered
total bytes delivered during recovery phase
Ptr< TcpRecoveryOps > Fork() override
Copy the recovery algorithm across socket.
uint32_t m_recoveryFlightSize
value of bytesInFlight at the start of recovery phase
a unique identifier for an interface.
Definition type-id.h:48
Every class exported by the ns3 library is enclosed in the ns3 namespace.