A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ipv6-route.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2007-2009 Strasbourg University
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: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
19
*/
20
21
#ifndef IPV6_ROUTE_H
22
#define IPV6_ROUTE_H
23
24
#include <list>
25
#include <map>
26
#include <ostream>
27
28
#include "ns3/simple-ref-count.h"
29
30
#include "ns3/ipv6-address.h"
31
32
namespace
ns3
33
{
34
35
class
NetDevice;
36
42
class
Ipv6Route
:
public
SimpleRefCount
<Ipv6Route>
43
{
44
public
:
48
Ipv6Route
();
49
53
virtual
~Ipv6Route
();
54
59
void
SetDestination
(
Ipv6Address
dest);
60
65
Ipv6Address
GetDestination
()
const
;
66
71
void
SetSource
(
Ipv6Address
src);
72
77
Ipv6Address
GetSource
()
const
;
78
83
void
SetGateway
(
Ipv6Address
gw);
84
89
Ipv6Address
GetGateway
()
const
;
90
95
void
SetOutputDevice
(
Ptr<NetDevice>
outputDevice);
96
101
Ptr<NetDevice>
GetOutputDevice
()
const
;
102
103
private
:
107
Ipv6Address
m_dest
;
108
112
Ipv6Address
m_source
;
113
117
Ipv6Address
m_gateway
;
118
122
Ptr<NetDevice>
m_outputDevice
;
123
};
124
132
std::ostream&
operator<<
(std::ostream& os,
Ipv6Route
const
& route);
133
139
class
Ipv6MulticastRoute
:
public
SimpleRefCount
<Ipv6MulticastRoute>
140
{
141
public
:
145
static
const
uint32_t
MAX_INTERFACES
= 16;
146
150
static
const
uint32_t
MAX_TTL
= 255;
151
155
Ipv6MulticastRoute
();
156
160
virtual
~Ipv6MulticastRoute
();
161
166
void
SetGroup
(
const
Ipv6Address
group);
167
172
Ipv6Address
GetGroup
(
void
)
const
;
173
178
void
SetOrigin
(
const
Ipv6Address
origin);
179
184
Ipv6Address
GetOrigin
(
void
)
const
;
185
190
void
SetParent
(uint32_t iif);
191
196
uint32_t
GetParent
(
void
)
const
;
197
203
void
SetOutputTtl
(uint32_t oif, uint32_t ttl);
204
208
std::map<uint32_t, uint32_t>
GetOutputTtlMap
()
const
;
209
210
private
:
214
Ipv6Address
m_group
;
215
219
Ipv6Address
m_origin
;
220
224
uint32_t
m_parent
;
225
229
std::map<uint32_t, uint32_t>
m_ttls
;
230
};
231
239
std::ostream&
operator<<
(std::ostream& os,
Ipv6MulticastRoute
const
& route);
240
241
}
/* namespace ns3 */
242
243
#endif
/* IPV6_ROUTE_H */
244
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:50
ns3::Ipv6MulticastRoute
IPv6 multicast route entry.
Definition:
ipv6-route.h:140
ns3::Ipv6MulticastRoute::SetOrigin
void SetOrigin(const Ipv6Address origin)
Set origin address.
Definition:
ipv6-route.cc:102
ns3::Ipv6MulticastRoute::GetOutputTtlMap
std::map< uint32_t, uint32_t > GetOutputTtlMap() const
Definition:
ipv6-route.cc:140
ns3::Ipv6MulticastRoute::GetOrigin
Ipv6Address GetOrigin(void) const
Get source address.
Definition:
ipv6-route.cc:107
ns3::Ipv6MulticastRoute::m_origin
Ipv6Address m_origin
IPv6 origin (source).
Definition:
ipv6-route.h:219
ns3::Ipv6MulticastRoute::MAX_TTL
static const uint32_t MAX_TTL
Maximum Time-To-Live (TTL).
Definition:
ipv6-route.h:150
ns3::Ipv6MulticastRoute::Ipv6MulticastRoute
Ipv6MulticastRoute()
Constructor.
Definition:
ipv6-route.cc:83
ns3::Ipv6MulticastRoute::GetGroup
Ipv6Address GetGroup(void) const
Get IPv6 group.
Definition:
ipv6-route.cc:97
ns3::Ipv6MulticastRoute::MAX_INTERFACES
static const uint32_t MAX_INTERFACES
Maximum number of multicast interfaces on a router.
Definition:
ipv6-route.h:145
ns3::Ipv6MulticastRoute::m_group
Ipv6Address m_group
IPv6 group.
Definition:
ipv6-route.h:214
ns3::Ipv6MulticastRoute::SetParent
void SetParent(uint32_t iif)
Set parent for this route.
Definition:
ipv6-route.cc:112
ns3::Ipv6MulticastRoute::m_parent
uint32_t m_parent
Source interface.
Definition:
ipv6-route.h:224
ns3::Ipv6MulticastRoute::m_ttls
std::map< uint32_t, uint32_t > m_ttls
TTLs.
Definition:
ipv6-route.h:229
ns3::Ipv6MulticastRoute::GetParent
uint32_t GetParent(void) const
Get parent for this route.
Definition:
ipv6-route.cc:117
ns3::Ipv6MulticastRoute::SetGroup
void SetGroup(const Ipv6Address group)
Set IPv6 group.
Definition:
ipv6-route.cc:92
ns3::Ipv6MulticastRoute::SetOutputTtl
void SetOutputTtl(uint32_t oif, uint32_t ttl)
set output TTL for this route.
Definition:
ipv6-route.cc:122
ns3::Ipv6MulticastRoute::~Ipv6MulticastRoute
virtual ~Ipv6MulticastRoute()
Destructor.
Definition:
ipv6-route.cc:88
ns3::Ipv6Route
IPv6 route cache entry.
Definition:
ipv6-route.h:43
ns3::Ipv6Route::SetGateway
void SetGateway(Ipv6Address gw)
Set gateway address.
Definition:
ipv6-route.cc:57
ns3::Ipv6Route::SetSource
void SetSource(Ipv6Address src)
Set source address.
Definition:
ipv6-route.cc:47
ns3::Ipv6Route::~Ipv6Route
virtual ~Ipv6Route()
Destructor.
Definition:
ipv6-route.cc:33
ns3::Ipv6Route::GetDestination
Ipv6Address GetDestination() const
Get destination address.
Definition:
ipv6-route.cc:42
ns3::Ipv6Route::SetDestination
void SetDestination(Ipv6Address dest)
Set destination address.
Definition:
ipv6-route.cc:37
ns3::Ipv6Route::m_outputDevice
Ptr< NetDevice > m_outputDevice
Output device.
Definition:
ipv6-route.h:122
ns3::Ipv6Route::GetSource
Ipv6Address GetSource() const
Get source address.
Definition:
ipv6-route.cc:52
ns3::Ipv6Route::m_source
Ipv6Address m_source
source address.
Definition:
ipv6-route.h:112
ns3::Ipv6Route::m_dest
Ipv6Address m_dest
Destination address.
Definition:
ipv6-route.h:107
ns3::Ipv6Route::GetOutputDevice
Ptr< NetDevice > GetOutputDevice() const
Get output device.
Definition:
ipv6-route.cc:72
ns3::Ipv6Route::m_gateway
Ipv6Address m_gateway
Gateway address.
Definition:
ipv6-route.h:117
ns3::Ipv6Route::GetGateway
Ipv6Address GetGateway() const
Get gateway address.
Definition:
ipv6-route.cc:62
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:67
ns3::Ptr< NetDevice >
ns3::SimpleRefCount
A template-based reference counting class.
Definition:
simple-ref-count.h:73
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:139
src
internet
model
ipv6-route.h
Generated on Tue Feb 6 2024 19:21:19 for ns-3 by
1.9.1