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" 73 const std::string& attr2 =
"",
const std::string& value2 =
"",
74 const std::string& attr3 =
"",
const std::string& value3 =
"",
75 const std::string& attr4 =
"",
const std::string& value4 =
"");
96 SetOldContentStore(
const std::string& contentStoreClass,
const std::string& attr1 =
"",
97 const std::string& value1 =
"",
const std::string& attr2 =
"",
98 const std::string& value2 =
"",
const std::string& attr3 =
"",
99 const std::string& value3 =
"",
const std::string& attr4 =
"",
100 const std::string& value4 =
"");
102 typedef Callback<shared_ptr<Face>, Ptr<Node>, Ptr<L3Protocol>, Ptr<NetDevice>>
147 Install(
const std::string& nodeName)
const;
176 Install(
const NodeContainer& c)
const;
210 Update(
const NodeContainer& c);
218 Update(
const std::string& nodeName);
253 DefaultNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol>
ndn, Ptr<NetDevice> netDevice)
const;
256 PointToPointNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol>
ndn,
257 Ptr<NetDevice> netDevice)
const;
259 createAndRegisterFace(Ptr<Node> node, Ptr<L3Protocol>
ndn, Ptr<NetDevice> device)
const;
261 bool m_isRibManagerDisabled;
263 bool m_isForwarderStatusManagerDisabled;
264 bool m_isStrategyChoiceManagerDisabled;
271 ObjectFactory m_ndnFactory;
272 ObjectFactory m_contentStoreFactory;
274 bool m_needSetDefaultRoutes;
277 typedef std::function<std::unique_ptr<nfd::cs::Policy>()> PolicyCreationCallback;
278 PolicyCreationCallback m_csPolicyCreationFunc;
280 std::map<std::string, PolicyCreationCallback> m_csPolicies;
282 typedef std::list<std::pair<TypeId, FaceCreateCallback>> NetDeviceCallbackList;
283 NetDeviceCallbackList m_netDeviceCallbacks;
289 #endif // NDNSIM_HELPER_NDN_STACK_HELPER_HPP virtual ~StackHelper()
Destroy the NdnStackHelper.
Copyright (c) 2011-2015 Regents of the University of California.
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.
void RemoveFaceCreateCallback(TypeId netDeviceType, FaceCreateCallback callback)
Remove callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<Net...
void setCsSize(size_t maxSize)
Set maximum size for NFD's Content Store (in number of packets)
void SetDefaultRoutes(bool needSet)
Set flag indicating necessity to install default routes in FIB.
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 disableForwarderStatusManager()
Disable Forwarder Status Manager.
void setCustomNdnCxxClocks()
Ptr< FaceContainer > Install(const std::string &nodeName) const
Install Ndn stack on the node.
Copyright (c) 2011-2015 Regents of the University of California.
Callback< shared_ptr< Face >, Ptr< Node >, Ptr< L3Protocol >, Ptr< NetDevice > > FaceCreateCallback
Helper class to install NDN stack and configure its parameters.
Copyright (c) 2011-2015 Regents of the University of California.
void AddFaceCreateCallback(TypeId netDeviceType, FaceCreateCallback callback)
Add callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDev...
void disableRibManager()
Disable the RIB manager of NFD.
ndn L3Protocol
Copyright (c) 2011-2015 Regents of the University of California.
void SetOldContentStore(const std::string &contentStoreClass, 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 ndnSIM 1.0 content store implementation and its attributes.
Ptr< FaceContainer > InstallAll() const
Install Ndn stack on all nodes in the simulation.
void UpdateAll()
Update Ndn stack on all the nodes (Add faces for new devices)
static KeyChain & getKeyChain()
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 Update(Ptr< Node > node)
Update Ndn stack on a given node (Add faces for new devices)
void disableStrategyChoiceManager()
Disable Face Manager.