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-rfc793.cc
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
#include "
tcp-rfc793.h
"
22
#include "ns3/log.h"
23
24
NS_LOG_COMPONENT_DEFINE
(
"TcpRfc793"
);
25
26
namespace
ns3 {
27
28
NS_OBJECT_ENSURE_REGISTERED
(TcpRfc793)
29
;
30
31
TypeId
32
TcpRfc793::GetTypeId
(
void
)
33
{
34
static
TypeId
tid =
TypeId
(
"ns3::TcpRfc793"
)
35
.
SetParent
<
TcpSocketBase
> ()
36
.AddConstructor<TcpRfc793> ()
37
;
38
return
tid;
39
}
40
41
TcpRfc793::TcpRfc793
(
void
)
42
{
43
NS_LOG_FUNCTION
(
this
);
44
SetDelAckMaxCount
(0);
// Delayed ACK is not in RFC793
45
}
46
47
TcpRfc793::TcpRfc793
(
const
TcpRfc793
& sock) :
TcpSocketBase
(sock)
48
{
49
}
50
51
TcpRfc793::~TcpRfc793
(
void
)
52
{
53
}
54
55
Ptr<TcpSocketBase>
56
TcpRfc793::Fork
(
void
)
57
{
58
return
CopyObject<TcpRfc793> (
this
);
59
}
60
61
void
62
TcpRfc793::DupAck
(
const
TcpHeader
& t, uint32_t count)
63
{
64
}
65
66
void
67
TcpRfc793::SetSSThresh
(uint32_t threshold)
68
{
69
NS_LOG_WARN
(
"DoD TCP does not perform slow start"
);
70
}
71
72
uint32_t
73
TcpRfc793::GetSSThresh
(
void
)
const
74
{
75
NS_LOG_WARN
(
"DoD TCP does not perform slow start"
);
76
return
0;
77
}
78
79
void
80
TcpRfc793::SetInitialCwnd
(uint32_t cwnd)
81
{
82
NS_LOG_WARN
(
"DoD TCP does not have congestion window"
);
83
}
84
85
uint32_t
86
TcpRfc793::GetInitialCwnd
(
void
)
const
87
{
88
NS_LOG_WARN
(
"DoD TCP does not have congestion window"
);
89
return
0;
90
}
91
92
}
// namespace ns3
ns3::TcpRfc793::SetSSThresh
virtual void SetSSThresh(uint32_t threshold)
Set the Slow Start Threshold.
Definition:
tcp-rfc793.cc:67
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
NS_LOG_FUNCTION
#define NS_LOG_FUNCTION(parameters)
Definition:
log.h:345
ns3::NS_OBJECT_ENSURE_REGISTERED
NS_OBJECT_ENSURE_REGISTERED(NullMessageSimulatorImpl)
ns3::TcpRfc793::GetTypeId
static TypeId GetTypeId(void)
Get the type ID.
Definition:
tcp-rfc793.cc:32
tcp-rfc793.h
ns3::TcpRfc793::GetInitialCwnd
virtual uint32_t GetInitialCwnd(void) const
Get the initial Congestion Window.
Definition:
tcp-rfc793.cc:86
ns3::TcpRfc793
An implementation of a stream socket using TCP.
Definition:
tcp-rfc793.h:39
ns3::TcpRfc793::GetSSThresh
virtual uint32_t GetSSThresh(void) const
Get the Slow Start Threshold.
Definition:
tcp-rfc793.cc:73
ns3::TcpRfc793::~TcpRfc793
virtual ~TcpRfc793(void)
Definition:
tcp-rfc793.cc:51
ns3::TcpRfc793::DupAck
virtual void DupAck(const TcpHeader &t, uint32_t count)
Received dupack (duplicate ACK)
Definition:
tcp-rfc793.cc:62
ns3::TcpSocketBase
A base class for implementation of a stream socket using TCP.
Definition:
tcp-socket-base.h:62
ns3::TcpSocketBase::SetDelAckMaxCount
virtual void SetDelAckMaxCount(uint32_t count)
Set the number of packet to fire an ACK before delay timeout.
Definition:
tcp-socket-base.cc:2374
ns3::TcpHeader
Header for the Transmission Control Protocol.
Definition:
tcp-header.h:43
ns3::TcpRfc793::Fork
virtual Ptr< TcpSocketBase > Fork()
Call CopyObject<> to clone me.
Definition:
tcp-rfc793.cc:56
ns3::TcpRfc793::SetInitialCwnd
virtual void SetInitialCwnd(uint32_t cwnd)
Set the initial Congestion Window.
Definition:
tcp-rfc793.cc:80
NS_LOG_COMPONENT_DEFINE
NS_LOG_COMPONENT_DEFINE("TcpRfc793")
NS_LOG_WARN
#define NS_LOG_WARN(msg)
Definition:
log.h:280
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Definition:
type-id.cc:611
ns3::TcpRfc793::TcpRfc793
TcpRfc793(void)
Create an unbound tcp socket.
Definition:
tcp-rfc793.cc:41
src
internet
model
tcp-rfc793.cc
Generated on Sat Apr 19 2014 14:06:57 for ns-3 by
1.8.6