A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
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
28namespace ns3
29{
30
32
33TypeId
35{
36 static TypeId tid =
37 TypeId("ns3::Ipv6")
39 .SetGroupName("Internet")
40 .AddAttribute(
41 "IpForward",
42 "Globally enable or disable IP forwarding for all current and future IPv6 devices.",
43 BooleanValue(false),
46 .AddAttribute("MtuDiscover",
47 "If disabled, every interface will have its MTU set to 1280 bytes.",
48 BooleanValue(true),
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),
58 return tid;
59}
60
62{
63}
64
66{
67}
68
69} /* namespace ns3 */
AttributeValue implementation for Boolean.
Definition: boolean.h:37
~Ipv6() override
Destructor.
Definition: ipv6.cc:65
virtual void SetIpForward(bool forward)=0
Set IPv6 forwarding state.
virtual void SetMtuDiscover(bool mtuDiscover)=0
Set IPv6 MTU discover state.
static TypeId GetTypeId()
Get the type ID.
Definition: ipv6.cc:34
virtual bool GetIpForward() const =0
Get IPv6 forwarding state.
virtual bool GetStrongEndSystemModel() const =0
Get the Strong End System Model status.
virtual bool GetMtuDiscover() const =0
Get IPv6 MTU discover state.
Ipv6()
Constructor.
Definition: ipv6.cc:61
virtual void SetStrongEndSystemModel(bool model)=0
Set or unset the Strong End System Model.
A base class which provides memory management and object aggregation.
Definition: object.h:89
a unique identifier for an interface.
Definition: type-id.h:59
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition: type-id.cc:932
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Definition: boolean.h:81
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition: boolean.cc:124
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Definition: object-base.h:46
Every class exported by the ns3 library is enclosed in the ns3 namespace.