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
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
ipv6-interface-container.h
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2008-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_INTERFACE_CONTAINER_H
22
#define IPV6_INTERFACE_CONTAINER_H
23
24
#include <stdint.h>
25
26
#include <vector>
27
28
#include "ns3/ipv6.h"
29
#include "ns3/ipv6-address.h"
30
31
namespace
ns3
32
{
33
38
class
Ipv6InterfaceContainer
39
{
40
public
:
41
typedef
std::vector<std::pair<Ptr<Ipv6>, uint32_t> >::const_iterator Iterator;
45
Ipv6InterfaceContainer
();
46
66
uint32_t
GetN
(
void
)
const
;
67
73
uint32_t
GetInterfaceIndex
(uint32_t i)
const
;
74
81
Ipv6Address
GetAddress
(uint32_t i, uint32_t j)
const
;
82
88
void
Add
(
Ptr<Ipv6>
ipv6, uint32_t interface);
89
110
Iterator
Begin
(
void
)
const
;
111
132
Iterator
End
(
void
)
const
;
133
138
void
Add
(
Ipv6InterfaceContainer
& c);
139
145
void
Add
(std::string ipv6Name, uint32_t interface);
146
152
void
SetRouter
(uint32_t i,
bool
router);
153
159
void
SetDefaultRoute
(uint32_t i, uint32_t router);
160
161
private
:
162
typedef
std::vector<std::pair<Ptr<Ipv6>, uint32_t> > InterfaceVector;
163
168
InterfaceVector
m_interfaces
;
169
};
170
171
}
/* namespace ns3 */
172
173
#endif
/* IPV6_INTERFACE_CONTAINER_H */
174
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
ns3::Ipv6InterfaceContainer
Keep track of a set of IPv6 interfaces.
Definition:
ipv6-interface-container.h:38
ns3::Ipv6InterfaceContainer::Add
void Add(Ptr< Ipv6 > ipv6, uint32_t interface)
Add a couple IPv6/interface.
Definition:
ipv6-interface-container.cc:63
ns3::Ipv6InterfaceContainer::GetN
uint32_t GetN(void) const
Definition:
ipv6-interface-container.cc:46
ns3::Ipv6InterfaceContainer::Ipv6InterfaceContainer
Ipv6InterfaceContainer()
Constructor.
Definition:
ipv6-interface-container.cc:30
ns3::Ipv6InterfaceContainer::m_interfaces
InterfaceVector m_interfaces
List of IPv6 stack and interfaces index.
Definition:
ipv6-interface-container.h:168
ns3::Ipv6InterfaceContainer::GetInterfaceIndex
uint32_t GetInterfaceIndex(uint32_t i) const
Get the interface index for the specified node index.
Definition:
ipv6-interface-container.cc:51
ns3::Ipv6InterfaceContainer::SetDefaultRoute
void SetDefaultRoute(uint32_t i, uint32_t router)
Set the default route for the specified index.
Definition:
ipv6-interface-container.cc:108
ns3::Ipv6InterfaceContainer::SetRouter
void SetRouter(uint32_t i, bool router)
Set the state of the stack (act as a router or not) for the specified index.
Definition:
ipv6-interface-container.cc:82
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:44
ns3::Ipv6InterfaceContainer::Begin
Iterator Begin(void) const
Get an iterator which refers to the first pair in the container.
Definition:
ipv6-interface-container.cc:35
ns3::Ipv6InterfaceContainer::End
Iterator End(void) const
Get an iterator which indicates past-the-last Node in the container.
Definition:
ipv6-interface-container.cc:41
ns3::Ipv6InterfaceContainer::GetAddress
Ipv6Address GetAddress(uint32_t i, uint32_t j) const
Get the address for the specified index.
Definition:
ipv6-interface-container.cc:56
src
internet
helper
ipv6-interface-container.h
Generated on Sun Mar 16 2014 11:25:04 for ns-3 by
1.8.6