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.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
37
class
RadvdPrefix
:
public
SimpleRefCount
<RadvdPrefix>
38
{
39
public
:
50
RadvdPrefix
(
Ipv6Address
network, uint8_t prefixLength, uint32_t preferredLifeTime = 604800, uint32_t validLifeTime = 2592000,
bool
onLinkFlag =
true
,
bool
autonomousFlag =
true
,
bool
routerAddrFlag =
false
);
51
55
~RadvdPrefix
();
56
61
Ipv6Address
GetNetwork
()
const
;
62
67
void
SetNetwork
(
Ipv6Address
network);
68
73
uint8_t
GetPrefixLength
()
const
;
74
79
void
SetPrefixLength
(uint8_t prefixLength);
80
85
uint32_t
GetPreferredLifeTime
()
const
;
86
91
void
SetPreferredLifeTime
(uint32_t preferredLifeTime);
92
97
uint32_t
GetValidLifeTime
()
const
;
98
103
void
SetValidLifeTime
(uint32_t validLifeTime);
104
109
bool
IsOnLinkFlag
()
const
;
110
115
void
SetOnLinkFlag
(
bool
onLinkFlag);
116
121
bool
IsAutonomousFlag
()
const
;
122
127
void
SetAutonomousFlag
(
bool
autonomousFlag);
128
133
bool
IsRouterAddrFlag
()
const
;
134
139
void
SetRouterAddrFlag
(
bool
routerAddrFlag);
140
141
private
:
145
Ipv6Address
m_network
;
146
150
uint8_t
m_prefixLength
;
151
155
uint32_t
m_preferredLifeTime
;
156
160
uint32_t
m_validLifeTime
;
161
165
bool
m_onLinkFlag
;
166
170
bool
m_autonomousFlag
;
171
176
bool
m_routerAddrFlag
;
177
};
178
179
}
/* namespace ns3 */
180
181
#endif
/* RADVD_PREFIX_H */
182
src
applications
model
radvd-prefix.h
Generated on Tue Nov 13 2012 10:32:09 for ns-3 by
1.8.1.2