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-tahoe.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_TAHOE_H
22
#define TCP_TAHOE_H
23
24
#include "
tcp-socket-base.h
"
25
26
namespace
ns3 {
27
42
class
TcpTahoe
:
public
TcpSocketBase
43
{
44
public
:
49
static
TypeId
GetTypeId
(
void
);
53
TcpTahoe
(
void
);
58
TcpTahoe
(
const
TcpTahoe
& sock);
59
virtual
~TcpTahoe
(
void
);
60
61
// From TcpSocketBase
62
virtual
int
Connect
(
const
Address
&
address
);
63
virtual
int
Listen
(
void
);
64
65
protected
:
66
virtual
uint32_t
Window
(
void
);
// Return the max possible number of unacked bytes
67
virtual
Ptr<TcpSocketBase>
Fork
(
void
);
// Call CopyObject<TcpTahoe> to clone me
68
virtual
void
NewAck
(
SequenceNumber32
const
& seq);
// Inc cwnd and call NewAck() of parent
69
virtual
void
DupAck
(
const
TcpHeader
& t, uint32_t count);
// Treat 3 dupack as timeout
70
virtual
void
Retransmit
(
void
);
// Retransmit time out
71
72
// Implementing ns3::TcpSocket -- Attribute get/set
73
virtual
void
SetSegSize
(uint32_t size);
74
virtual
void
SetSSThresh
(uint32_t threshold);
75
virtual
uint32_t
GetSSThresh
(
void
)
const
;
76
virtual
void
SetInitialCwnd
(uint32_t cwnd);
77
virtual
uint32_t
GetInitialCwnd
(
void
)
const
;
78
private
:
82
void
InitializeCwnd
(
void
);
83
84
protected
:
85
TracedValue<uint32_t>
m_cWnd
;
86
uint32_t
m_ssThresh
;
87
uint32_t
m_initialCWnd
;
88
uint32_t
m_retxThresh
;
89
};
90
91
}
// namespace ns3
92
93
#endif
/* TCP_TAHOE_H */
ns3::TcpTahoe::Fork
virtual Ptr< TcpSocketBase > Fork(void)
Call CopyObject<> to clone me.
Definition:
tcp-tahoe.cc:102
ns3::TcpTahoe::m_cWnd
TracedValue< uint32_t > m_cWnd
Congestion window.
Definition:
tcp-tahoe.h:85
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::TcpTahoe::SetSegSize
virtual void SetSegSize(uint32_t size)
Set the segment size.
Definition:
tcp-tahoe.cc:169
ns3::TcpTahoe::m_retxThresh
uint32_t m_retxThresh
Fast Retransmit threshold.
Definition:
tcp-tahoe.h:88
ns3::TcpTahoe::Window
virtual uint32_t Window(void)
Return the max possible number of unacked bytes.
Definition:
tcp-tahoe.cc:95
ns3::TcpTahoe::GetInitialCwnd
virtual uint32_t GetInitialCwnd(void) const
Get the initial Congestion Window.
Definition:
tcp-tahoe.cc:195
ns3::TracedValue< uint32_t >
ns3::TcpTahoe::m_ssThresh
uint32_t m_ssThresh
Slow Start Threshold.
Definition:
tcp-tahoe.h:86
ns3::TcpTahoe
An implementation of a stream socket using TCP.
Definition:
tcp-tahoe.h:42
ns3::Address
a polymophic address class
Definition:
address.h:86
ns3::TcpTahoe::SetInitialCwnd
virtual void SetInitialCwnd(uint32_t cwnd)
Set the initial Congestion Window.
Definition:
tcp-tahoe.cc:188
ns3::TcpTahoe::Listen
virtual int Listen(void)
Listen for incoming connections.
Definition:
tcp-tahoe.cc:77
ns3::TcpTahoe::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-tahoe.cc:39
ns3::TcpSocketBase
A base class for implementation of a stream socket using TCP.
Definition:
tcp-socket-base.h:62
ns3::TcpTahoe::~TcpTahoe
virtual ~TcpTahoe(void)
Definition:
tcp-tahoe.cc:71
ns3::TcpTahoe::m_initialCWnd
uint32_t m_initialCWnd
Initial cWnd value.
Definition:
tcp-tahoe.h:87
ns3::TcpTahoe::Retransmit
virtual void Retransmit(void)
Halving cwnd and call DoRetransmit()
Definition:
tcp-tahoe.cc:152
ns3::SequenceNumber< uint32_t, int32_t >
ns3::TcpHeader
Header for the Transmission Control Protocol.
Definition:
tcp-header.h:43
ns3::TcpTahoe::DupAck
virtual void DupAck(const TcpHeader &t, uint32_t count)
Received dupack (duplicate ACK)
Definition:
tcp-tahoe.cc:133
tcp-socket-base.h
ns3::TcpTahoe::GetSSThresh
virtual uint32_t GetSSThresh(void) const
Get the Slow Start Threshold.
Definition:
tcp-tahoe.cc:182
ns3::TcpTahoe::NewAck
virtual void NewAck(SequenceNumber32 const &seq)
Update buffers w.r.t.
Definition:
tcp-tahoe.cc:109
ns3::TcpTahoe::TcpTahoe
TcpTahoe(void)
Create an unbound tcp socket.
Definition:
tcp-tahoe.cc:55
ns3::TcpTahoe::InitializeCwnd
void InitializeCwnd(void)
Set the congestion window when connection starts.
Definition:
tcp-tahoe.cc:201
ns3::TcpTahoe::Connect
virtual int Connect(const Address &address)
Initiate a connection to a remote host.
Definition:
tcp-tahoe.cc:86
first.address
tuple address
Definition:
first.py:37
ns3::TcpTahoe::SetSSThresh
virtual void SetSSThresh(uint32_t threshold)
Set the Slow Start Threshold.
Definition:
tcp-tahoe.cc:176
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
src
internet
model
tcp-tahoe.h
Generated on Sat Apr 19 2014 14:06:57 for ns-3 by
1.8.6