A Discrete-Event Network Simulator
API
 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 
38 {
39 }
40 
42 {
43  return m_network;
44 }
45 
47 {
48  m_network = network;
49 }
50 
52 {
53  return m_prefixLength;
54 }
55 
56 void RadvdPrefix::SetPrefixLength (uint8_t prefixLength)
57 {
58  m_prefixLength = prefixLength;
59 }
60 
62 {
63  return m_validLifeTime;
64 }
65 
66 void RadvdPrefix::SetValidLifeTime (uint32_t validLifeTime)
67 {
68  m_validLifeTime = validLifeTime;
69 }
70 
72 {
73  return m_preferredLifeTime;
74 }
75 
76 void RadvdPrefix::SetPreferredLifeTime (uint32_t preferredLifeTime)
77 {
78  m_preferredLifeTime = preferredLifeTime;
79 }
80 
82 {
83  return m_onLinkFlag;
84 }
85 
86 void RadvdPrefix::SetOnLinkFlag (bool onLinkFlag)
87 {
88  m_onLinkFlag = onLinkFlag;
89 }
90 
92 {
93  return m_autonomousFlag;
94 }
95 
96 void RadvdPrefix::SetAutonomousFlag (bool autonomousFlag)
97 {
98  m_autonomousFlag = autonomousFlag;
99 }
100 
102 {
103  return m_routerAddrFlag;
104 }
105 
106 void RadvdPrefix::SetRouterAddrFlag (bool routerAddrFlag)
107 {
108  m_routerAddrFlag = routerAddrFlag;
109 }
110 
111 } /* namespace ns3 */
112