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
dsr-helper.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2011 Yufei Cheng
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Author: Yufei Cheng <yfcheng@ittc.ku.edu>
7
*
8
* James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
9
* ResiliNets Research Group https://resilinets.org/
10
* Information and Telecommunication Technology Center (ITTC)
11
* and Department of Electrical Engineering and Computer Science
12
* The University of Kansas Lawrence, KS USA.
13
*
14
* Work supported in part by NSF FIND (Future Internet Design) Program
15
* under grant CNS-0626918 (Postmodern Internet Architecture),
16
* NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
17
* US Department of Defense (DoD), and ITTC at The University of Kansas.
18
*/
19
20
#ifndef DSR_HELPER_H
21
#define DSR_HELPER_H
22
23
#include "ns3/dsr-routing.h"
24
#include "ns3/icmpv4-l4-protocol.h"
25
#include "ns3/node-container.h"
26
#include "ns3/node.h"
27
#include "ns3/object-factory.h"
28
#include "ns3/tcp-l4-protocol.h"
29
#include "ns3/udp-l4-protocol.h"
30
31
namespace
ns3
32
{
33
34
/**
35
* @ingroup dsr
36
*
37
* @brief DSR helper class to manage creation of DSR routing instance and
38
* to insert it on a node as a sublayer between transport and
39
* IP layers.
40
*/
41
class
DsrHelper
42
{
43
public
:
44
/**
45
* Create an DsrHelper that makes life easier for people who want to install
46
* Dsr routing to nodes.
47
*/
48
DsrHelper
();
49
~DsrHelper
();
50
51
// Delete assignment operator to avoid misuse
52
DsrHelper
&
operator=
(
const
DsrHelper
&) =
delete
;
53
54
/**
55
* @brief Construct an DsrHelper from another previously initialized instance
56
* (Copy Constructor).
57
* @param o object to copy from
58
*/
59
DsrHelper
(
const
DsrHelper
& o);
60
/**
61
* @returns pointer to clone of this DsrHelper
62
*
63
* This method is mainly for internal use by the other helpers;
64
* clients are expected to free the dynamic memory allocated by this method
65
*/
66
DsrHelper
*
Copy
()
const
;
67
/**
68
* @param node the node on which the routing protocol will run
69
* @returns a newly-created L4 protocol
70
*/
71
Ptr<ns3::dsr::DsrRouting>
Create
(
Ptr<Node>
node)
const
;
72
/**
73
* Set attribute values for future instances of DSR that this helper creates
74
* @param name the node on which the routing protocol will run
75
* @param value newly-created L4 protocol
76
*/
77
void
Set
(std::string name,
const
AttributeValue
& value);
78
79
private
:
80
ObjectFactory
m_agentFactory
;
///< DSR factory
81
};
82
83
}
// namespace ns3
84
85
#endif
// DSR_HELPER_H
ns3::AttributeValue
Hold a value for an Attribute.
Definition
attribute.h:59
ns3::DsrHelper
DSR helper class to manage creation of DSR routing instance and to insert it on a node as a sublayer ...
Definition
dsr-helper.h:42
ns3::DsrHelper::m_agentFactory
ObjectFactory m_agentFactory
DSR factory.
Definition
dsr-helper.h:80
ns3::DsrHelper::~DsrHelper
~DsrHelper()
Definition
dsr-helper.cc:52
ns3::DsrHelper::Copy
DsrHelper * Copy() const
Definition
dsr-helper.cc:58
ns3::DsrHelper::Create
Ptr< ns3::dsr::DsrRouting > Create(Ptr< Node > node) const
Definition
dsr-helper.cc:65
ns3::DsrHelper::operator=
DsrHelper & operator=(const DsrHelper &)=delete
ns3::DsrHelper::DsrHelper
DsrHelper()
Create an DsrHelper that makes life easier for people who want to install Dsr routing to nodes.
Definition
dsr-helper.cc:40
ns3::DsrHelper::Set
void Set(std::string name, const AttributeValue &value)
Set attribute values for future instances of DSR that this helper creates.
Definition
dsr-helper.cc:82
ns3::ObjectFactory
Instantiate subclasses of ns3::Object.
Definition
object-factory.h:37
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
dsr
helper
dsr-helper.h
Generated on Wed Dec 4 2024 09:20:40 for ns-3 by
1.11.0