A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
radvd-prefix.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 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 RADVD_PREFIX_H
22
#define RADVD_PREFIX_H
23
24
#include <stdint.h>
25
26
#include "ns3/ipv6-address.h"
27
#include "ns3/simple-ref-count.h"
28
29
namespace
ns3
30
{
31
36
class
RadvdPrefix
:
public
SimpleRefCount
<RadvdPrefix>
37
{
38
public
:
49
RadvdPrefix
(
Ipv6Address
network, uint8_t prefixLength, uint32_t preferredLifeTime = 604800, uint32_t validLifeTime = 2592000,
bool
onLinkFlag =
true
,
bool
autonomousFlag =
true
,
bool
routerAddrFlag =
false
);
50
54
~RadvdPrefix
();
55
60
Ipv6Address
GetNetwork
()
const
;
61
66
void
SetNetwork
(
Ipv6Address
network);
67
72
uint8_t
GetPrefixLength
()
const
;
73
78
void
SetPrefixLength
(uint8_t prefixLength);
79
84
uint32_t
GetPreferredLifeTime
()
const
;
85
90
void
SetPreferredLifeTime
(uint32_t preferredLifeTime);
91
96
uint32_t
GetValidLifeTime
()
const
;
97
102
void
SetValidLifeTime
(uint32_t validLifeTime);
103
108
bool
IsOnLinkFlag
()
const
;
109
114
void
SetOnLinkFlag
(
bool
onLinkFlag);
115
120
bool
IsAutonomousFlag
()
const
;
121
126
void
SetAutonomousFlag
(
bool
autonomousFlag);
127
132
bool
IsRouterAddrFlag
()
const
;
133
138
void
SetRouterAddrFlag
(
bool
routerAddrFlag);
139
140
private
:
144
Ipv6Address
m_network
;
145
149
uint8_t
m_prefixLength
;
150
154
uint32_t
m_preferredLifeTime
;
155
159
uint32_t
m_validLifeTime
;
160
164
bool
m_onLinkFlag
;
165
169
bool
m_autonomousFlag
;
170
175
bool
m_routerAddrFlag
;
176
};
177
178
}
/* namespace ns3 */
179
180
#endif
/* RADVD_PREFIX_H */
181
ns3::Ipv6Address
Describes an IPv6 address.
Definition:
ipv6-address.h:50
ns3::RadvdPrefix
Router prefix for radvd application.
Definition:
radvd-prefix.h:37
ns3::RadvdPrefix::SetAutonomousFlag
void SetAutonomousFlag(bool autonomousFlag)
Set autonomous flag.
Definition:
radvd-prefix.cc:112
ns3::RadvdPrefix::m_routerAddrFlag
bool m_routerAddrFlag
Router address flag, indicates that router address is sent instead of network prefix as is required b...
Definition:
radvd-prefix.h:175
ns3::RadvdPrefix::SetOnLinkFlag
void SetOnLinkFlag(bool onLinkFlag)
Set on-link flag.
Definition:
radvd-prefix.cc:100
ns3::RadvdPrefix::SetNetwork
void SetNetwork(Ipv6Address network)
Set network prefix.
Definition:
radvd-prefix.cc:52
ns3::RadvdPrefix::m_preferredLifeTime
uint32_t m_preferredLifeTime
Preferred time.
Definition:
radvd-prefix.h:154
ns3::RadvdPrefix::SetPreferredLifeTime
void SetPreferredLifeTime(uint32_t preferredLifeTime)
Set preferred lifetime.
Definition:
radvd-prefix.cc:88
ns3::RadvdPrefix::GetPreferredLifeTime
uint32_t GetPreferredLifeTime() const
Get preferred lifetime.
Definition:
radvd-prefix.cc:82
ns3::RadvdPrefix::SetValidLifeTime
void SetValidLifeTime(uint32_t validLifeTime)
Set valid lifetime.
Definition:
radvd-prefix.cc:76
ns3::RadvdPrefix::GetValidLifeTime
uint32_t GetValidLifeTime() const
Get valid lifetime.
Definition:
radvd-prefix.cc:70
ns3::RadvdPrefix::GetPrefixLength
uint8_t GetPrefixLength() const
Get prefix length.
Definition:
radvd-prefix.cc:58
ns3::RadvdPrefix::m_prefixLength
uint8_t m_prefixLength
Prefix length.
Definition:
radvd-prefix.h:149
ns3::RadvdPrefix::m_onLinkFlag
bool m_onLinkFlag
On link flag, indicates that this prefix can be used for on-link determination.
Definition:
radvd-prefix.h:164
ns3::RadvdPrefix::SetRouterAddrFlag
void SetRouterAddrFlag(bool routerAddrFlag)
Set router address flag.
Definition:
radvd-prefix.cc:124
ns3::RadvdPrefix::m_autonomousFlag
bool m_autonomousFlag
Autonomous flag, it is used for autonomous address configuration (RFC 2462).
Definition:
radvd-prefix.h:169
ns3::RadvdPrefix::GetNetwork
Ipv6Address GetNetwork() const
Get network prefix.
Definition:
radvd-prefix.cc:46
ns3::RadvdPrefix::m_network
Ipv6Address m_network
Network prefix.
Definition:
radvd-prefix.h:144
ns3::RadvdPrefix::IsRouterAddrFlag
bool IsRouterAddrFlag() const
Is router address flag ?
Definition:
radvd-prefix.cc:118
ns3::RadvdPrefix::RadvdPrefix
RadvdPrefix(Ipv6Address network, uint8_t prefixLength, uint32_t preferredLifeTime=604800, uint32_t validLifeTime=2592000, bool onLinkFlag=true, bool autonomousFlag=true, bool routerAddrFlag=false)
Constructor.
Definition:
radvd-prefix.cc:29
ns3::RadvdPrefix::~RadvdPrefix
~RadvdPrefix()
Destructor.
Definition:
radvd-prefix.cc:41
ns3::RadvdPrefix::m_validLifeTime
uint32_t m_validLifeTime
Valid time.
Definition:
radvd-prefix.h:159
ns3::RadvdPrefix::IsAutonomousFlag
bool IsAutonomousFlag() const
Is autonomous flag ?
Definition:
radvd-prefix.cc:106
ns3::RadvdPrefix::IsOnLinkFlag
bool IsOnLinkFlag() const
Is on-link flag ?
Definition:
radvd-prefix.cc:94
ns3::RadvdPrefix::SetPrefixLength
void SetPrefixLength(uint8_t prefixLength)
Set prefix length.
Definition:
radvd-prefix.cc:64
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.
src
internet-apps
model
radvd-prefix.h
Generated on Tue Feb 6 2024 19:21:18 for ns-3 by
1.9.1