|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
20 #ifndef NDNSIM_HELPER_NDN_STACK_HELPER_HPP
21 #define NDNSIM_HELPER_NDN_STACK_HELPER_HPP
23 #include "ns3/ndnSIM/model/ndn-common.hpp"
26 #include "ns3/object-factory.h"
28 #include "ns3/node-container.h"
72 const std::string& attr2 =
"",
const std::string& value2 =
"",
73 const std::string& attr3 =
"",
const std::string& value3 =
"",
74 const std::string& attr4 =
"",
const std::string& value4 =
"");
88 typedef Callback<shared_ptr<Face>, Ptr<Node>, Ptr<L3Protocol>, Ptr<NetDevice>>
133 Install(
const std::string& nodeName)
const;
162 Install(
const NodeContainer& c)
const;
196 Update(
const NodeContainer& c);
204 Update(
const std::string& nodeName);
235 doInstall(Ptr<Node> node)
const;
239 DefaultNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol>
ndn, Ptr<NetDevice> netDevice)
const;
242 PointToPointNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol>
ndn,
243 Ptr<NetDevice> netDevice)
const;
245 createAndRegisterFace(Ptr<Node> node, Ptr<L3Protocol>
ndn, Ptr<NetDevice> device)
const;
247 bool m_isForwarderStatusManagerDisabled;
248 bool m_isStrategyChoiceManagerDisabled;
255 ObjectFactory m_ndnFactory;
257 bool m_needSetDefaultRoutes;
258 size_t m_maxCsSize = 100;
260 typedef std::function<std::unique_ptr<nfd::cs::Policy>()> PolicyCreationCallback;
261 PolicyCreationCallback m_csPolicyCreationFunc;
263 std::map<std::string, PolicyCreationCallback> m_csPolicies;
265 typedef std::list<std::pair<TypeId, FaceCreateCallback>> NetDeviceCallbackList;
266 NetDeviceCallbackList m_netDeviceCallbacks;
272 #endif // NDNSIM_HELPER_NDN_STACK_HELPER_HPP
void setPolicy(const std::string &policy)
Set the cache replacement policy for NFD's Content Store.
StackHelper()
Create a new NdnStackHelper with a default NDN_FLOODING forwarding stategy.
Copyright (c) 2011-2015 Regents of the University of California.
void disableStrategyChoiceManager()
Disable Strategy Choice Manager.
void disableForwarderStatusManager()
Disable Forwarder Status Manager.
void Install(const std::string &nodeName) const
Install Ndn stack on the node.
static void SetLinkDelayAsFaceMetric()
Set face metric of all faces connected through PointToPoint channel to channel latency.
void SetDefaultRoutes(bool needSet)
Set flag indicating necessity to install default routes in FIB.
void InstallAll() const
Install Ndn stack on all nodes in the simulation.
void AddFaceCreateCallback(TypeId netDeviceType, FaceCreateCallback callback)
Add callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDev...
Copyright (c) 2011-2015 Regents of the University of California.
void setCsSize(size_t maxSize)
Set maximum size for NFD's Content Store (in number of packets)
void UpdateFaceCreateCallback(TypeId netDeviceType, FaceCreateCallback callback)
Update callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<Net...
void SetStackAttributes(const std::string &attr1="", const std::string &value1="", const std::string &attr2="", const std::string &value2="", const std::string &attr3="", const std::string &value3="", const std::string &attr4="", const std::string &value4="")
Set parameters of NdnL3Protocol.
void RemoveFaceCreateCallback(TypeId netDeviceType, FaceCreateCallback callback)
Remove callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<Net...
Callback< shared_ptr< Face >, Ptr< Node >, Ptr< L3Protocol >, Ptr< NetDevice > > FaceCreateCallback
Helper class to install NDN stack and configure its parameters.
void UpdateAll()
Update Ndn stack on all the nodes (Add faces for new devices)
static void ProcessWarmupEvents()
virtual ~StackHelper()
Destroy the NdnStackHelper.
void Update(Ptr< Node > node)
Update Ndn stack on a given node (Add faces for new devices)
static KeyChain & getKeyChain()
Copyright (c) 2011-2015 Regents of the University of California.
ndn L3Protocol
Copyright (c) 2011-2015 Regents of the University of California.
void setCustomNdnCxxClocks()