A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
tcp-lp.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2016 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
* Authors: Charitha Sangaraju <charitha29193@gmail.com>
19
* Nandita G <gm.nandita@gmail.com>
20
* Mohit P. Tahiliani <tahiliani@nitk.edu.in>
21
*
22
*/
23
24
#ifndef TCPLP_H
25
#define TCPLP_H
26
27
#include "
tcp-congestion-ops.h
"
28
29
#include "ns3/traced-value.h"
30
31
namespace
ns3
{
32
33
class
TcpSocketState;
34
40
class
TcpLp
:
public
TcpNewReno
41
{
42
public
:
48
static
TypeId
GetTypeId
(
void
);
49
54
TcpLp
(
void
);
55
61
TcpLp
(
const
TcpLp
& sock);
62
63
virtual
~TcpLp
(
void
);
64
75
virtual
void
PktsAcked
(
Ptr<TcpSocketState>
tcb, uint32_t segmentsAcked,
76
const
Time
& rtt);
77
78
virtual
std::string
GetName
()
const
;
79
80
virtual
Ptr<TcpCongestionOps>
Fork
();
81
82
protected
:
89
virtual
void
CongestionAvoidance
(
Ptr<TcpSocketState>
tcb, uint32_t segmentsAcked);
90
91
private
:
96
enum
State
97
{
98
LP_VALID_OWD
= (1 << 1),
99
LP_WITHIN_THR
= (1 << 3),
100
LP_WITHIN_INF
= (1 << 4),
101
};
102
103
uint32_t
m_flag
;
104
uint32_t
m_sOwd
;
105
uint32_t
m_owdMin
;
106
uint32_t
m_owdMax
;
107
uint32_t
m_owdMaxRsv
;
108
Time
m_lastDrop
;
109
Time
m_inference
;
110
111
private
:
118
uint32_t
OwdCalculator
(
Ptr<TcpSocketState>
tcb);
119
125
void
RttSample
(
Ptr<TcpSocketState>
tcb);
126
};
127
128
}
// namespace ns3
129
130
#endif
// TCPLP_H
ns3::Ptr< TcpSocketState >
ns3::TcpLp
TCP-LP (Low Priority) congestion control algorithm.
Definition:
tcp-lp.h:41
ns3::TcpLp::m_inference
Time m_inference
Current inference period.
Definition:
tcp-lp.h:109
ns3::TcpLp::m_flag
uint32_t m_flag
TcpLp state flag.
Definition:
tcp-lp.h:103
ns3::TcpLp::m_owdMax
uint32_t m_owdMax
Maximum One-Way Delay.
Definition:
tcp-lp.h:106
ns3::TcpLp::Fork
virtual Ptr< TcpCongestionOps > Fork()
Copy the congestion control algorithm across sockets.
Definition:
tcp-lp.cc:77
ns3::TcpLp::RttSample
void RttSample(Ptr< TcpSocketState > tcb)
Estimates minimum and maximum One-Way Delays and calculates the smoothed One-Way Delay.
Definition:
tcp-lp.cc:118
ns3::TcpLp::m_owdMaxRsv
uint32_t m_owdMaxRsv
Reserved Maximum One-Way Delay.
Definition:
tcp-lp.h:107
ns3::TcpLp::~TcpLp
virtual ~TcpLp(void)
Definition:
tcp-lp.cc:71
ns3::TcpLp::CongestionAvoidance
virtual void CongestionAvoidance(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked)
Invokes Congestion Avoidance of TcpNewReno if TcpLp is not within inference.
Definition:
tcp-lp.cc:83
ns3::TcpLp::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-lp.cc:35
ns3::TcpLp::m_owdMin
uint32_t m_owdMin
Minimum One-Way Delay.
Definition:
tcp-lp.h:105
ns3::TcpLp::State
State
Describes the state of TcpLp.
Definition:
tcp-lp.h:97
ns3::TcpLp::LP_WITHIN_INF
@ LP_WITHIN_INF
TcpLp is within Inference.
Definition:
tcp-lp.h:100
ns3::TcpLp::LP_VALID_OWD
@ LP_VALID_OWD
Calculated One-Way Delay is valid.
Definition:
tcp-lp.h:98
ns3::TcpLp::LP_WITHIN_THR
@ LP_WITHIN_THR
TcpLp is within Threshold.
Definition:
tcp-lp.h:99
ns3::TcpLp::OwdCalculator
uint32_t OwdCalculator(Ptr< TcpSocketState > tcb)
Calculates One-Way Delay using Sender and Receiver timestamps.
Definition:
tcp-lp.cc:94
ns3::TcpLp::TcpLp
TcpLp(void)
Creates an unbound tcp socket.
Definition:
tcp-lp.cc:45
ns3::TcpLp::PktsAcked
virtual void PktsAcked(Ptr< TcpSocketState > tcb, uint32_t segmentsAcked, const Time &rtt)
Timing information on received ACK.
Definition:
tcp-lp.cc:168
ns3::TcpLp::m_lastDrop
Time m_lastDrop
Last time when cwnd was reduced.
Definition:
tcp-lp.h:108
ns3::TcpLp::m_sOwd
uint32_t m_sOwd
Smoothed One-Way Delay.
Definition:
tcp-lp.h:104
ns3::TcpLp::GetName
virtual std::string GetName() const
Get the name of the congestion control algorithm.
Definition:
tcp-lp.cc:234
ns3::TcpNewReno
The NewReno implementation.
Definition:
tcp-congestion-ops.h:215
ns3::Time
Simulation virtual time values and global simulation resolution.
Definition:
nstime.h:103
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-congestion-ops.h
src
internet
model
tcp-lp.h
Generated on Tue Feb 6 2024 19:21:20 for ns-3 by
1.9.1