NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
ns3::ndn::StackHelper Class Reference

Helper class to install NDN stack and configure its parameters. More...

#include <ndn-stack-helper.hpp>

Inheritance diagram for ns3::ndn::StackHelper:
Collaboration diagram for ns3::ndn::StackHelper:

Public Types

typedef Callback< shared_ptr< NetDeviceFace >, Ptr< Node >, Ptr< L3Protocol >, Ptr< NetDevice > > NetDeviceFaceCreateCallback
 

Public Member Functions

 StackHelper ()
 Create a new NdnStackHelper with a default NDN_FLOODING forwarding stategy. More...
 
virtual ~StackHelper ()
 Destroy the NdnStackHelper. More...
 
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. More...
 
void setCsSize (size_t maxSize)
 Set maximum size for NFD's Content Store (in number of packets) More...
 
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. More...
 
void AddNetDeviceFaceCreateCallback (TypeId netDeviceType, NetDeviceFaceCreateCallback callback)
 Add callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice> More...
 
void UpdateNetDeviceFaceCreateCallback (TypeId netDeviceType, NetDeviceFaceCreateCallback callback)
 Update callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice> More...
 
void RemoveNetDeviceFaceCreateCallback (TypeId netDeviceType, NetDeviceFaceCreateCallback callback)
 Remove callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice> More...
 
Ptr< FaceContainerInstall (const std::string &nodeName) const
 Install Ndn stack on the node. More...
 
Ptr< FaceContainerInstall (Ptr< Node > node) const
 Install Ndn stack on the node. More...
 
Ptr< FaceContainerInstall (const NodeContainer &c) const
 Install Ndn stack on each node in the input container. More...
 
Ptr< FaceContainerInstallAll () const
 Install Ndn stack on all nodes in the simulation. More...
 
void SetDefaultRoutes (bool needSet)
 Set flag indicating necessity to install default routes in FIB. More...
 
void Update (Ptr< Node > node)
 Update Ndn stack on a given node (Add faces for new devices) More...
 
void Update (const NodeContainer &c)
 Update Ndn stack on given nodes (Add faces for new devices) More...
 
void Update (const std::string &nodeName)
 Update Ndn stack on a given node name (Add faces for new devices) More...
 
void UpdateAll ()
 Update Ndn stack on all the nodes (Add faces for new devices) More...
 
void disableRibManager ()
 Disable the RIB manager of NFD. More...
 
void disableFaceManager ()
 Disable Face Manager. More...
 
void disableStrategyChoiceManager ()
 Disable Strategy Choice Manager. More...
 
void disableStatusServer ()
 Disable Status Server. More...
 
void setCustomNdnCxxClocks ()
 

Static Public Member Functions

static KeyChain & getKeyChain ()
 

Detailed Description

Helper class to install NDN stack and configure its parameters.

Definition at line 51 of file ndn-stack-helper.hpp.

Member Typedef Documentation

typedef Callback<shared_ptr<NetDeviceFace>, Ptr<Node>, Ptr<L3Protocol>, Ptr<NetDevice> > ns3::ndn::StackHelper::NetDeviceFaceCreateCallback

Definition at line 92 of file ndn-stack-helper.hpp.

Constructor & Destructor Documentation

ns3::ndn::StackHelper::StackHelper ( )

Create a new NdnStackHelper with a default NDN_FLOODING forwarding stategy.

Definition at line 42 of file ndn-stack-helper.cpp.

References setCustomNdnCxxClocks().

ns3::ndn::StackHelper::~StackHelper ( )
virtual

Destroy the NdnStackHelper.

Definition at line 61 of file ndn-stack-helper.cpp.

Member Function Documentation

void ns3::ndn::StackHelper::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.

Definition at line 87 of file ndn-stack-helper.cpp.

void ns3::ndn::StackHelper::setCsSize ( size_t  maxSize)

Set maximum size for NFD's Content Store (in number of packets)

Definition at line 123 of file ndn-stack-helper.cpp.

void ns3::ndn::StackHelper::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.

Parameters
contentStoreClassstring, representing class of the content store
Note
ndnSIM 1.0 content store implementation have limited support for Interest selectors Do not use these implementations if your scenario relies on proper selector processing.

Definition at line 103 of file ndn-stack-helper.cpp.

void ns3::ndn::StackHelper::AddNetDeviceFaceCreateCallback ( TypeId  netDeviceType,
StackHelper::NetDeviceFaceCreateCallback  callback 
)

Add callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice>

It is possible to set up several callbacks for different NetDevice types.

If none of the callbacks fit the TypeId of NetDevice, a default callback is used (DefaultNetDeviceCallback)

Definition at line 197 of file ndn-stack-helper.cpp.

void ns3::ndn::StackHelper::UpdateNetDeviceFaceCreateCallback ( TypeId  netDeviceType,
NetDeviceFaceCreateCallback  callback 
)

Update callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice>

It is possible to set up several callbacks for different NetDevice types.

Using this method, it is possible to override Face creation for PointToPointNetDevices

Definition at line 204 of file ndn-stack-helper.cpp.

void ns3::ndn::StackHelper::RemoveNetDeviceFaceCreateCallback ( TypeId  netDeviceType,
NetDeviceFaceCreateCallback  callback 
)

Remove callback to create and configure instance of the face, based on supplied Ptr<Node> and Ptr<NetDevice>

Definition at line 216 of file ndn-stack-helper.cpp.

Ptr< FaceContainer > ns3::ndn::StackHelper::Install ( const std::string &  nodeName) const

Install Ndn stack on the node.

This method will assert if called on a node that already has Ndn object installed on it

Parameters
nodeNameThe name of the node on which to install the stack.
Returns
list of installed faces in the form of a smart pointer to NdnFaceContainer object

Definition at line 255 of file ndn-stack-helper.cpp.

Referenced by Install(), InstallAll(), and Update().

Ptr< FaceContainer > ns3::ndn::StackHelper::Install ( Ptr< Node >  node) const

Install Ndn stack on the node.

This method will assert if called on a node that already has Ndn object installed on it

Parameters
nodeThe node on which to install the stack.
Returns
list of installed faces in the form of a smart pointer to FaceContainer object

Definition at line 145 of file ndn-stack-helper.cpp.

References ns3::ndn::L3Protocol::getConfig().

Ptr< FaceContainer > ns3::ndn::StackHelper::Install ( const NodeContainer &  c) const

Install Ndn stack on each node in the input container.

The program will assert if this method is called on a container with a node that already has an ndn object aggregated to it.

Parameters
cNodeContainer that holds the set of nodes on which to install the new stacks.
Returns
list of installed faces in the form of a smart pointer to FaceContainer object

Definition at line 129 of file ndn-stack-helper.cpp.

References Install().

Ptr< FaceContainer > ns3::ndn::StackHelper::InstallAll ( ) const

Install Ndn stack on all nodes in the simulation.

Returns
list of installed faces in the form of a smart pointer to FaceContainer object

Definition at line 139 of file ndn-stack-helper.cpp.

References Install().

Referenced by ns3::ndn::ScenarioHelper::createTopology().

void ns3::ndn::StackHelper::SetDefaultRoutes ( bool  needSet)

Set flag indicating necessity to install default routes in FIB.

Definition at line 80 of file ndn-stack-helper.cpp.

KeyChain & ns3::ndn::StackHelper::getKeyChain ( )
static

Definition at line 66 of file ndn-stack-helper.cpp.

Referenced by ndn::Face::Face(), and ns3::ndn::IgnoreSections::operator()().

void ns3::ndn::StackHelper::Update ( Ptr< Node >  node)

Update Ndn stack on a given node (Add faces for new devices)

Parameters
nodeThe node on which to update the stack.

Definition at line 262 of file ndn-stack-helper.cpp.

References Install().

Referenced by Update(), and UpdateAll().

void ns3::ndn::StackHelper::Update ( const NodeContainer &  c)

Update Ndn stack on given nodes (Add faces for new devices)

Parameters
cThe nodes on which to update the stack.

Definition at line 282 of file ndn-stack-helper.cpp.

References Update().

void ns3::ndn::StackHelper::Update ( const std::string &  nodeName)

Update Ndn stack on a given node name (Add faces for new devices)

Parameters
nodeNameThe name of the node on which to update the stack.

Definition at line 290 of file ndn-stack-helper.cpp.

References Update().

void ns3::ndn::StackHelper::UpdateAll ( )

Update Ndn stack on all the nodes (Add faces for new devices)

Definition at line 297 of file ndn-stack-helper.cpp.

References ns3::ndn::FibHelper::AddRoute(), and Update().

void ns3::ndn::StackHelper::disableRibManager ( )

Disable the RIB manager of NFD.

Definition at line 328 of file ndn-stack-helper.cpp.

Referenced by ns3::ndn::ScenarioHelper::disableRibManager().

void ns3::ndn::StackHelper::disableFaceManager ( )

Disable Face Manager.

Definition at line 334 of file ndn-stack-helper.cpp.

Referenced by ns3::ndn::ScenarioHelper::disableFaceManager().

void ns3::ndn::StackHelper::disableStrategyChoiceManager ( )

Disable Strategy Choice Manager.

Definition at line 340 of file ndn-stack-helper.cpp.

Referenced by ns3::ndn::ScenarioHelper::disableStrategyChoiceManager().

void ns3::ndn::StackHelper::disableStatusServer ( )

Disable Status Server.

Definition at line 346 of file ndn-stack-helper.cpp.

Referenced by ns3::ndn::ScenarioHelper::disableStatusServer().

void ns3::ndn::StackHelper::setCustomNdnCxxClocks ( )

Definition at line 73 of file ndn-stack-helper.cpp.

References ndn::time::setCustomClocks().

Referenced by StackHelper().


The documentation for this class was generated from the following files: