Implementation network-layer of NDN stack. More...
#include <ndn-l3-protocol.hpp>
Classes | |
class | Impl |
Public Types | |
typedef std::function< std::unique_ptr< nfd::cs::Policy >)> | PolicyCreationCallback |
typedef void(* | InterestTraceCallback) (const Interest &, const Face &) |
typedef void(* | DataTraceCallback) (const Data &, const Face &) |
typedef void(* | SatisfiedInterestsCallback) (const nfd::pit::Entry &pitEntry, const Face &inFace, const Data &data) |
typedef void(* | TimedOutInterestsCallback) (const nfd::pit::Entry &pitEntry) |
Public Member Functions | |
L3Protocol () | |
Default constructor. More... | |
virtual | ~L3Protocol () |
shared_ptr< nfd::Forwarder > | getForwarder () |
Get smart pointer to nfd::Forwarder installed on the node. More... | |
nfd::FaceTable & | getFaceTable () |
shared_ptr< nfd::FibManager > | getFibManager () |
Get smart pointer to nfd::FibManager, used by node's NFD. More... | |
nfd::StrategyChoiceManager & | getStrategyChoiceManager () |
Get nfd::StrategyChoiceManager, used by node's NFD. More... | |
::nfd::rib::Service & | getRibService () |
nfd::FaceId | addFace (shared_ptr< Face > face) |
Add face to NDN stack. More... | |
shared_ptr< Face > | getFaceById (nfd::FaceId face) const |
Get face by face ID. More... | |
shared_ptr< Face > | getFaceByNetDevice (Ptr< NetDevice > netDevice) const |
Get face for NetDevice. More... | |
nfd::ConfigSection & | getConfig () |
Get NFD config (boost::property_tree) More... | |
void | injectInterest (const Interest &interest) |
Inject interest through internal Face. More... | |
void | setCsReplacementPolicy (const PolicyCreationCallback &policy) |
Set the replacement policy of NFD's CS. More... | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Interface ID. More... | |
static Ptr< L3Protocol > | getL3Protocol (Ptr< Object > node) |
Static Public Attributes | |
static const uint16_t | ETHERNET_FRAME_TYPE = 0x7777 |
Ethernet Frame Type of Ndn. More... | |
static const uint16_t | IP_STACK_PORT = 9695 |
TCP/UDP port for NDN stack. More... | |
Protected Member Functions | |
virtual void | DoDispose (void) |
Do cleanup. More... | |
virtual void | NotifyNewAggregate () |
This function will notify other components connected to the node that a new stack member is now connected This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together. More... | |
Implementation network-layer of NDN stack.
This class defines the API to manipulate the following aspects of the NDN stack implementation:
Each Face-derived object has conceptually a single NDN interface associated with it.
In addition, this class defines NDN packet coding constants
Definition at line 81 of file ndn-l3-protocol.hpp.
typedef std::function<std::unique_ptr<nfd::cs::Policy>)> ns3::ndn::L3Protocol::PolicyCreationCallback |
Definition at line 169 of file ndn-l3-protocol.hpp.
typedef void(* ns3::ndn::L3Protocol::InterestTraceCallback) (const Interest &, const Face &) |
Definition at line 182 of file ndn-l3-protocol.hpp.
typedef void(* ns3::ndn::L3Protocol::DataTraceCallback) (const Data &, const Face &) |
Definition at line 183 of file ndn-l3-protocol.hpp.
typedef void(* ns3::ndn::L3Protocol::SatisfiedInterestsCallback) (const nfd::pit::Entry &pitEntry, const Face &inFace, const Data &data) |
Definition at line 185 of file ndn-l3-protocol.hpp.
typedef void(* ns3::ndn::L3Protocol::TimedOutInterestsCallback) (const nfd::pit::Entry &pitEntry) |
Definition at line 186 of file ndn-l3-protocol.hpp.
ns3::ndn::L3Protocol::L3Protocol | ( | ) |
Default constructor.
Creates an empty stack without forwarding strategy set
Definition at line 199 of file ndn-l3-protocol.cpp.
|
virtual |
Definition at line 205 of file ndn-l3-protocol.cpp.
|
static |
shared_ptr< nfd::Forwarder > ns3::ndn::L3Protocol::getForwarder | ( | ) |
Get smart pointer to nfd::Forwarder installed on the node.
Definition at line 328 of file ndn-l3-protocol.cpp.
Referenced by ns3::ndn::GlobalRoutingHelper::CalculateAllPossibleRoutes(), ns3::ndn::GlobalRoutingHelper::CalculateRoutes(), and ns3::ndn::FibHelper::RemoveRoute().
nfd::FaceTable & ns3::ndn::L3Protocol::getFaceTable | ( | ) |
Definition at line 334 of file ndn-l3-protocol.cpp.
shared_ptr< nfd::FibManager > ns3::ndn::L3Protocol::getFibManager | ( | ) |
Get smart pointer to nfd::FibManager, used by node's NFD.
Definition at line 340 of file ndn-l3-protocol.cpp.
nfd::StrategyChoiceManager & ns3::ndn::L3Protocol::getStrategyChoiceManager | ( | ) |
Get nfd::StrategyChoiceManager, used by node's NFD.
Definition at line 346 of file ndn-l3-protocol.cpp.
nfd::rib::Service & ns3::ndn::L3Protocol::getRibService | ( | ) |
Definition at line 352 of file ndn-l3-protocol.cpp.
Referenced by nfd::rib::Service::get().
nfd::FaceId ns3::ndn::L3Protocol::addFace | ( | shared_ptr< Face > | face | ) |
Add face to NDN stack.
face | smart pointer to Face-derived object (AppFace, NetDeviceFace) |
Definition at line 396 of file ndn-l3-protocol.cpp.
References ndn::tlv::Data, and ndn::tlv::Interest.
shared_ptr< Face > ns3::ndn::L3Protocol::getFaceById | ( | nfd::FaceId | face | ) | const |
Get face by face ID.
face | The face ID number |
Definition at line 453 of file ndn-l3-protocol.cpp.
shared_ptr< Face > ns3::ndn::L3Protocol::getFaceByNetDevice | ( | Ptr< NetDevice > | netDevice | ) | const |
Get face for NetDevice.
Definition at line 459 of file ndn-l3-protocol.cpp.
nfd::ConfigSection & ns3::ndn::L3Protocol::getConfig | ( | ) |
Get NFD config (boost::property_tree)
Definition at line 358 of file ndn-l3-protocol.cpp.
void ns3::ndn::L3Protocol::injectInterest | ( | const Interest & | interest | ) |
Inject interest through internal Face.
Definition at line 246 of file ndn-l3-protocol.cpp.
void ns3::ndn::L3Protocol::setCsReplacementPolicy | ( | const PolicyCreationCallback & | policy | ) |
Set the replacement policy of NFD's CS.
Definition at line 252 of file ndn-l3-protocol.cpp.
|
static |
Definition at line 473 of file ndn-l3-protocol.cpp.
|
protectedvirtual |
Do cleanup.
Definition at line 381 of file ndn-l3-protocol.cpp.
References nfd::resetGlobalScheduler().
|
protectedvirtual |
This function will notify other components connected to the node that a new stack member is now connected This will be used to notify Layer 3 protocol of layer 4 protocol stack to connect them together.
Definition at line 368 of file ndn-l3-protocol.cpp.
|
static |
Ethernet Frame Type of Ndn.
Definition at line 91 of file ndn-l3-protocol.hpp.
Referenced by ns3::ndn::NetDeviceTransport::NetDeviceTransport().
|
static |
TCP/UDP port for NDN stack.
Definition at line 92 of file ndn-l3-protocol.hpp.