A Discrete-Event Network Simulator
QKDNetSim v2.0 (NS-3 v3.41) @ (+)
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
Enumerator
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
c
e
i
l
o
r
s
t
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
ipv4-interface-container.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 INRIA
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: Mathieu Lacage <mathieu.lacage@cutebugs.net>
18
*/
19
20
#ifndef IPV4_INTERFACE_CONTAINER_H
21
#define IPV4_INTERFACE_CONTAINER_H
22
23
#include "ns3/ipv4-address.h"
24
#include "ns3/ipv4.h"
25
26
#include <stdint.h>
27
#include <vector>
28
29
namespace
ns3
30
{
31
55
class
Ipv4InterfaceContainer
56
{
57
public
:
61
typedef
std::vector<std::pair<Ptr<Ipv4>, uint32_t>>::const_iterator
Iterator
;
62
66
Ipv4InterfaceContainer
();
67
72
void
Add
(
const
Ipv4InterfaceContainer
& other);
73
94
Iterator
Begin
()
const
;
95
116
Iterator
End
()
const
;
117
139
uint32_t
GetN
()
const
;
140
151
Ipv4Address
GetAddress
(uint32_t i, uint32_t j = 0)
const
;
152
158
void
SetMetric
(uint32_t i, uint16_t metric);
159
167
void
Add
(
Ptr<Ipv4>
ipv4
, uint32_t interface);
168
176
void
Add
(std::pair<
Ptr<Ipv4>
, uint32_t> ipInterfacePair);
177
186
void
Add
(std::string ipv4Name, uint32_t interface);
187
209
std::pair<Ptr<Ipv4>, uint32_t>
Get
(uint32_t i)
const
;
210
211
private
:
215
typedef
std::vector<std::pair<Ptr<Ipv4>, uint32_t>>
InterfaceVector
;
216
220
InterfaceVector
m_interfaces
;
221
};
222
223
}
// namespace ns3
224
225
#endif
/* IPV4_INTERFACE_CONTAINER_H */
ns3::Ipv4Address
Ipv4 addresses are stored in host order in this class.
Definition:
ipv4-address.h:42
ns3::Ipv4InterfaceContainer
holds a vector of std::pair of Ptr<Ipv4> and interface index.
Definition:
ipv4-interface-container.h:56
ns3::Ipv4InterfaceContainer::InterfaceVector
std::vector< std::pair< Ptr< Ipv4 >, uint32_t > > InterfaceVector
Container for pairs of Ipv4 smart pointer / Interface Index.
Definition:
ipv4-interface-container.h:215
ns3::Ipv4InterfaceContainer::End
Iterator End() const
Get an iterator which indicates past-the-last Node in the container.
Definition:
ipv4-interface-container.cc:48
ns3::Ipv4InterfaceContainer::Get
std::pair< Ptr< Ipv4 >, uint32_t > Get(uint32_t i) const
Get the std::pair of an Ptr<Ipv4> and interface stored at the location specified by the index.
Definition:
ipv4-interface-container.cc:95
ns3::Ipv4InterfaceContainer::SetMetric
void SetMetric(uint32_t i, uint16_t metric)
Set a metric for the given interface.
Definition:
ipv4-interface-container.cc:68
ns3::Ipv4InterfaceContainer::Iterator
std::vector< std::pair< Ptr< Ipv4 >, uint32_t > >::const_iterator Iterator
Container Const Iterator for pairs of Ipv4 smart pointer / Interface Index.
Definition:
ipv4-interface-container.h:61
ns3::Ipv4InterfaceContainer::m_interfaces
InterfaceVector m_interfaces
List of IPv4 stack and interfaces index.
Definition:
ipv4-interface-container.h:220
ns3::Ipv4InterfaceContainer::Add
void Add(const Ipv4InterfaceContainer &other)
Concatenate the entries in the other container with ours.
Definition:
ipv4-interface-container.cc:33
ns3::Ipv4InterfaceContainer::GetAddress
Ipv4Address GetAddress(uint32_t i, uint32_t j=0) const
Definition:
ipv4-interface-container.cc:60
ns3::Ipv4InterfaceContainer::Begin
Iterator Begin() const
Get an iterator which refers to the first pair in the container.
Definition:
ipv4-interface-container.cc:42
ns3::Ipv4InterfaceContainer::Ipv4InterfaceContainer
Ipv4InterfaceContainer()
Create an empty Ipv4InterfaceContainer.
Definition:
ipv4-interface-container.cc:28
ns3::Ipv4InterfaceContainer::GetN
uint32_t GetN() const
Definition:
ipv4-interface-container.cc:54
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
nsclick-simple-lan.ipv4
ipv4
Definition:
nsclick-simple-lan.py:57
src
internet
helper
ipv4-interface-container.h
Generated on Sun Mar 3 2024 17:10:57 for ns-3 by
1.9.1