A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ipv6-interface-container.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2008-2009 Strasbourg University
4
* 2013 Universita' di Firenze
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
* Author: Sebastien Vincent <vincent@clarinet.u-strasbg.fr>
20
* Tommaso Pecorella <tommaso.pecorella@unifi.it>
21
*/
22
23
#ifndef IPV6_INTERFACE_CONTAINER_H
24
#define IPV6_INTERFACE_CONTAINER_H
25
26
#include <stdint.h>
27
28
#include <vector>
29
30
#include "ns3/ipv6.h"
31
#include "ns3/ipv6-address.h"
32
33
namespace
ns3
34
{
35
41
class
Ipv6InterfaceContainer
42
{
43
public
:
44
48
typedef
std::vector<std::pair<Ptr<Ipv6>,
uint32_t
> >::const_iterator
Iterator
;
49
53
Ipv6InterfaceContainer
();
54
74
uint32_t
GetN
(
void
)
const
;
75
81
uint32_t
GetInterfaceIndex
(
uint32_t
i)
const
;
82
89
Ipv6Address
GetAddress
(
uint32_t
i,
uint32_t
j)
const
;
90
96
Ipv6Address
GetLinkLocalAddress
(
uint32_t
i);
97
103
Ipv6Address
GetLinkLocalAddress
(
Ipv6Address
address
);
104
110
void
Add
(
Ptr<Ipv6>
ipv6,
uint32_t
interface);
111
132
Iterator
Begin
(
void
)
const
;
133
154
Iterator
End
(
void
)
const
;
155
160
void
Add
(
const
Ipv6InterfaceContainer
& c);
161
167
void
Add
(std::string ipv6Name,
uint32_t
interface);
168
175
void
SetForwarding
(
uint32_t
i,
bool
state);
176
181
void
SetDefaultRouteInAllNodes
(
uint32_t
router);
182
188
void
SetDefaultRouteInAllNodes
(
Ipv6Address
routerAddr);
189
195
void
SetDefaultRoute
(
uint32_t
i,
uint32_t
router);
196
203
void
SetDefaultRoute
(
uint32_t
i,
Ipv6Address
routerAddr);
204
205
private
:
209
typedef
std::vector<std::pair<Ptr<Ipv6>,
uint32_t
> >
InterfaceVector
;
210
214
InterfaceVector
m_interfaces
;
215
};
216
217
}
/* namespace ns3 */
218
219
#endif
/* IPV6_INTERFACE_CONTAINER_H */
220
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:50
ns3::Ipv6InterfaceContainer
Keep track of a set of IPv6 interfaces.
Definition:
ipv6-interface-container.h:42
ns3::Ipv6InterfaceContainer::SetForwarding
void SetForwarding(uint32_t i, bool state)
Set the state of the stack (act as a router or as an host) for the specified index.
Definition:
ipv6-interface-container.cc:83
ns3::Ipv6InterfaceContainer::GetN
uint32_t GetN(void) const
Definition:
ipv6-interface-container.cc:47
ns3::Ipv6InterfaceContainer::GetInterfaceIndex
uint32_t GetInterfaceIndex(uint32_t i) const
Get the interface index for the specified node index.
Definition:
ipv6-interface-container.cc:52
ns3::Ipv6InterfaceContainer::Ipv6InterfaceContainer
Ipv6InterfaceContainer()
Constructor.
Definition:
ipv6-interface-container.cc:31
ns3::Ipv6InterfaceContainer::SetDefaultRouteInAllNodes
void SetDefaultRouteInAllNodes(uint32_t router)
Set the default route for all the devices (except the router itself).
Definition:
ipv6-interface-container.cc:89
ns3::Ipv6InterfaceContainer::SetDefaultRoute
void SetDefaultRoute(uint32_t i, uint32_t router)
Set the default route for the specified index.
Definition:
ipv6-interface-container.cc:152
ns3::Ipv6InterfaceContainer::m_interfaces
InterfaceVector m_interfaces
List of IPv6 stack and interfaces index.
Definition:
ipv6-interface-container.h:214
ns3::Ipv6InterfaceContainer::InterfaceVector
std::vector< std::pair< Ptr< Ipv6 >, uint32_t > > InterfaceVector
Container for pairs of Ipv6 smart pointer / Interface Index.
Definition:
ipv6-interface-container.h:209
ns3::Ipv6InterfaceContainer::Iterator
std::vector< std::pair< Ptr< Ipv6 >, uint32_t > >::const_iterator Iterator
Container Const Iterator for pairs of Ipv6 smart pointer / Interface Index.
Definition:
ipv6-interface-container.h:48
ns3::Ipv6InterfaceContainer::GetAddress
Ipv6Address GetAddress(uint32_t i, uint32_t j) const
Get the address for the specified index.
Definition:
ipv6-interface-container.cc:57
ns3::Ipv6InterfaceContainer::GetLinkLocalAddress
Ipv6Address GetLinkLocalAddress(uint32_t i)
Get the link-local address for the specified index.
Definition:
ipv6-interface-container.cc:207
ns3::Ipv6InterfaceContainer::Add
void Add(Ptr< Ipv6 > ipv6, uint32_t interface)
Add a couple IPv6/interface.
Definition:
ipv6-interface-container.cc:64
ns3::Ipv6InterfaceContainer::Begin
Iterator Begin(void) const
Get an iterator which refers to the first pair in the container.
Definition:
ipv6-interface-container.cc:36
ns3::Ipv6InterfaceContainer::End
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
Definition:
ipv6-interface-container.cc:42
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:74
uint32_t
first.address
address
Definition:
first.py:44
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
helper
ipv6-interface-container.h
Generated on Sun May 1 2022 12:01:29 for ns-3 by
1.9.3