20 #ifndef NDN_STACK_HELPER_H 21 #define NDN_STACK_HELPER_H 23 #include "ns3/ndnSIM/model/ndn-common.hpp" 26 #include "ns3/object-factory.h" 28 #include "ns3/node-container.h" 68 const std::string& attr2 =
"",
const std::string& value2 =
"",
69 const std::string& attr3 =
"",
const std::string& value3 =
"",
70 const std::string& attr4 =
"",
const std::string& value4 =
"");
85 SetOldContentStore(
const std::string& contentStoreClass,
const std::string& attr1 =
"",
86 const std::string& value1 =
"",
const std::string& attr2 =
"",
87 const std::string& value2 =
"",
const std::string& attr3 =
"",
88 const std::string& value3 =
"",
const std::string& attr4 =
"",
89 const std::string& value4 =
"");
91 typedef Callback<shared_ptr<NetDeviceFace>, Ptr<Node>, Ptr<L3Protocol>, Ptr<NetDevice>>
136 Install(
const std::string& nodeName)
const;
165 Install(
const NodeContainer& c)
const;
199 Update(
const NodeContainer& c);
207 Update(
const std::string& nodeName);
240 shared_ptr<NetDeviceFace>
241 DefaultNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol>
ndn, Ptr<NetDevice> netDevice)
const;
243 shared_ptr<NetDeviceFace>
244 PointToPointNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol>
ndn,
245 Ptr<NetDevice> netDevice)
const;
246 shared_ptr<NetDeviceFace>
247 createAndRegisterFace(Ptr<Node> node, Ptr<L3Protocol>
ndn, Ptr<NetDevice> device)
const;
249 bool m_isRibManagerDisabled;
250 bool m_isFaceManagerDisabled;
251 bool m_isStatusServerDisabled;
252 bool m_isStrategyChoiceManagerDisabled;
259 ObjectFactory m_ndnFactory;
260 ObjectFactory m_contentStoreFactory;
262 bool m_needSetDefaultRoutes;
265 typedef std::list<std::pair<TypeId, NetDeviceFaceCreateCallback>> NetDeviceCallbackList;
266 NetDeviceCallbackList m_netDeviceCallbacks;
void AddNetDeviceFaceCreateCallback(TypeId netDeviceType, NetDeviceFaceCreateCallback callback)
Add callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDev...
void UpdateNetDeviceFaceCreateCallback(TypeId netDeviceType, NetDeviceFaceCreateCallback callback)
Update callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<Net...
virtual ~StackHelper()
Destroy the NdnStackHelper.
Copyright (c) 2011-2015 Regents of the University of California.
Ptr< FaceContainer > Install(const std::string &nodeName) const
Install Ndn stack on the node.
StackHelper()
Create a new NdnStackHelper with a default NDN_FLOODING forwarding stategy.
ndn NetDeviceFace
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 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 RemoveNetDeviceFaceCreateCallback(TypeId netDeviceType, NetDeviceFaceCreateCallback callback)
Remove callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<Net...
void setCustomNdnCxxClocks()
Callback< shared_ptr< NetDeviceFace >, Ptr< Node >, Ptr< L3Protocol >, Ptr< NetDevice > > NetDeviceFaceCreateCallback
void disableFaceManager()
Disable Face Manager.
Ptr< FaceContainer > InstallAll() const
Install Ndn stack on all nodes in the simulation.
Helper class to install NDN stack and configure its parameters.
Copyright (c) 2011-2015 Regents of the University of California.
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.
void disableStatusServer()
Disable Status Server.
void UpdateAll()
Update Ndn stack on all the nodes (Add faces for new devices)
static KeyChain & getKeyChain()
void Update(Ptr< Node > node)
Update Ndn stack on a given node (Add faces for new devices)
void disableStrategyChoiceManager()
Disable Strategy Choice Manager.