NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd Namespace Reference

Copyright (c) 2011-2015 Regents of the University of California. More...

Namespaces

 cs
 
 fib
 
 fw
 
 general
 
 measurements
 
 name_tree
 
 ndnlp
 
 pit
 
 rib
 
 scheduler
 
 strategy_choice
 
 tcp
 
 tlv
 
 udp
 
 unix_stream
 
 websocket
 

Classes

class  AppFace
 
class  ByteCounter
 represents a counter of number of bytes More...
 
class  Channel
 
class  ChannelStatusPublisher
 
class  CommandValidator
 
class  ConfigFile
 
class  DatagramFace
 
class  DeadNonceList
 represents the Dead Nonce list More...
 
class  EthernetFace
 Implementation of Face abstraction that uses raw Ethernet frames as underlying transport mechanism. More...
 
class  EthernetFactory
 
class  Face
 represents a face More...
 
class  FaceCounters
 contains counters on face More...
 
class  FaceManager
 
class  FaceQueryStatusPublisher
 
class  FaceStatusPublisher
 
class  FaceTable
 container of all Faces More...
 
class  Fib
 represents the FIB More...
 
class  FibEnumerationPublisher
 
class  FibManager
 
class  Forwarder
 main class of NFD More...
 
class  ForwarderCounters
 contains counters on forwarder More...
 
class  InternalFace
 
class  LinkLayerCounters
 contains link layer byte counters More...
 
class  LocalFace
 represents a face More...
 
class  ManagerBase
 
class  Measurements
 represents the Measurements table More...
 
class  MeasurementsAccessor
 allows Strategy to access portion of Measurements table under its namespace More...
 
struct  Multicast
 
class  MulticastUdpFace
 Implementation of Face abstraction that uses multicast UDP as underlying transport mechanism. More...
 
class  NameTree
 Class Name Tree. More...
 
class  Network
 
class  NetworkInterfaceInfo
 contains information about a network interface More...
 
class  NetworkLayerCounters
 contains network layer packet counters More...
 
class  Nfd
 Class representing NFD instance This class can be used to initialize all components of NFD. More...
 
class  NfdRunner
 Executes NFD with RIB manager. More...
 
class  NotificationStream
 provides a publisher of Notification Stream More...
 
class  NullFace
 a Face that has no underlying transport and drops every packet More...
 
class  PacketCounter
 represents a counter of number of packets More...
 
class  Pit
 represents the Interest Table More...
 
class  PrivilegeHelper
 
class  ProtocolFactory
 
class  RttEstimator
 implements the Mean-Deviation RTT estimator More...
 
class  SegmentPublisher
 provides a publisher of Status Dataset or other segmented octet stream More...
 
class  StatusServer
 
class  StrategyChoice
 represents the Strategy Choice table More...
 
class  StrategyChoiceManager
 
class  StrategyChoicePublisher
 
class  StrategyInfoHost
 base class for an entity onto which StrategyInfo objects may be placed More...
 
class  StreamFace
 
struct  StreamFaceSenderImpl
 
struct  StreamFaceSenderImpl< Protocol, LocalFace, Packet >
 
struct  StreamFaceValidator
 Class allowing validation of the StreamFace use. More...
 
struct  StreamFaceValidator< TcpLocalFace::protocol, LocalFace >
 Class validating use of TcpLocalFace. More...
 
class  TablesConfigSection
 
class  TcpChannel
 Class implementing TCP-based channel to create faces. More...
 
class  TcpFace
 Implementation of Face abstraction that uses TCP as underlying transport mechanism. More...
 
class  TcpFactory
 
class  TcpLocalFace
 Implementation of Face abstraction that uses TCP as underlying transport mechanism and is used for local communication (can enable LocalControlHeader) More...
 
class  UdpChannel
 Class implementing UDP-based channel to create faces. More...
 
class  UdpFace
 Implementation of Face abstraction that uses unicast UDP as underlying transport mechanism. More...
 
class  UdpFactory
 
struct  Unicast
 
class  UnixStreamChannel
 Class implementing a local channel to create faces. More...
 
class  UnixStreamFace
 Implementation of Face abstraction that uses stream-oriented Unix domain sockets as underlying transport mechanism. More...
 
class  UnixStreamFactory
 
class  WebSocketChannel
 Class implementing WebSocket-based channel to create faces. More...
 
class  WebSocketFace
 Implementation of Face abstraction that uses WebSocket as underlying transport mechanism. More...
 
class  WebSocketFactory
 

Typedefs

typedef boost::property_tree::ptree ConfigSection
 
typedef function< void(const ConfigSection &, bool, const std::string &)> ConfigSectionHandler
 callback for config file sections More...
 
typedef function< void(const std::string &, const std::string &, const ConfigSection &, bool)> UnknownConfigSectionHandler
 callback for config file sections without a subscribed handler More...
 
typedef int FaceId
 
typedef function< void(const shared_ptr< Face > &newFace)> FaceCreatedCallback
 Prototype for the callback called when face is created (as a response to incoming connection or after connection is established) More...
 
typedef function< void(const std::string &reason)> FaceConnectFailedCallback
 Prototype for the callback that is called when face is failed to get created. More...
 
typedef function< void(const Name &, const Interest &)> OnInterest
 

Functions

std::ostream & operator<< (std::ostream &os, const Face &face)
 
It find_last_if (It first, It last, Pred p)
 
boost::asio::io_service & getGlobalIoService ()
 
std::vector< NetworkInterfaceInfolistNetworkInterfaces ()
 List configured network interfaces on the system and their info. More...
 
std::ostream & operator<< (std::ostream &os, const Network &network)
 
std::istream & operator>> (std::istream &is, Network &network)
 
boost::random::mt19937 & getGlobalRng ()
 
void resetGlobalRng ()
 
template void Face::copyStatusTo< ndn::nfd::FaceStatus > (ndn::nfd::FaceStatus &) const
 
template void Face::copyStatusTo< ndn::nfd::FaceEventNotification > (ndn::nfd::FaceEventNotification &) const
 
static const boost::asio::ip::address_v4 ALL_V4_ENDPOINT (boost::asio::ip::address_v4::from_string("0.0.0.0"))
 
static const boost::asio::ip::address_v6 ALL_V6_ENDPOINT (boost::asio::ip::address_v6::from_string("::"))
 
static const boost::asio::ip::address_v4 ALL_V4_ENDPOINT (boost::asio::ip::address_v4::from_string("0.0.0.0"))
 
static const boost::asio::ip::address_v6 ALL_V6_ENDPOINT (boost::asio::ip::address_v6::from_string("::"))
 
static bool compare_pickInterest (const pit::InRecord &a, const pit::InRecord &b, const Face *outFace)
 compare two InRecords for picking outgoing Interest More...
 
static bool compare_InRecord_expiry (const pit::InRecord &a, const pit::InRecord &b)
 
static void insertNonceToDnl (DeadNonceList &dnl, const pit::Entry &pitEntry, const pit::OutRecord &outRecord)
 
static void aggregateErrors (std::stringstream &ss, const std::string &msg)
 
static void ignoreRibAndLogSections (const std::string &filename, const std::string &sectionName, const ConfigSection &section, bool isDryRun)
 
static bool predicate_NameTreeEntry_hasFibEntry (const name_tree::Entry &entry)
 
static void clearStrategyInfo (const name_tree::Entry &nte)
 

Variables

 PrivilegeHelper
 
static boost::thread_specific_ptr< boost::random::mt19937 > g_rng
 
 EthernetFace
 
const FaceId INVALID_FACEID = -1
 indicates an invalid FaceId More...
 
const FaceId FACEID_INTERNAL_FACE = 1
 identifies the InternalFace used in management More...
 
const FaceId FACEID_CONTENT_STORE = 254
 identifies a packet comes from the ContentStore, in LocalControlHeader incomingFaceId More...
 
const FaceId FACEID_NULL = 255
 identifies the NullFace that drops every packet More...
 
const FaceId FACEID_RESERVED_MAX = 255
 upper bound of reserved FaceIds More...
 
 DatagramFace
 
 Multicast
 
 MulticastUdpFace
 
 TcpChannel
 
 StreamFace
 
 TcpFace
 
 LocalFace
 
 TcpLocalFace
 
 UdpChannel
 
 UdpFace
 
 UdpFactory
 
 UnixStreamChannel
 
 UnixStreamFace
 
 WebSocketChannel
 
 WebSocketFace
 
 FaceTable
 
 Forwarder
 
 NFD
 
 CommandValidator
 
 FaceManager
 
const std::string FACE_MANAGER_PRIVILEGE = "faces"
 
 FibEnumerationPublisher
 
 FibManager
 
const std::string FIB_PRIVILEGE = "fib"
 
 InternalFace
 
 ManagerBase
 
 StrategyChoiceManager
 
const std::string STRATEGY_CHOICE_PRIVILEGE = "strategy-choice"
 
 TablesConfigSection
 
 Nfd
 
static const std::string INTERNAL_CONFIG = "internal://nfd.conf"
 
 NameTree
 
 StrategyChoice
 

Detailed Description

Copyright (c) 2011-2015 Regents of the University of California.

Copyright (c) 2014, Regents of the University of California, Arizona Board of Regents, Colorado State University, University Pierre & Marie Curie, Sorbonne University, Washington University in St.

Copyright (c) 2014 Regents of the University of California, Arizona Board of Regents, Colorado State University, University Pierre & Marie Curie, Sorbonne University, Washington University in St.

Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents, Colorado State University, University Pierre & Marie Curie, Sorbonne University, Washington University in St.

This file is part of ndnSIM. See AUTHORS for complete list of ndnSIM authors and contributors.

ndnSIM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

ndnSIM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with ndnSIM, e.g., in COPYING.md file. If not, see http://www.gnu.org/licenses/.

Louis, Beijing Institute of Technology, The University of Memphis.

This file is part of NFD (Named Data Networking Forwarding Daemon). See AUTHORS.md for complete list of NFD authors and contributors.

NFD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with NFD, e.g., in COPYING.md file. If not, see http://www.gnu.org/licenses/.

Louis, Beijing Institute of Technology

This file is part of NFD (Named Data Networking Forwarding Daemon). See AUTHORS.md for complete list of NFD authors and contributors.

NFD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with NFD, e.g., in COPYING.md file. If not, see http://www.gnu.org/licenses/.

Louis, Beijing Institute of Technology, The University of Memphis

This file is part of NFD (Named Data Networking Forwarding Daemon). See AUTHORS.md for complete list of NFD authors and contributors.

NFD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with NFD, e.g., in COPYING.md file. If not, see http://www.gnu.org/licenses/.

Louis, Beijing Institute of Technology, The University of Memphis

This file is part of NFD (Named Data Networking Forwarding Daemon). See AUTHORS.md for complete list of NFD authors and contributors.

NFD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

NFD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with NFD, e.g., in COPYING.md file. If not, see http://www.gnu.org/licenses/. This file declares the global random number generator All random numbers in NFD should use this global random number generator, so that the generator can be properly seeded when necessary.

This random number generator is not suitable for security purposes; security-critical code should use CryptoPP random number generator instead.

Typedef Documentation

typedef boost::property_tree::ptree nfd::ConfigSection

Definition at line 39 of file ndn-l3-protocol.hpp.

typedef function<void(const ConfigSection& , bool , const std::string& )> nfd::ConfigSectionHandler

callback for config file sections

Definition at line 39 of file config-file.hpp.

typedef function<void(const std::string& , const std::string& , const ConfigSection& , bool )> nfd::UnknownConfigSectionHandler

callback for config file sections without a subscribed handler

Definition at line 45 of file config-file.hpp.

typedef int nfd::FaceId

Definition at line 40 of file face.hpp.

typedef function<void(const shared_ptr<Face>& newFace)> nfd::FaceCreatedCallback

Prototype for the callback called when face is created (as a response to incoming connection or after connection is established)

Definition at line 34 of file protocol-factory.hpp.

typedef function<void(const std::string& reason)> nfd::FaceConnectFailedCallback

Prototype for the callback that is called when face is failed to get created.

Definition at line 47 of file protocol-factory.hpp.

typedef function<void(const Name&, const Interest&)> nfd::OnInterest

Definition at line 35 of file app-face.hpp.

Function Documentation

std::ostream& nfd::operator<< ( std::ostream &  os,
const Face face 
)
inline

Definition at line 38 of file ndn-face.hpp.

References nfd::Face::getLocalUri().

It nfd::find_last_if ( It  first,
It  last,
Pred  p 
)

Definition at line 49 of file algorithm.hpp.

Referenced by nfd::cs::Cs::find().

std::ostream & nfd::operator<< ( std::ostream &  os,
const Network network 
)

Definition at line 58 of file network.cpp.

References nfd::Network::print().

std::istream & nfd::operator>> ( std::istream &  is,
Network network 
)

Definition at line 65 of file network.cpp.

boost::random::mt19937 & nfd::getGlobalRng ( )
Returns
the global random number generator instance

Definition at line 34 of file random.cpp.

References g_rng.

Referenced by compare_pickInterest(), and nfd::fw::NccStrategy::doPropagate().

void nfd::resetGlobalRng ( )

Definition at line 43 of file random.cpp.

static const boost::asio::ip::address_v4 nfd::ALL_V4_ENDPOINT ( boost::asio::ip::address_v4::from_string("0.0.0.0")  )
static
static const boost::asio::ip::address_v6 nfd::ALL_V6_ENDPOINT ( boost::asio::ip::address_v6::from_string("::")  )
static
static const boost::asio::ip::address_v4 nfd::ALL_V4_ENDPOINT ( boost::asio::ip::address_v4::from_string("0.0.0.0")  )
static
static const boost::asio::ip::address_v6 nfd::ALL_V6_ENDPOINT ( boost::asio::ip::address_v6::from_string("::")  )
static
static bool nfd::compare_pickInterest ( const pit::InRecord a,
const pit::InRecord b,
const Face outFace 
)
inlinestatic

compare two InRecords for picking outgoing Interest

Returns
true if b is preferred over a

This function should be passed to std::max_element over InRecordCollection. The outgoing Interest picked is the last incoming Interest that does not come from outFace. If all InRecords come from outFace, it's fine to pick that. This happens when there's only one InRecord that comes from outFace. The legit use is for vehicular network; otherwise, strategy shouldn't send to the sole inFace.

Definition at line 185 of file forwarder.cpp.

References nfd::Forwarder::beforeExpirePendingInterest, nfd::Forwarder::beforeSatisfyInterest, nfd::Pit::erase(), nfd::Pit::findAllDataMatches(), nfd::pit::FaceRecord::getFace(), ndn::Data::getFreshnessPeriod(), getGlobalRng(), nfd::Face::getId(), nfd::pit::FaceRecord::getLastRenewed(), ndn::Data::getName(), nfd::NetworkLayerCounters::getNInDatas(), nfd::NetworkLayerCounters::getNOutDatas(), nfd::NetworkLayerCounters::getNOutInterests(), INVALID_FACEID, nfd::Face::isLocal(), ndn::Name::isPrefixOf(), NFD_LOG_DEBUG, NFD_LOG_ERROR, NFD_LOG_WARN, ndn::time::steady_clock::now(), nfd::Face::sendData(), nfd::Face::sendInterest(), and ndn::Interest::setNonce().

static bool nfd::compare_InRecord_expiry ( const pit::InRecord a,
const pit::InRecord b 
)
inlinestatic
static void nfd::aggregateErrors ( std::stringstream &  ss,
const std::string &  msg 
)
inlinestatic

Definition at line 56 of file command-validator.cpp.

Referenced by nfd::CommandValidator::onConfig().

static void nfd::ignoreRibAndLogSections ( const std::string &  filename,
const std::string &  sectionName,
const ConfigSection section,
bool  isDryRun 
)
inlinestatic
static bool nfd::predicate_NameTreeEntry_hasFibEntry ( const name_tree::Entry entry)
inlinestatic

Variable Documentation

Definition at line 34 of file privilege-helper.cpp.

boost::thread_specific_ptr<boost::random::mt19937> nfd::g_rng
static

Definition at line 31 of file random.cpp.

Referenced by getGlobalRng().

Definition at line 61 of file ethernet-face.cpp.

const FaceId nfd::FACEID_INTERNAL_FACE = 1

identifies the InternalFace used in management

Definition at line 46 of file face.hpp.

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

const FaceId nfd::FACEID_CONTENT_STORE = 254

identifies a packet comes from the ContentStore, in LocalControlHeader incomingFaceId

Definition at line 48 of file face.hpp.

Referenced by nfd::Forwarder::Forwarder(), nfd::Nfd::initialize(), and nfd::Forwarder::~Forwarder().

const FaceId nfd::FACEID_NULL = 255

identifies the NullFace that drops every packet

Definition at line 50 of file face.hpp.

Referenced by nfd::Nfd::initialize(), and ns3::ndn::L3Protocol::~L3Protocol().

const FaceId nfd::FACEID_RESERVED_MAX = 255

upper bound of reserved FaceIds

Definition at line 52 of file face.hpp.

Referenced by nfd::FaceTable::add(), and nfd::FaceTable::addReserved().

Definition at line 30 of file multicast-udp-face.cpp.

Definition at line 30 of file multicast-udp-face.cpp.

Definition at line 30 of file multicast-udp-face.cpp.

Definition at line 32 of file tcp-channel.cpp.

Definition at line 29 of file tcp-face.cpp.

Definition at line 29 of file tcp-face.cpp.

Definition at line 31 of file tcp-face.cpp.

Definition at line 31 of file tcp-face.cpp.

Definition at line 32 of file udp-channel.cpp.

Definition at line 38 of file udp-face.cpp.

Definition at line 40 of file udp-factory.cpp.

Definition at line 32 of file unix-stream-face.cpp.

Definition at line 34 of file websocket-channel.cpp.

Definition at line 30 of file websocket-face.cpp.

Definition at line 32 of file face-table.cpp.

Definition at line 38 of file forwarder.cpp.

Referenced by nfd::Nfd::initialize().

nfd::NFD

Definition at line 50 of file main.cpp.

Definition at line 36 of file command-validator.cpp.

Definition at line 38 of file face-manager.cpp.

Referenced by ignoreRibAndLogSections().

const std::string nfd::FACE_MANAGER_PRIVILEGE = "faces"

Definition at line 42 of file face-manager.hpp.

Definition at line 38 of file fib-manager.cpp.

Referenced by ignoreRibAndLogSections().

const std::string nfd::FIB_PRIVILEGE = "fib"

Definition at line 39 of file fib-manager.hpp.

Definition at line 32 of file internal-face.cpp.

Definition at line 31 of file manager-base.cpp.

const std::string nfd::STRATEGY_CHOICE_PRIVILEGE = "strategy-choice"

Definition at line 36 of file strategy-choice-manager.hpp.

Definition at line 44 of file nfd.cpp.

const std::string nfd::INTERNAL_CONFIG = "internal://nfd.conf"
static

Definition at line 46 of file nfd.cpp.

Definition at line 36 of file name-tree.cpp.

Definition at line 37 of file strategy-choice.cpp.