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 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
7 */
8
9#include "ipv4.h"
10
11#include "ns3/assert.h"
12#include "ns3/boolean.h"
13#include "ns3/log.h"
14#include "ns3/node.h"
15#include "ns3/warnings.h"
16
17namespace ns3
18{
19
21
23
24TypeId
26{
28 static TypeId tid =
29 TypeId("ns3::Ipv4")
31 .SetGroupName("Internet")
32 .AddAttribute(
33 "IpForward",
34 "Globally enable or disable IP forwarding for all current and future Ipv4 devices.",
35 BooleanValue(true),
38 .AddAttribute("WeakEsModel",
39 "RFC1122 term for whether host accepts datagram with a dest. address on "
40 "another interface",
41 BooleanValue(true),
45 "DEPRECATED since ns-3.41. Use the StrongEndSystemModel attribute.")
46 .AddAttribute(
47 "StrongEndSystemModel",
48 "Reject packets for an address not configured on the interface they're "
49 "coming from (RFC1122, section 3.3.4.2).",
50 BooleanValue(false),
53#if 0
54 .AddAttribute ("MtuDiscover", "If enabled, every outgoing ip packet will have the DF flag set.",
55 BooleanValue (false),
59#endif
60 ;
62 return tid;
63}
64
66{
67 NS_LOG_FUNCTION(this);
68}
69
71{
72 NS_LOG_FUNCTION(this);
73}
74
75} // namespace ns3
virtual bool GetIpForward() const =0
Get the IP forwarding state.
virtual bool GetStrongEndSystemModel() const =0
Get the Strong End System Model status.
virtual void SetIpForward(bool forward)=0
Set or unset the IP forwarding state.
virtual void SetStrongEndSystemModel(bool model)=0
Set or unset the Strong End System Model.
Ipv4()
Definition ipv4.cc:65
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:25
~Ipv4() override
Definition ipv4.cc:70
A base class which provides memory management and object aggregation.
Definition object.h:78
a unique identifier for an interface.
Definition type-id.h:48
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Definition type-id.cc:1001
@ DEPRECATED
Attribute or trace source is deprecated; user is warned.
Definition type-id.h:64
virtual bool GetMtuDiscover() const =0
Get the MTU discover capability.
virtual void SetMtuDiscover(bool discover)=0
Set the MTU discover capability.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
Definition log.h:191
#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:35
#define NS_WARNING_POP
Pops the diagnostic warning list from the stack, restoring it to the previous state.
Definition warnings.h:102
#define NS_WARNING_PUSH_DEPRECATED
Save the current warning list and disables the ones about deprecated functions and classes.
Definition warnings.h:114
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< const AttributeChecker > MakeBooleanChecker()
Definition boolean.cc:113
Ptr< const AttributeAccessor > MakeBooleanAccessor(T1 a1)
Definition boolean.h:70