NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ndn-stack-helper.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
20
#ifndef NDN_STACK_HELPER_H
21
#define NDN_STACK_HELPER_H
22
23
#include "ns3/ndnSIM/model/ndn-common.hpp"
24
25
#include "ns3/ptr.h"
26
#include "ns3/object-factory.h"
27
#include "ns3/node.h"
28
#include "ns3/node-container.h"
29
30
#include "
ndn-face-container.hpp
"
31
#include "
ndn-fib-helper.hpp
"
32
#include "
ndn-strategy-choice-helper.hpp
"
33
34
namespace
ns3 {
35
36
class
Node;
37
38
namespace
ndn {
39
40
class
NetDeviceFace
;
41
class
L3Protocol
;
42
51
class
StackHelper
: boost::noncopyable {
52
public
:
56
StackHelper
();
57
61
virtual
~StackHelper
();
62
66
void
67
SetStackAttributes
(
const
std::string& attr1 =
""
,
const
std::string& value1 =
""
,
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 =
""
);
71
75
void
76
setCsSize
(
size_t
maxSize);
77
84
void
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 =
""
);
90
91
typedef
Callback<shared_ptr<NetDeviceFace>, Ptr<Node>, Ptr<L3Protocol>, Ptr<NetDevice>>
92
NetDeviceFaceCreateCallback
;
93
103
void
104
AddNetDeviceFaceCreateCallback
(TypeId netDeviceType,
NetDeviceFaceCreateCallback
callback);
105
114
void
115
UpdateNetDeviceFaceCreateCallback
(TypeId netDeviceType,
NetDeviceFaceCreateCallback
callback);
116
121
void
122
RemoveNetDeviceFaceCreateCallback
(TypeId netDeviceType,
NetDeviceFaceCreateCallback
callback);
123
135
Ptr<FaceContainer>
136
Install
(
const
std::string& nodeName)
const
;
137
149
Ptr<FaceContainer>
150
Install
(Ptr<Node> node)
const
;
151
164
Ptr<FaceContainer>
165
Install
(
const
NodeContainer& c)
const
;
166
173
Ptr<FaceContainer>
174
InstallAll
()
const
;
175
179
void
180
SetDefaultRoutes
(
bool
needSet);
181
182
static
KeyChain&
183
getKeyChain
();
184
185
private
:
186
shared_ptr<NetDeviceFace>
187
DefaultNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol> ndn, Ptr<NetDevice> netDevice)
const
;
188
189
shared_ptr<NetDeviceFace>
190
PointToPointNetDeviceCallback(Ptr<Node> node, Ptr<L3Protocol> ndn,
191
Ptr<NetDevice> netDevice)
const
;
192
193
public
:
194
void
195
setCustomNdnCxxClocks
();
196
197
private
:
198
ObjectFactory m_ndnFactory;
199
ObjectFactory m_contentStoreFactory;
200
201
bool
m_needSetDefaultRoutes;
202
size_t
m_maxCsSize;
203
204
typedef
std::list<std::pair<TypeId, NetDeviceFaceCreateCallback>> NetDeviceCallbackList;
205
NetDeviceCallbackList m_netDeviceCallbacks;
206
};
207
208
}
// namespace ndn
209
}
// namespace ns3
210
211
#endif
/* NDN_STACK_HELPER_H */
ns3::ndn::StackHelper::AddNetDeviceFaceCreateCallback
void AddNetDeviceFaceCreateCallback(TypeId netDeviceType, NetDeviceFaceCreateCallback callback)
Add callback to create and configure instance of the face, based on supplied Ptr
and Ptr
Definition:
ndn-stack-helper.cpp:200
ns3::ndn::StackHelper::UpdateNetDeviceFaceCreateCallback
void UpdateNetDeviceFaceCreateCallback(TypeId netDeviceType, NetDeviceFaceCreateCallback callback)
Update callback to create and configure instance of the face, based on supplied Ptr
and Ptr
Definition:
ndn-stack-helper.cpp:207
ns3::ndn::StackHelper::~StackHelper
virtual ~StackHelper()
Destroy the NdnStackHelper.
Definition:
ndn-stack-helper.cpp:57
ns3::ndn::StackHelper::Install
Ptr< FaceContainer > Install(const std::string &nodeName) const
Install Ndn stack on the node.
Definition:
ndn-stack-helper.cpp:258
ns3::ndn::StackHelper::StackHelper
StackHelper()
Create a new NdnStackHelper with a default NDN_FLOODING forwarding stategy.
Definition:
ndn-stack-helper.cpp:42
NetDeviceFace
ndn NetDeviceFace
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-net-device-face.cpp:37
ns3::ndn::StackHelper::setCsSize
void setCsSize(size_t maxSize)
Set maximum size for NFD's Content Store (in number of packets)
Definition:
ndn-stack-helper.cpp:119
ns3::ndn::StackHelper::SetDefaultRoutes
void SetDefaultRoutes(bool needSet)
Set flag indicating necessity to install default routes in FIB.
Definition:
ndn-stack-helper.cpp:76
ns3::ndn::StackHelper::SetStackAttributes
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.
Definition:
ndn-stack-helper.cpp:83
ns3::ndn::StackHelper::RemoveNetDeviceFaceCreateCallback
void RemoveNetDeviceFaceCreateCallback(TypeId netDeviceType, NetDeviceFaceCreateCallback callback)
Remove callback to create and configure instance of the face, based on supplied Ptr
and Ptr
Definition:
ndn-stack-helper.cpp:219
ndn-fib-helper.hpp
ndn-face-container.hpp
ns3::ndn::StackHelper::setCustomNdnCxxClocks
void setCustomNdnCxxClocks()
Definition:
ndn-stack-helper.cpp:69
ns3::ndn::StackHelper::NetDeviceFaceCreateCallback
Callback< shared_ptr< NetDeviceFace >, Ptr< Node >, Ptr< L3Protocol >, Ptr< NetDevice > > NetDeviceFaceCreateCallback
Definition:
ndn-stack-helper.hpp:92
ns3::ndn::StackHelper::InstallAll
Ptr< FaceContainer > InstallAll() const
Install Ndn stack on all nodes in the simulation.
Definition:
ndn-stack-helper.cpp:135
ndn-strategy-choice-helper.hpp
ns3::ndn::StackHelper
Helper class to install NDN stack and configure its parameters.
Definition:
ndn-stack-helper.hpp:51
L3Protocol
ndn L3Protocol
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-l3-protocol.cpp:53
ns3::ndn::StackHelper::SetOldContentStore
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.
Definition:
ndn-stack-helper.cpp:99
ns3::ndn::StackHelper::getKeyChain
static KeyChain & getKeyChain()
Definition:
ndn-stack-helper.cpp:62
ndnSIM
helper
ndn-stack-helper.hpp
Generated on Wed Feb 18 2015 16:31:16 for ndnSIM by
1.8.7