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
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
radvd-prefix.cc
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
#include "
radvd-prefix.h
"
22
23
namespace
ns3
24
{
25
26
RadvdPrefix::RadvdPrefix
(
Ipv6Address
network, uint8_t prefixLength, uint32_t preferredLifeTime, uint32_t validLifeTime,
bool
onLinkFlag,
bool
autonomousFlag,
bool
routerAddrFlag)
27
: m_network (network),
28
m_prefixLength (prefixLength),
29
m_preferredLifeTime (preferredLifeTime),
30
m_validLifeTime (validLifeTime),
31
m_onLinkFlag (onLinkFlag),
32
m_autonomousFlag (autonomousFlag),
33
m_routerAddrFlag (routerAddrFlag)
34
{
35
}
36
37
RadvdPrefix::~RadvdPrefix
()
38
{
39
}
40
41
Ipv6Address
RadvdPrefix::GetNetwork
()
const
42
{
43
return
m_network
;
44
}
45
46
void
RadvdPrefix::SetNetwork
(
Ipv6Address
network)
47
{
48
m_network
= network;
49
}
50
51
uint8_t
RadvdPrefix::GetPrefixLength
()
const
52
{
53
return
m_prefixLength
;
54
}
55
56
void
RadvdPrefix::SetPrefixLength
(uint8_t prefixLength)
57
{
58
m_prefixLength
= prefixLength;
59
}
60
61
uint32_t
RadvdPrefix::GetValidLifeTime
()
const
62
{
63
return
m_validLifeTime
;
64
}
65
66
void
RadvdPrefix::SetValidLifeTime
(uint32_t validLifeTime)
67
{
68
m_validLifeTime
= validLifeTime;
69
}
70
71
uint32_t
RadvdPrefix::GetPreferredLifeTime
()
const
72
{
73
return
m_preferredLifeTime
;
74
}
75
76
void
RadvdPrefix::SetPreferredLifeTime
(uint32_t preferredLifeTime)
77
{
78
m_preferredLifeTime
= preferredLifeTime;
79
}
80
81
bool
RadvdPrefix::IsOnLinkFlag
()
const
82
{
83
return
m_onLinkFlag
;
84
}
85
86
void
RadvdPrefix::SetOnLinkFlag
(
bool
onLinkFlag)
87
{
88
m_onLinkFlag
= onLinkFlag;
89
}
90
91
bool
RadvdPrefix::IsAutonomousFlag
()
const
92
{
93
return
m_autonomousFlag
;
94
}
95
96
void
RadvdPrefix::SetAutonomousFlag
(
bool
autonomousFlag)
97
{
98
m_autonomousFlag
= autonomousFlag;
99
}
100
101
bool
RadvdPrefix::IsRouterAddrFlag
()
const
102
{
103
return
m_routerAddrFlag
;
104
}
105
106
void
RadvdPrefix::SetRouterAddrFlag
(
bool
routerAddrFlag)
107
{
108
m_routerAddrFlag
= routerAddrFlag;
109
}
110
111
}
/* namespace ns3 */
112
src
applications
model
radvd-prefix.cc
Generated on Tue Oct 9 2012 16:45:33 for ns-3 by
1.8.1.2