A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ipv6-address-generator.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 University of Washington
3
* Copyright (c) 2011 Atishay Jain
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
19
#ifndef IPV6_ADDRESS_GENERATOR_H
20
#define IPV6_ADDRESS_GENERATOR_H
21
22
#include "ns3/ipv6-address.h"
23
24
namespace
ns3
25
{
26
61
class
Ipv6AddressGenerator
62
{
63
public
:
74
static
void
Init
(
const
Ipv6Address
net,
75
const
Ipv6Prefix
prefix,
76
const
Ipv6Address
interfaceId =
"::1"
);
77
90
static
Ipv6Address
NextNetwork
(
const
Ipv6Prefix
prefix);
91
101
static
Ipv6Address
GetNetwork
(
const
Ipv6Prefix
prefix);
102
109
static
void
InitAddress
(
const
Ipv6Address
interfaceId,
const
Ipv6Prefix
prefix);
110
120
static
Ipv6Address
NextAddress
(
const
Ipv6Prefix
prefix);
121
131
static
Ipv6Address
GetAddress
(
const
Ipv6Prefix
prefix);
132
136
static
void
Reset
();
137
148
static
bool
AddAllocated
(
const
Ipv6Address
addr);
149
156
static
bool
IsAddressAllocated
(
const
Ipv6Address
addr);
157
165
static
bool
IsNetworkAllocated
(
const
Ipv6Address
addr,
const
Ipv6Prefix
prefix);
166
170
static
void
TestMode
();
171
};
172
173
};
// namespace ns3
174
175
#endif
/* IPV6_ADDRESS_GENERATOR_H */
ns3::Ipv6AddressGenerator
This generator assigns addresses sequentially from a provided network address; used in topology code.
Definition:
ipv6-address-generator.h:62
ns3::Ipv6AddressGenerator::Init
static void Init(const Ipv6Address net, const Ipv6Prefix prefix, const Ipv6Address interfaceId="::1")
Initialise the base network and interfaceId for the generator.
Definition:
ipv6-address-generator.cc:672
ns3::Ipv6AddressGenerator::TestMode
static void TestMode()
Used to turn off fatal errors and assertions, for testing.
Definition:
ipv6-address-generator.cc:754
ns3::Ipv6AddressGenerator::NextAddress
static Ipv6Address NextAddress(const Ipv6Prefix prefix)
Allocate the next Ipv6Address for the configured network and prefix.
Definition:
ipv6-address-generator.cc:714
ns3::Ipv6AddressGenerator::GetNetwork
static Ipv6Address GetNetwork(const Ipv6Prefix prefix)
Get the current network of the given Ipv6Prefix.
Definition:
ipv6-address-generator.cc:690
ns3::Ipv6AddressGenerator::InitAddress
static void InitAddress(const Ipv6Address interfaceId, const Ipv6Prefix prefix)
Set the interfaceId for the given Ipv6Prefix.
Definition:
ipv6-address-generator.cc:698
ns3::Ipv6AddressGenerator::IsNetworkAllocated
static bool IsNetworkAllocated(const Ipv6Address addr, const Ipv6Prefix prefix)
Check if a network has already allocated addresses.
Definition:
ipv6-address-generator.cc:746
ns3::Ipv6AddressGenerator::AddAllocated
static bool AddAllocated(const Ipv6Address addr)
Add the Ipv6Address to the list of IPv6 entries.
Definition:
ipv6-address-generator.cc:730
ns3::Ipv6AddressGenerator::GetAddress
static Ipv6Address GetAddress(const Ipv6Prefix prefix)
Get the Ipv6Address that will be allocated upon NextAddress ()
Definition:
ipv6-address-generator.cc:706
ns3::Ipv6AddressGenerator::NextNetwork
static Ipv6Address NextNetwork(const Ipv6Prefix prefix)
Get the next network according to the given Ipv6Prefix.
Definition:
ipv6-address-generator.cc:682
ns3::Ipv6AddressGenerator::IsAddressAllocated
static bool IsAddressAllocated(const Ipv6Address addr)
Check the Ipv6Address allocation in the list of IPv6 entries.
Definition:
ipv6-address-generator.cc:738
ns3::Ipv6AddressGenerator::Reset
static void Reset()
Reset the networks and Ipv6Address to zero.
Definition:
ipv6-address-generator.cc:722
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:49
ns3::Ipv6Prefix
Describes an IPv6 prefix.
Definition:
ipv6-address.h:455
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
ipv6-address-generator.h
Generated on Sun Mar 3 2024 17:10:58 for ns-3 by
1.9.1