A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
tcp-reno.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2010 Adrian Sai-wah Tam
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: Adrian Sai-wah Tam <adrian.sw.tam@gmail.com>
19
*/
20
21
#ifndef TCP_RENO_H
22
#define TCP_RENO_H
23
24
#include "
tcp-socket-base.h
"
25
26
namespace
ns3 {
27
38
class
TcpReno
:
public
TcpSocketBase
39
{
40
public
:
45
static
TypeId
GetTypeId
(
void
);
49
TcpReno
(
void
);
54
TcpReno
(
const
TcpReno
& sock);
55
virtual
~TcpReno
(
void
);
56
57
// From TcpSocketBase
58
virtual
int
Connect
(
const
Address
&
address
);
59
virtual
int
Listen
(
void
);
60
61
protected
:
62
virtual
uint32_t
Window
(
void
);
// Return the max possible number of unacked bytes
63
virtual
Ptr<TcpSocketBase>
Fork
(
void
);
// Call CopyObject<TcpReno> to clone me
64
virtual
void
NewAck
(
const
SequenceNumber32
& seq);
// Inc cwnd and call NewAck() of parent
65
virtual
void
DupAck
(
const
TcpHeader
& t, uint32_t count);
// Fast retransmit
66
virtual
void
Retransmit
(
void
);
// Retransmit timeout
67
68
// Implementing ns3::TcpSocket -- Attribute get/set
69
virtual
void
SetSegSize
(uint32_t size);
70
virtual
void
SetSSThresh
(uint32_t threshold);
71
virtual
uint32_t
GetSSThresh
(
void
)
const
;
72
virtual
void
SetInitialCwnd
(uint32_t cwnd);
73
virtual
uint32_t
GetInitialCwnd
(
void
)
const
;
74
private
:
78
void
InitializeCwnd
(
void
);
79
80
protected
:
81
TracedValue<uint32_t>
m_cWnd
;
82
uint32_t
m_ssThresh
;
83
uint32_t
m_initialCWnd
;
84
uint32_t
m_retxThresh
;
85
bool
m_inFastRec
;
86
};
87
88
}
// namespace ns3
89
90
#endif
/* TCP_RENO_H */
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::TcpReno::m_cWnd
TracedValue< uint32_t > m_cWnd
Congestion window.
Definition:
tcp-reno.h:81
ns3::TcpReno::Retransmit
virtual void Retransmit(void)
Halving cwnd and call DoRetransmit()
Definition:
tcp-reno.cc:167
ns3::TcpReno::SetSegSize
virtual void SetSegSize(uint32_t size)
Set the segment size.
Definition:
tcp-reno.cc:191
ns3::TcpReno::Fork
virtual Ptr< TcpSocketBase > Fork(void)
Call CopyObject<> to clone me.
Definition:
tcp-reno.cc:103
ns3::TcpReno::m_initialCWnd
uint32_t m_initialCWnd
Initial cWnd value.
Definition:
tcp-reno.h:83
ns3::TcpReno::Listen
virtual int Listen(void)
Listen for incoming connections.
Definition:
tcp-reno.cc:78
ns3::TcpReno::NewAck
virtual void NewAck(const SequenceNumber32 &seq)
Update buffers w.r.t.
Definition:
tcp-reno.cc:110
ns3::TracedValue< uint32_t >
ns3::TcpReno::SetInitialCwnd
virtual void SetInitialCwnd(uint32_t cwnd)
Set the initial Congestion Window.
Definition:
tcp-reno.cc:210
ns3::Address
a polymophic address class
Definition:
address.h:86
ns3::TcpReno
An implementation of a stream socket using TCP.
Definition:
tcp-reno.h:38
ns3::TcpReno::Connect
virtual int Connect(const Address &address)
Initiate a connection to a remote host.
Definition:
tcp-reno.cc:87
ns3::TcpReno::m_inFastRec
bool m_inFastRec
currently in fast recovery
Definition:
tcp-reno.h:85
ns3::TcpReno::DupAck
virtual void DupAck(const TcpHeader &t, uint32_t count)
Received dupack (duplicate ACK)
Definition:
tcp-reno.cc:147
ns3::TcpSocketBase
A base class for implementation of a stream socket using TCP.
Definition:
tcp-socket-base.h:62
ns3::TcpReno::~TcpReno
virtual ~TcpReno(void)
Definition:
tcp-reno.cc:72
ns3::TcpReno::SetSSThresh
virtual void SetSSThresh(uint32_t threshold)
Set the Slow Start Threshold.
Definition:
tcp-reno.cc:198
ns3::SequenceNumber< uint32_t, int32_t >
ns3::TcpHeader
Header for the Transmission Control Protocol.
Definition:
tcp-header.h:43
ns3::TcpReno::GetInitialCwnd
virtual uint32_t GetInitialCwnd(void) const
Get the initial Congestion Window.
Definition:
tcp-reno.cc:217
ns3::TcpReno::m_retxThresh
uint32_t m_retxThresh
Fast Retransmit threshold.
Definition:
tcp-reno.h:84
ns3::TcpReno::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-reno.cc:39
tcp-socket-base.h
ns3::TcpReno::GetSSThresh
virtual uint32_t GetSSThresh(void) const
Get the Slow Start Threshold.
Definition:
tcp-reno.cc:204
ns3::TcpReno::m_ssThresh
uint32_t m_ssThresh
Slow Start Threshold.
Definition:
tcp-reno.h:82
first.address
tuple address
Definition:
first.py:37
ns3::TcpReno::TcpReno
TcpReno(void)
Create an unbound tcp socket.
Definition:
tcp-reno.cc:55
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::TcpReno::Window
virtual uint32_t Window(void)
Return the max possible number of unacked bytes.
Definition:
tcp-reno.cc:96
ns3::TcpReno::InitializeCwnd
void InitializeCwnd(void)
Set the congestion window when connection starts.
Definition:
tcp-reno.cc:223
src
internet
model
tcp-reno.h
Generated on Sat Apr 19 2014 14:06:57 for ns-3 by
1.8.6