A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
dsdv-helper.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2010 Hemanth Narra
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 * Authors: Hemanth Narra <hemanth@ittc.ku.com>, written after OlsrHelper by Mathieu Lacage
18 * <mathieu.lacage@sophia.inria.fr>
19 *
20 * James P.G. Sterbenz <jpgs@ittc.ku.edu>, director
21 * ResiliNets Research Group https://resilinets.org/
22 * Information and Telecommunication Technology Center (ITTC)
23 * and Department of Electrical Engineering and Computer Science
24 * The University of Kansas Lawrence, KS USA.
25 *
26 * Work supported in part by NSF FIND (Future Internet Design) Program
27 * under grant CNS-0626918 (Postmodern Internet Architecture),
28 * NSF grant CNS-1050226 (Multilayer Network Resilience Analysis and Experimentation on GENI),
29 * US Department of Defense (DoD), and ITTC at The University of Kansas.
30 */
31
32#ifndef DSDV_HELPER_H
33#define DSDV_HELPER_H
34
35#include "ns3/ipv4-routing-helper.h"
36#include "ns3/node-container.h"
37#include "ns3/node.h"
38#include "ns3/object-factory.h"
39
40namespace ns3
41{
42/**
43 * \ingroup dsdv
44 * \brief Helper class that adds DSDV routing to nodes.
45 */
47{
48 public:
49 DsdvHelper();
50 ~DsdvHelper() override;
51 /**
52 * \returns pointer to clone of this DsdvHelper
53 *
54 * This method is mainly for internal use by the other helpers;
55 * clients are expected to free the dynamic memory allocated by this method
56 */
57 DsdvHelper* Copy() const override;
58
59 /**
60 * \param node the node on which the routing protocol will run
61 * \returns a newly-created routing protocol
62 *
63 * This method will be called by ns3::InternetStackHelper::Install
64 *
65 */
66 Ptr<Ipv4RoutingProtocol> Create(Ptr<Node> node) const override;
67 /**
68 * \param name the name of the attribute to set
69 * \param value the value of the attribute to set.
70 *
71 * This method controls the attributes of ns3::dsdv::RoutingProtocol
72 */
73 void Set(std::string name, const AttributeValue& value);
74
75 private:
76 ObjectFactory m_agentFactory; //!< Object factory
77};
78
79} // namespace ns3
80
81#endif /* DSDV_HELPER_H */
Hold a value for an Attribute.
Definition: attribute.h:70
Helper class that adds DSDV routing to nodes.
Definition: dsdv-helper.h:47
ObjectFactory m_agentFactory
Object factory.
Definition: dsdv-helper.h:76
DsdvHelper * Copy() const override
Definition: dsdv-helper.cc:51
void Set(std::string name, const AttributeValue &value)
Definition: dsdv-helper.cc:65
~DsdvHelper() override
Definition: dsdv-helper.cc:40
Ptr< Ipv4RoutingProtocol > Create(Ptr< Node > node) const override
Definition: dsdv-helper.cc:57
a factory to create ns3::Ipv4RoutingProtocol objects
Instantiate subclasses of ns3::Object.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:77
Every class exported by the ns3 library is enclosed in the ns3 namespace.