A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
ipv6.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007 INRIA
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18
*/
19
20
/* taken from src/node/ipv4.h and adapted to IPv6 */
21
22
#include "
ipv6.h
"
23
24
#include "ns3/assert.h"
25
#include "ns3/boolean.h"
26
#include "ns3/node.h"
27
28
namespace
ns3
29
{
30
31
NS_OBJECT_ENSURE_REGISTERED
(Ipv6);
32
33
TypeId
34
Ipv6::GetTypeId
()
35
{
36
static
TypeId
tid =
37
TypeId
(
"ns3::Ipv6"
)
38
.
SetParent
<
Object
>()
39
.SetGroupName(
"Internet"
)
40
.AddAttribute(
41
"IpForward"
,
42
"Globally enable or disable IP forwarding for all current and future IPv6 devices."
,
43
BooleanValue
(
false
),
44
MakeBooleanAccessor
(&
Ipv6::SetIpForward
, &
Ipv6::GetIpForward
),
45
MakeBooleanChecker
())
46
.AddAttribute(
"MtuDiscover"
,
47
"If disabled, every interface will have its MTU set to 1280 bytes."
,
48
BooleanValue
(
true
),
49
MakeBooleanAccessor
(&
Ipv6::SetMtuDiscover
, &
Ipv6::GetMtuDiscover
),
50
MakeBooleanChecker
())
51
.AddAttribute(
52
"StrongEndSystemModel"
,
53
"Reject packets for an address not configured on the interface they're "
54
"coming from (RFC1122, section 3.3.4.2)."
,
55
BooleanValue
(
true
),
56
MakeBooleanAccessor
(&
Ipv6::SetStrongEndSystemModel
, &
Ipv6::GetStrongEndSystemModel
),
57
MakeBooleanChecker
());
58
return
tid;
59
}
60
61
Ipv6::Ipv6
()
62
{
63
}
64
65
Ipv6::~Ipv6
()
66
{
67
}
68
69
}
/* namespace ns3 */
ns3::BooleanValue
Definition:
boolean.h:37
ns3::Ipv6::~Ipv6
~Ipv6() override
Destructor.
Definition:
ipv6.cc:65
ns3::Ipv6::SetIpForward
virtual void SetIpForward(bool forward)=0
Set IPv6 forwarding state.
ns3::Ipv6::SetMtuDiscover
virtual void SetMtuDiscover(bool mtuDiscover)=0
Set IPv6 MTU discover state.
ns3::Ipv6::GetTypeId
static TypeId GetTypeId()
Get the type ID.
Definition:
ipv6.cc:34
ns3::Ipv6::GetIpForward
virtual bool GetIpForward() const =0
Get IPv6 forwarding state.
ns3::Ipv6::GetStrongEndSystemModel
virtual bool GetStrongEndSystemModel() const =0
Get the Strong End System Model status.
ns3::Ipv6::GetMtuDiscover
virtual bool GetMtuDiscover() const =0
Get IPv6 MTU discover state.
ns3::Ipv6::Ipv6
Ipv6()
Constructor.
Definition:
ipv6.cc:61
ns3::Ipv6::SetStrongEndSystemModel
virtual void SetStrongEndSystemModel(bool model)=0
Set or unset the Strong End System Model.
ns3::Object
A base class which provides memory management and object aggregation.
Definition:
object.h:89
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition:
type-id.cc:931
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition:
object-base.h:46
ipv6.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::MakeBooleanChecker
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition:
boolean.cc:124
ns3::MakeBooleanAccessor
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Definition:
boolean.h:86
src
internet
model
ipv6.cc
Generated on Sun Mar 3 2024 17:10:59 for ns-3 by
1.9.1