A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
ipv6.cc
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7
*/
8
9
/* taken from src/node/ipv4.h and adapted to IPv6 */
10
11
#include "
ipv6.h
"
12
13
#include "ns3/assert.h"
14
#include "ns3/boolean.h"
15
#include "ns3/node.h"
16
17
namespace
ns3
18
{
19
20
NS_OBJECT_ENSURE_REGISTERED
(Ipv6);
21
22
TypeId
23
Ipv6::GetTypeId
()
24
{
25
static
TypeId
tid =
26
TypeId
(
"ns3::Ipv6"
)
27
.
SetParent
<
Object
>()
28
.SetGroupName(
"Internet"
)
29
.AddAttribute(
30
"IpForward"
,
31
"Globally enable or disable IP forwarding for all current and future IPv6 devices."
,
32
BooleanValue
(
false
),
33
MakeBooleanAccessor
(&
Ipv6::SetIpForward
, &
Ipv6::GetIpForward
),
34
MakeBooleanChecker
())
35
.AddAttribute(
"MtuDiscover"
,
36
"If disabled, every interface will have its MTU set to 1280 bytes."
,
37
BooleanValue
(
true
),
38
MakeBooleanAccessor
(&
Ipv6::SetMtuDiscover
, &
Ipv6::GetMtuDiscover
),
39
MakeBooleanChecker
())
40
.AddAttribute(
41
"StrongEndSystemModel"
,
42
"Reject packets for an address not configured on the interface they're "
43
"coming from (RFC1122, section 3.3.4.2)."
,
44
BooleanValue
(
true
),
45
MakeBooleanAccessor
(&
Ipv6::SetStrongEndSystemModel
, &
Ipv6::GetStrongEndSystemModel
),
46
MakeBooleanChecker
());
47
return
tid;
48
}
49
50
Ipv6::Ipv6
()
51
{
52
}
53
54
Ipv6::~Ipv6
()
55
{
56
}
57
58
}
/* namespace ns3 */
ns3::BooleanValue
AttributeValue implementation for Boolean.
Definition
boolean.h:26
ns3::Ipv6::~Ipv6
~Ipv6() override
Destructor.
Definition
ipv6.cc:54
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:23
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:50
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:78
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
ns3::TypeId::SetParent
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition
type-id.cc:1001
ns3::MakeBooleanChecker
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition
boolean.cc:113
ns3::MakeBooleanAccessor
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
Definition
boolean.h:70
NS_OBJECT_ENSURE_REGISTERED
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition
object-base.h:35
ipv6.h
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
internet
model
ipv6.cc
Generated on Fri Nov 1 2024 09:20:39 for ns-3 by
1.11.0