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-socket.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2006 Georgia Tech Research Corporation
4
* 2007 INRIA
5
*
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2 as
8
* published by the Free Software Foundation;
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
*
19
* Authors: George F. Riley<riley@ece.gatech.edu>
20
* Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
21
*/
22
23
#ifndef TCP_SOCKET_H
24
#define TCP_SOCKET_H
25
26
#include "ns3/socket.h"
27
#include "ns3/traced-callback.h"
28
#include "ns3/callback.h"
29
#include "ns3/ptr.h"
30
#include "ns3/object.h"
31
#include "ns3/nstime.h"
32
33
namespace
ns3 {
34
35
class
Node;
36
class
Packet;
37
38
/* Names of the 11 TCP states */
39
typedef
enum
{
40
CLOSED
,
// 0
41
LISTEN
,
// 1
42
SYN_SENT
,
// 2
43
SYN_RCVD
,
// 3
44
ESTABLISHED
,
// 4
45
CLOSE_WAIT
,
// 5
46
LAST_ACK
,
// 6
47
FIN_WAIT_1
,
// 7
48
FIN_WAIT_2
,
// 8
49
CLOSING
,
// 9
50
TIME_WAIT
,
// 10
51
LAST_STATE
52
}
TcpStates_t
;
53
62
class
TcpSocket
:
public
Socket
63
{
64
public
:
65
static
TypeId
GetTypeId
(
void
);
66
67
TcpSocket
(
void
);
68
virtual
~TcpSocket
(
void
);
69
70
// Literal names of TCP states for use in log messages */
71
static
const
char
*
const
TcpStateName
[
LAST_STATE
];
72
73
private
:
74
// Indirect the attribute setting and getting through private virtual methods
75
virtual
void
SetSndBufSize
(uint32_t size) = 0;
76
virtual
uint32_t
GetSndBufSize
(
void
)
const
= 0;
77
virtual
void
SetRcvBufSize
(uint32_t size) = 0;
78
virtual
uint32_t
GetRcvBufSize
(
void
)
const
= 0;
79
virtual
void
SetSegSize
(uint32_t size) = 0;
80
virtual
uint32_t
GetSegSize
(
void
)
const
= 0;
81
virtual
void
SetSSThresh
(uint32_t threshold) = 0;
82
virtual
uint32_t
GetSSThresh
(
void
)
const
= 0;
83
virtual
void
SetInitialCwnd
(uint32_t count) = 0;
84
virtual
uint32_t
GetInitialCwnd
(
void
)
const
= 0;
85
virtual
void
SetConnTimeout
(
Time
timeout
) = 0;
86
virtual
Time
GetConnTimeout
(
void
)
const
= 0;
87
virtual
void
SetConnCount
(uint32_t count) = 0;
88
virtual
uint32_t
GetConnCount
(
void
)
const
= 0;
89
virtual
void
SetDelAckTimeout
(
Time
timeout
) = 0;
90
virtual
Time
GetDelAckTimeout
(
void
)
const
= 0;
91
virtual
void
SetDelAckMaxCount
(uint32_t count) = 0;
92
virtual
uint32_t
GetDelAckMaxCount
(
void
)
const
= 0;
93
virtual
void
SetTcpNoDelay
(
bool
noDelay) = 0;
94
virtual
bool
GetTcpNoDelay
(
void
)
const
= 0;
95
virtual
void
SetPersistTimeout
(
Time
timeout
) = 0;
96
virtual
Time
GetPersistTimeout
(
void
)
const
= 0;
97
98
};
99
100
}
// namespace ns3
101
102
#endif
/* TCP_SOCKET_H */
103
104
ns3::TcpSocket::SetSndBufSize
virtual void SetSndBufSize(uint32_t size)=0
ns3::Time
keep track of time values and allow control of global simulation resolution
Definition:
nstime.h:81
ns3::TcpSocket
(abstract) base class of all TcpSockets
Definition:
tcp-socket.h:62
ns3::CLOSING
Definition:
tcp-socket.h:49
ns3::TcpSocket::SetSSThresh
virtual void SetSSThresh(uint32_t threshold)=0
ns3::TcpSocket::~TcpSocket
virtual ~TcpSocket(void)
Definition:
tcp-socket.cc:117
ns3::CLOSE_WAIT
Definition:
tcp-socket.h:45
ns3::TcpSocket::SetRcvBufSize
virtual void SetRcvBufSize(uint32_t size)=0
timeout
ns3::Time timeout
Definition:
openflow-switch.cc:52
ns3::FIN_WAIT_2
Definition:
tcp-socket.h:48
ns3::TcpSocket::SetPersistTimeout
virtual void SetPersistTimeout(Time timeout)=0
ns3::Socket
A low-level Socket API based loosely on the BSD Socket API.A few things to keep in mind about this ty...
Definition:
socket.h:66
ns3::TcpSocket::GetTypeId
static TypeId GetTypeId(void)
Definition:
tcp-socket.cc:39
ns3::TcpSocket::TcpStateName
static const char *const TcpStateName[LAST_STATE]
Definition:
tcp-socket.h:71
ns3::TcpStates_t
TcpStates_t
Definition:
tcp-socket.h:39
ns3::TcpSocket::GetSndBufSize
virtual uint32_t GetSndBufSize(void) const =0
ns3::TcpSocket::SetDelAckMaxCount
virtual void SetDelAckMaxCount(uint32_t count)=0
ns3::TcpSocket::SetTcpNoDelay
virtual void SetTcpNoDelay(bool noDelay)=0
ns3::TcpSocket::GetSSThresh
virtual uint32_t GetSSThresh(void) const =0
ns3::ESTABLISHED
Definition:
tcp-socket.h:44
ns3::TcpSocket::GetRcvBufSize
virtual uint32_t GetRcvBufSize(void) const =0
ns3::SYN_SENT
Definition:
tcp-socket.h:42
ns3::TcpSocket::SetDelAckTimeout
virtual void SetDelAckTimeout(Time timeout)=0
ns3::TcpSocket::SetConnCount
virtual void SetConnCount(uint32_t count)=0
ns3::TcpSocket::GetSegSize
virtual uint32_t GetSegSize(void) const =0
ns3::TcpSocket::GetDelAckTimeout
virtual Time GetDelAckTimeout(void) const =0
ns3::TcpSocket::GetTcpNoDelay
virtual bool GetTcpNoDelay(void) const =0
ns3::TcpSocket::SetInitialCwnd
virtual void SetInitialCwnd(uint32_t count)=0
ns3::TcpSocket::SetConnTimeout
virtual void SetConnTimeout(Time timeout)=0
ns3::TIME_WAIT
Definition:
tcp-socket.h:50
ns3::TcpSocket::GetDelAckMaxCount
virtual uint32_t GetDelAckMaxCount(void) const =0
ns3::TcpSocket::GetConnTimeout
virtual Time GetConnTimeout(void) const =0
ns3::TcpSocket::TcpSocket
TcpSocket(void)
Definition:
tcp-socket.cc:112
ns3::FIN_WAIT_1
Definition:
tcp-socket.h:47
ns3::LAST_STATE
Definition:
tcp-socket.h:51
ns3::LISTEN
Definition:
tcp-socket.h:41
ns3::TcpSocket::SetSegSize
virtual void SetSegSize(uint32_t size)=0
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
ns3::TcpSocket::GetInitialCwnd
virtual uint32_t GetInitialCwnd(void) const =0
ns3::TcpSocket::GetPersistTimeout
virtual Time GetPersistTimeout(void) const =0
ns3::SYN_RCVD
Definition:
tcp-socket.h:43
ns3::CLOSED
Definition:
tcp-socket.h:40
ns3::TcpSocket::GetConnCount
virtual uint32_t GetConnCount(void) const =0
ns3::LAST_ACK
Definition:
tcp-socket.h:46
src
internet
model
tcp-socket.h
Generated on Sat Nov 16 2013 16:17:42 for ns-3 by
1.8.5