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-newreno.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_NEWRENO_H
22
#define TCP_NEWRENO_H
23
24
#include "
tcp-socket-base.h
"
25
26
namespace
ns3 {
27
36
class
TcpNewReno
:
public
TcpSocketBase
37
{
38
public
:
39
static
TypeId
GetTypeId
(
void
);
43
TcpNewReno
(
void
);
44
TcpNewReno
(
const
TcpNewReno
& sock);
45
virtual
~TcpNewReno
(
void
);
46
47
// From TcpSocketBase
48
virtual
int
Connect
(
const
Address
&
address
);
49
virtual
int
Listen
(
void
);
50
51
protected
:
52
virtual
uint32_t
Window
(
void
);
// Return the max possible number of unacked bytes
53
virtual
Ptr<TcpSocketBase>
Fork
(
void
);
// Call CopyObject<TcpNewReno> to clone me
54
virtual
void
NewAck
(
SequenceNumber32
const
& seq);
// Inc cwnd and call NewAck() of parent
55
virtual
void
DupAck
(
const
TcpHeader
& t, uint32_t count);
// Halving cwnd and reset nextTxSequence
56
virtual
void
Retransmit
(
void
);
// Exit fast recovery upon retransmit timeout
57
58
// Implementing ns3::TcpSocket -- Attribute get/set
59
virtual
void
SetSegSize
(uint32_t size);
60
virtual
void
SetSSThresh
(uint32_t threshold);
61
virtual
uint32_t
GetSSThresh
(
void
)
const
;
62
virtual
void
SetInitialCwnd
(uint32_t cwnd);
63
virtual
uint32_t
GetInitialCwnd
(
void
)
const
;
64
private
:
65
void
InitializeCwnd
(
void
);
// set m_cWnd when connection starts
66
67
protected
:
68
TracedValue<uint32_t>
m_cWnd
;
//< Congestion window
69
uint32_t
m_ssThresh
;
//< Slow Start Threshold
70
uint32_t
m_initialCWnd
;
//< Initial cWnd value
71
SequenceNumber32
m_recover
;
//< Previous highest Tx seqnum for fast recovery
72
uint32_t
m_retxThresh
;
//< Fast Retransmit threshold
73
bool
m_inFastRec
;
//< currently in fast recovery
74
bool
m_limitedTx
;
//< perform limited transmit
75
};
76
77
}
// namespace ns3
78
79
#endif
/* TCP_NEWRENO_H */
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::TcpNewReno::NewAck
virtual void NewAck(SequenceNumber32 const &seq)
Definition:
tcp-newreno.cc:117
ns3::TcpNewReno::m_limitedTx
bool m_limitedTx
Definition:
tcp-newreno.h:74
ns3::TcpNewReno::Listen
virtual int Listen(void)
Definition:
tcp-newreno.cc:85
ns3::TcpNewReno::GetInitialCwnd
virtual uint32_t GetInitialCwnd(void) const
Definition:
tcp-newreno.cc:241
ns3::TcpNewReno::Window
virtual uint32_t Window(void)
Definition:
tcp-newreno.cc:103
ns3::TcpNewReno
An implementation of a stream socket using TCP.
Definition:
tcp-newreno.h:36
ns3::TracedValue< uint32_t >
ns3::TcpNewReno::SetSegSize
virtual void SetSegSize(uint32_t size)
Definition:
tcp-newreno.cc:215
ns3::Address
a polymophic address class
Definition:
address.h:86
ns3::TcpNewReno::GetTypeId
static TypeId GetTypeId(void)
Definition:
tcp-newreno.cc:38
ns3::TcpNewReno::DupAck
virtual void DupAck(const TcpHeader &t, uint32_t count)
Definition:
tcp-newreno.cc:162
ns3::TcpNewReno::SetInitialCwnd
virtual void SetInitialCwnd(uint32_t cwnd)
Definition:
tcp-newreno.cc:234
ns3::TcpNewReno::Connect
virtual int Connect(const Address &address)
Definition:
tcp-newreno.cc:94
ns3::TcpNewReno::m_cWnd
TracedValue< uint32_t > m_cWnd
Definition:
tcp-newreno.h:68
ns3::TcpSocketBase
A base class for implementation of a stream socket using TCP.
Definition:
tcp-socket-base.h:61
ns3::TcpNewReno::InitializeCwnd
void InitializeCwnd(void)
Definition:
tcp-newreno.cc:247
ns3::TcpNewReno::m_inFastRec
bool m_inFastRec
Definition:
tcp-newreno.h:73
ns3::SequenceNumber< uint32_t, int32_t >
ns3::TcpNewReno::m_ssThresh
uint32_t m_ssThresh
Definition:
tcp-newreno.h:69
ns3::TcpNewReno::m_retxThresh
uint32_t m_retxThresh
Definition:
tcp-newreno.h:72
ns3::TcpHeader
Header for the Transmission Control Protocol.
Definition:
tcp-header.h:43
ns3::TcpNewReno::Retransmit
virtual void Retransmit(void)
Definition:
tcp-newreno.cc:191
ns3::TcpNewReno::m_initialCWnd
uint32_t m_initialCWnd
Definition:
tcp-newreno.h:70
ns3::TcpNewReno::GetSSThresh
virtual uint32_t GetSSThresh(void) const
Definition:
tcp-newreno.cc:228
tcp-socket-base.h
ns3::TcpNewReno::Fork
virtual Ptr< TcpSocketBase > Fork(void)
Definition:
tcp-newreno.cc:110
first.address
tuple address
Definition:
first.py:37
ns3::TcpNewReno::SetSSThresh
virtual void SetSSThresh(uint32_t threshold)
Definition:
tcp-newreno.cc:222
ns3::TcpNewReno::TcpNewReno
TcpNewReno(void)
Definition:
tcp-newreno.cc:58
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::TcpNewReno::m_recover
SequenceNumber32 m_recover
Definition:
tcp-newreno.h:71
ns3::TcpNewReno::~TcpNewReno
virtual ~TcpNewReno(void)
Definition:
tcp-newreno.cc:79
src
internet
model
tcp-newreno.h
Generated on Sat Nov 16 2013 12:55:29 for ns-3 by
1.8.5