A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
ipv6-route.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007-2009 Strasbourg University
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
18
*/
19
20
#ifndef IPV6_ROUTE_H
21
#define IPV6_ROUTE_H
22
23
#include "ns3/ipv6-address.h"
24
#include "ns3/simple-ref-count.h"
25
26
#include <list>
27
#include <map>
28
#include <ostream>
29
30
namespace
ns3
31
{
32
33
class
NetDevice;
34
40
class
Ipv6Route
:
public
SimpleRefCount
<Ipv6Route>
41
{
42
public
:
46
Ipv6Route
();
47
51
virtual
~Ipv6Route
();
52
57
void
SetDestination
(
Ipv6Address
dest);
58
63
Ipv6Address
GetDestination
()
const
;
64
69
void
SetSource
(
Ipv6Address
src);
70
75
Ipv6Address
GetSource
()
const
;
76
81
void
SetGateway
(
Ipv6Address
gw);
82
87
Ipv6Address
GetGateway
()
const
;
88
93
void
SetOutputDevice
(
Ptr<NetDevice>
outputDevice);
94
99
Ptr<NetDevice>
GetOutputDevice
()
const
;
100
101
private
:
105
Ipv6Address
m_dest
;
106
110
Ipv6Address
m_source
;
111
115
Ipv6Address
m_gateway
;
116
120
Ptr<NetDevice>
m_outputDevice
;
121
};
122
130
std::ostream&
operator<<
(std::ostream& os,
const
Ipv6Route
& route);
131
137
class
Ipv6MulticastRoute
:
public
SimpleRefCount
<Ipv6MulticastRoute>
138
{
139
public
:
143
static
const
uint32_t
MAX_INTERFACES
= 16;
144
148
static
const
uint32_t
MAX_TTL
= 255;
149
153
Ipv6MulticastRoute
();
154
158
virtual
~Ipv6MulticastRoute
();
159
164
void
SetGroup
(
const
Ipv6Address
group);
165
170
Ipv6Address
GetGroup
()
const
;
171
176
void
SetOrigin
(
const
Ipv6Address
origin);
177
182
Ipv6Address
GetOrigin
()
const
;
183
188
void
SetParent
(
uint32_t
iif);
189
194
uint32_t
GetParent
()
const
;
195
201
void
SetOutputTtl
(
uint32_t
oif,
uint32_t
ttl);
202
206
std::map<uint32_t, uint32_t>
GetOutputTtlMap
()
const
;
207
208
private
:
212
Ipv6Address
m_group
;
213
217
Ipv6Address
m_origin
;
218
222
uint32_t
m_parent
;
223
227
std::map<uint32_t, uint32_t>
m_ttls
;
228
};
229
237
std::ostream&
operator<<
(std::ostream& os,
const
Ipv6MulticastRoute
& route);
238
239
}
/* namespace ns3 */
240
241
#endif
/* IPV6_ROUTE_H */
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:49
ns3::Ipv6MulticastRoute
IPv6 multicast route entry.
Definition:
ipv6-route.h:138
ns3::Ipv6MulticastRoute::SetOrigin
void SetOrigin(const Ipv6Address origin)
Set origin address.
Definition:
ipv6-route.cc:115
ns3::Ipv6MulticastRoute::GetOutputTtlMap
std::map< uint32_t, uint32_t > GetOutputTtlMap() const
Definition:
ipv6-route.cc:158
ns3::Ipv6MulticastRoute::m_origin
Ipv6Address m_origin
IPv6 origin (source).
Definition:
ipv6-route.h:217
ns3::Ipv6MulticastRoute::GetOrigin
Ipv6Address GetOrigin() const
Get source address.
Definition:
ipv6-route.cc:121
ns3::Ipv6MulticastRoute::MAX_TTL
static const uint32_t MAX_TTL
Maximum Time-To-Live (TTL).
Definition:
ipv6-route.h:148
ns3::Ipv6MulticastRoute::Ipv6MulticastRoute
Ipv6MulticastRoute()
Constructor.
Definition:
ipv6-route.cc:93
ns3::Ipv6MulticastRoute::MAX_INTERFACES
static const uint32_t MAX_INTERFACES
Maximum number of multicast interfaces on a router.
Definition:
ipv6-route.h:143
ns3::Ipv6MulticastRoute::m_group
Ipv6Address m_group
IPv6 group.
Definition:
ipv6-route.h:212
ns3::Ipv6MulticastRoute::GetParent
uint32_t GetParent() const
Get parent for this route.
Definition:
ipv6-route.cc:133
ns3::Ipv6MulticastRoute::SetParent
void SetParent(uint32_t iif)
Set parent for this route.
Definition:
ipv6-route.cc:127
ns3::Ipv6MulticastRoute::m_parent
uint32_t m_parent
Source interface.
Definition:
ipv6-route.h:222
ns3::Ipv6MulticastRoute::m_ttls
std::map< uint32_t, uint32_t > m_ttls
TTLs.
Definition:
ipv6-route.h:227
ns3::Ipv6MulticastRoute::SetGroup
void SetGroup(const Ipv6Address group)
Set IPv6 group.
Definition:
ipv6-route.cc:103
ns3::Ipv6MulticastRoute::GetGroup
Ipv6Address GetGroup() const
Get IPv6 group.
Definition:
ipv6-route.cc:109
ns3::Ipv6MulticastRoute::SetOutputTtl
void SetOutputTtl(uint32_t oif, uint32_t ttl)
set output TTL for this route.
Definition:
ipv6-route.cc:139
ns3::Ipv6MulticastRoute::~Ipv6MulticastRoute
virtual ~Ipv6MulticastRoute()
Destructor.
Definition:
ipv6-route.cc:98
ns3::Ipv6Route
IPv6 route cache entry.
Definition:
ipv6-route.h:41
ns3::Ipv6Route::SetGateway
void SetGateway(Ipv6Address gw)
Set gateway address.
Definition:
ipv6-route.cc:62
ns3::Ipv6Route::SetSource
void SetSource(Ipv6Address src)
Set source address.
Definition:
ipv6-route.cc:50
ns3::Ipv6Route::~Ipv6Route
virtual ~Ipv6Route()
Destructor.
Definition:
ipv6-route.cc:33
ns3::Ipv6Route::GetDestination
Ipv6Address GetDestination() const
Get destination address.
Definition:
ipv6-route.cc:44
ns3::Ipv6Route::SetDestination
void SetDestination(Ipv6Address dest)
Set destination address.
Definition:
ipv6-route.cc:38
ns3::Ipv6Route::m_outputDevice
Ptr< NetDevice > m_outputDevice
Output device.
Definition:
ipv6-route.h:120
ns3::Ipv6Route::GetSource
Ipv6Address GetSource() const
Get source address.
Definition:
ipv6-route.cc:56
ns3::Ipv6Route::m_source
Ipv6Address m_source
source address.
Definition:
ipv6-route.h:110
ns3::Ipv6Route::m_dest
Ipv6Address m_dest
Destination address.
Definition:
ipv6-route.h:105
ns3::Ipv6Route::GetOutputDevice
Ptr< NetDevice > GetOutputDevice() const
Get output device.
Definition:
ipv6-route.cc:80
ns3::Ipv6Route::m_gateway
Ipv6Address m_gateway
Gateway address.
Definition:
ipv6-route.h:115
ns3::Ipv6Route::GetGateway
Ipv6Address GetGateway() const
Get gateway address.
Definition:
ipv6-route.cc:68
ns3::Ipv6Route::Ipv6Route
Ipv6Route()
Constructor.
Definition:
ipv6-route.cc:29
ns3::Ipv6Route::SetOutputDevice
void SetOutputDevice(Ptr< NetDevice > outputDevice)
Set output device for outgoing packets.
Definition:
ipv6-route.cc:74
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:78
ns3::SimpleRefCount
A template-based reference counting class.
Definition:
simple-ref-count.h:81
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::operator<<
std::ostream & operator<<(std::ostream &os, const Angles &a)
Definition:
angles.cc:129
src
internet
model
ipv6-route.h
Generated on Sun Jul 2 2023 18:21:40 for ns-3 by
1.9.6