A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
ipv4.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#include "ipv4.h"
21
22#include "ns3/assert.h"
23#include "ns3/boolean.h"
24#include "ns3/log.h"
25#include "ns3/node.h"
26
27namespace ns3
28{
29
31
33
34TypeId
36{
37 static TypeId tid =
38 TypeId("ns3::Ipv4")
40 .SetGroupName("Internet")
41 .AddAttribute(
42 "IpForward",
43 "Globally enable or disable IP forwarding for all current and future Ipv4 devices.",
44 BooleanValue(true),
47 .AddAttribute("WeakEsModel",
48 "RFC1122 term for whether host accepts datagram with a dest. address on "
49 "another interface",
50 BooleanValue(true),
53#if 0
54 .AddAttribute ("MtuDiscover", "If enabled, every outgoing ip packet will have the DF flag set.",
55 BooleanValue (false),
59#endif
60 ;
61 return tid;
62}
63
65{
66 NS_LOG_FUNCTION(this);
67}
68
70{
71 NS_LOG_FUNCTION(this);
72}
73
74} // namespace ns3
AttributeValue implementation for Boolean.
Definition: boolean.h:37
virtual bool GetIpForward() const =0
Get the IP forwarding state.
virtual void SetIpForward(bool forward)=0
Set or unset the IP forwarding state.
Ipv4()
Definition: ipv4.cc:64
virtual void SetWeakEsModel(bool model)=0
Set or unset the Weak Es Model.
virtual bool GetWeakEsModel() const =0
Get the Weak Es Model status.
static TypeId GetTypeId()
Get the type ID.
Definition: ipv4.cc:35
~Ipv4() override
Definition: ipv4.cc:69
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:936
virtual bool GetMtuDiscover() const =0
Get the MTU discover capability.
virtual void SetMtuDiscover(bool discover)=0
Set the MTU discover capability.
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Definition: boolean.h:86
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition: boolean.cc:124
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition: log.h:202
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#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.