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
ipv6-pmtu-cache.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2013 Universita' di Firenze
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: Tommaso Pecorella <tommaso.pecorella@unifi.it>
19
*/
20
21
#ifndef IPV6_PMTU_CACHE_H
22
#define IPV6_PMTU_CACHE_H
23
24
#include <map>
25
26
#include "ns3/object.h"
27
#include "ns3/nstime.h"
28
#include "ns3/type-id.h"
29
#include "ns3/event-id.h"
30
#include "ns3/ipv6-address.h"
31
32
namespace
ns3 {
33
46
class
Ipv6PmtuCache
:
public
Object
47
{
48
public
:
49
class
Entry;
50
55
static
TypeId
GetTypeId
();
56
60
Ipv6PmtuCache
();
61
65
~Ipv6PmtuCache
();
66
70
virtual
void
DoDispose
();
71
77
uint32_t
GetPmtu
(
Ipv6Address
dst);
78
84
void
SetPmtu
(
Ipv6Address
dst, uint32_t pmtu);
85
90
Time
GetPmtuValidityTime
()
const
;
91
97
bool
SetPmtuValidityTime
(
Time
validity);
98
99
private
:
104
void
ClearPmtu
(
Ipv6Address
dst);
105
109
std::map<Ipv6Address, uint32_t>
m_pathMtu
;
110
114
typedef
std::map<Ipv6Address, EventId> ::iterator
pathMtuTimerIter
;
115
119
std::map<Ipv6Address, EventId>
m_pathMtuTimer
;
120
124
Time
m_validityTime
;
125
};
126
127
}
128
129
#endif
/* IPV6_PMTU_CACHE_H */
ns3::Time
keep track of time values and allow control of global simulation resolution
Definition:
nstime.h:81
ns3::Ipv6PmtuCache::GetPmtu
uint32_t GetPmtu(Ipv6Address dst)
Gets the known Path MTU for the specific destination.
Definition:
ipv6-pmtu-cache.cc:63
ns3::Ipv6PmtuCache::SetPmtuValidityTime
bool SetPmtuValidityTime(Time validity)
Sets the Path MTU validity time (minimum is 5 minutes)
Definition:
ipv6-pmtu-cache.cc:94
ns3::Ipv6PmtuCache::Ipv6PmtuCache
Ipv6PmtuCache()
Constructor.
Definition:
ipv6-pmtu-cache.cc:45
ns3::Ipv6PmtuCache::m_pathMtu
std::map< Ipv6Address, uint32_t > m_pathMtu
Path MTU table.
Definition:
ipv6-pmtu-cache.h:109
ns3::Ipv6PmtuCache::DoDispose
virtual void DoDispose()
Dispose object.
Definition:
ipv6-pmtu-cache.cc:53
ns3::Ipv6PmtuCache::m_pathMtuTimer
std::map< Ipv6Address, EventId > m_pathMtuTimer
Path MTU Expiration table.
Definition:
ipv6-pmtu-cache.h:119
ns3::Ipv6PmtuCache::GetPmtuValidityTime
Time GetPmtuValidityTime() const
Gets the Path MTU validity time.
Definition:
ipv6-pmtu-cache.cc:88
ns3::Ipv6PmtuCache::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
ipv6-pmtu-cache.cc:32
ns3::Ipv6PmtuCache::~Ipv6PmtuCache
~Ipv6PmtuCache()
Destructor.
Definition:
ipv6-pmtu-cache.cc:49
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:46
ns3::Ipv6PmtuCache
This class implements the Path MTU cache, as defined by RFC 1981.
Definition:
ipv6-pmtu-cache.h:46
ns3::Ipv6PmtuCache::pathMtuTimerIter
std::map< Ipv6Address, EventId >::iterator pathMtuTimerIter
Container of the IPv6 PMTU data (Ipv6 destination address and expiration event).
Definition:
ipv6-pmtu-cache.h:114
ns3::Ipv6PmtuCache::m_validityTime
Time m_validityTime
Path MTU entry validity time.
Definition:
ipv6-pmtu-cache.h:124
ns3::Ipv6PmtuCache::SetPmtu
void SetPmtu(Ipv6Address dst, uint32_t pmtu)
Sets the Path MTU for the specific destination.
Definition:
ipv6-pmtu-cache.cc:74
ns3::Ipv6PmtuCache::ClearPmtu
void ClearPmtu(Ipv6Address dst)
Clears the Path MTU for the specific destination.
Definition:
ipv6-pmtu-cache.cc:108
ns3::Object
a base class which provides memory management and object aggregation
Definition:
object.h:63
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:49
src
internet
model
ipv6-pmtu-cache.h
Generated on Sat Apr 19 2014 14:06:57 for ns-3 by
1.8.6