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