nfd Namespace Reference

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. More...

Namespaces

 cs
 
 ethernet
 
 face
 
 fib
 
 fw
 
 general
 
 log
 
 measurements
 
 name_tree
 
 pit
 
 rib
 
 scope_prefix
 
 strategy_choice
 
 tcp
 
 tlv
 
 tools
 
 udp
 
 unix_stream
 
 websocket
 

Classes

class  ByteCounter
 represents a counter of number of bytes More...
 
class  CommandAuthenticator
 Provides ControlCommand authorization according to NFD configuration file. More...
 
class  ConfigFile
 configuration file parsing utility More...
 
class  CsManager
 Implements the CS Management of NFD Management Protocol. More...
 
class  DeadNonceList
 Represents the Dead Nonce List. More...
 
class  FaceEndpoint
 Represents a face-endpoint pair in the forwarder. More...
 
class  FaceManager
 Implements the Face Management of NFD Management Protocol. More...
 
class  FaceTable
 container of all faces More...
 
class  FibManager
 Implements the FIB Management of NFD Management Protocol. More...
 
class  Forwarder
 Main class of NFD's forwarding engine. More...
 
class  ForwarderCounters
 Counters provided by Forwarder. More...
 
class  ForwarderStatusManager
 Implements the Forwarder Status of NFD Management Protocol. More...
 
class  ManagerBase
 A collection of common functions shared by all NFD managers, such as communicating with the dispatcher and command validator. More...
 
class  Network
 
class  NetworkRegionTable
 stores a collection of producer region names More...
 
class  Nfd
 Class representing the NFD instance. More...
 
class  PacketCounter
 represents a counter of number of packets More...
 
class  PrivilegeHelper
 
class  RibManager
 Implements the RIB Management of NFD Management Protocol. More...
 
class  SimpleCounter
 represents a counter that encloses an integer value More...
 
class  SizeCounter
 provides a counter that observes the size of a table More...
 
class  StrategyChoiceManager
 Implements the Strategy Choice Management of NFD Management Protocol. More...
 
class  StrategyInfoHost
 Base class for an entity onto which StrategyInfo items may be placed. More...
 
class  TablesConfigSection
 handles 'tables' config section More...
 

Typedefs

using ConfigSection = boost::property_tree::ptree
 a config file section More...
 
using ConfigSectionHandler = std::function< void(const ConfigSection &section, bool isDryRun, const std::string &filename)>
 callback to process a config file section More...
 
using OptionalConfigSection = boost::optional< const ConfigSection & >
 an optional config file section More...
 
using SignerTag = ndn::SimpleTag< Name, 20 >
 an Interest tag to indicate command signer More...
 
using UnknownConfigSectionHandler = std::function< void(const std::string &filename, const std::string &sectionName, const ConfigSection &section, bool isDryRun)>
 callback to process a config file section without a ConfigSectionHandler More...
 

Functions

void cleanupOnFaceRemoval (NameTree &nt, Fib &fib, Pit &pit, const Face &face)
 cleanup tables when a face is destroyed More...
 
template<typename T >
static void copyFaceProperties (const Face &face, T &to)
 
template<typename T >
static void copyMtu (const Face &face, T &to)
 
template<typename It , typename Pred >
It find_last_if (It first, It last, Pred p)
 finds the last element satisfying a predicate More...
 
static Name getDefaultStrategyName ()
 
boost::asio::io_service & getGlobalIoService ()
 Returns the global io_service instance for the calling thread. More...
 
boost::asio::io_service & getMainIoService ()
 
boost::asio::io_service & getRibIoService ()
 
Scheduler & getScheduler ()
 Returns the global Scheduler instance for the calling thread. More...
 
static optional< std::string > getSignerFromTag (const Interest &interest)
 obtain signer from SignerTag attached to Interest, if available More...
 
static void ignoreRibAndLogSections (const std::string &filename, const std::string &sectionName, const ConfigSection &section, bool isDryRun)
 
const std::string INTERNAL_CONFIG ("internal://nfd.conf")
 
static ControlParameters makeCreateFaceResponse (const Face &face)
 
static ndn::nfd::FaceStatus makeFaceStatus (const Face &face, const time::steady_clock::TimePoint &now)
 
static ControlParameters makeUpdateFaceResponse (const Face &face)
 
static bool matchFilter (const ndn::nfd::FaceQueryFilter &filter, const Face &face)
 
 NDN_CXX_ASSERT_FORWARD_ITERATOR (FaceTable::const_iterator)
 
std::ostream & operator<< (std::ostream &os, const FaceEndpoint &fe)
 
std::ostream & operator<< (std::ostream &os, const Network &network)
 
std::ostream & operator<< (std::ostream &os, RibManager::SlAnnounceResult res)
 
std::istream & operator>> (std::istream &is, Network &network)
 
static void printLogModules (std::ostream &os)
 
static void printUsage (std::ostream &os, const char *programName, const po::options_description &opts)
 
void runOnMainIoService (const std::function< void()> &f)
 Run a function on the main io_service instance. More...
 
void runOnRibIoService (const std::function< void()> &f)
 Run a function on the RIB io_service instance. More...
 
void setMainIoService (boost::asio::io_service *mainIo)
 
void setRibIoService (boost::asio::io_service *ribIo)
 
static const time::milliseconds STATUS_FRESHNESS (5000)
 
static void updateLinkServiceOptions (Face &face, const ControlParameters &parameters)
 

Variables

static const time::seconds ACTIVE_FACE_FETCH_INTERVAL = 5_min
 
static thread_local unique_ptr< boost::asio::io_service > g_ioService
 
static boost::asio::io_service * g_mainIoService = nullptr
 
static boost::asio::io_service * g_ribIoService = nullptr
 
static thread_local unique_ptr< Scheduler > g_scheduler
 
static const Name LOCALHOST_TOP_PREFIX = "/localhost/nfd"
 
static const std::string MGMT_MODULE_NAME = "rib"
 

Detailed Description

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.

contain name prefixes that affect namespace-based scope control

Copyright (c) 2014-2017, 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-2016, Regents of the University of California, Arizona Board of Regents, Colorado State University, University Pierre & Marie Curie, Sorbonne University, Washington University in St.

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/.

See also
https://redmine.named-data.net/projects/nfd/wiki/ScopeControl

Typedef Documentation

◆ ConfigSection

using nfd::ConfigSection = typedef boost::property_tree::ptree

a config file section

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

◆ ConfigSectionHandler

using nfd::ConfigSectionHandler = typedef std::function<void(const ConfigSection& section, bool isDryRun, const std::string& filename)>

callback to process a config file section

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

◆ OptionalConfigSection

using nfd::OptionalConfigSection = typedef boost::optional<const ConfigSection&>

an optional config file section

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

◆ SignerTag

using nfd::SignerTag = typedef ndn::SimpleTag<Name, 20>

an Interest tag to indicate command signer

Definition at line 50 of file command-authenticator.cpp.

◆ UnknownConfigSectionHandler

using nfd::UnknownConfigSectionHandler = typedef std::function<void(const std::string& filename, const std::string& sectionName, const ConfigSection& section, bool isDryRun)>

callback to process a config file section without a ConfigSectionHandler

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

Function Documentation

◆ cleanupOnFaceRemoval()

void nfd::cleanupOnFaceRemoval ( NameTree nt,
Fib fib,
Pit pit,
const Face face 
)

cleanup tables when a face is destroyed

This function enumerates the NameTree, calls Fib::removeNextHop for each FIB entry, calls Pit::deleteInOutRecords for each PIT entry, and finally deletes any name tree entries that have become empty.

Note
It's a design choice to let Fib and Pit classes decide what to do with each entry. This function is only responsible for implementing the enumeration procedure. The benefit of having this function instead of doing the enumeration in Fib and Pit classes is to perform both FIB and PIT cleanups in one pass of NameTree enumeration, so as to reduce performance overhead.

Definition at line 31 of file cleanup.cpp.

◆ copyFaceProperties()

template<typename T >
static void nfd::copyFaceProperties ( const Face face,
T &  to 
)
static

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

◆ copyMtu()

template<typename T >
static void nfd::copyMtu ( const Face face,
T &  to 
)
static

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

◆ find_last_if()

template<typename It , typename Pred >
It nfd::find_last_if ( It  first,
It  last,
Pred  p 
)

finds the last element satisfying a predicate

Template Parameters
ItBidirectionalIterator
PredUnaryPredicate
Returns
Iterator to the last element satisfying the condition, or last if no such element is found.

Complexity: at most last-first invocations of p

Definition at line 49 of file algorithm.hpp.

◆ getDefaultStrategyName()

static Name nfd::getDefaultStrategyName ( )
static

Definition at line 43 of file forwarder.cpp.

◆ getGlobalIoService()

boost::asio::io_service & nfd::getGlobalIoService ( )

Returns the global io_service instance for the calling thread.

Definition at line 36 of file global.cpp.

◆ getMainIoService()

boost::asio::io_service & nfd::getMainIoService ( )

Definition at line 63 of file global.cpp.

◆ getRibIoService()

boost::asio::io_service & nfd::getRibIoService ( )

Definition at line 70 of file global.cpp.

◆ getScheduler()

Scheduler & nfd::getScheduler ( )

Returns the global Scheduler instance for the calling thread.

Definition at line 45 of file global.cpp.

◆ getSignerFromTag()

static optional<std::string> nfd::getSignerFromTag ( const Interest &  interest)
static

obtain signer from SignerTag attached to Interest, if available

Definition at line 55 of file command-authenticator.cpp.

◆ ignoreRibAndLogSections()

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

Definition at line 118 of file nfd.cpp.

◆ INTERNAL_CONFIG()

const std::string nfd::INTERNAL_CONFIG ( "internal://nfd.conf"  )

◆ makeCreateFaceResponse()

static ControlParameters nfd::makeCreateFaceResponse ( const Face face)
static

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

◆ makeFaceStatus()

static ndn::nfd::FaceStatus nfd::makeFaceStatus ( const Face face,
const time::steady_clock::TimePoint &  now 
)
static

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

◆ makeUpdateFaceResponse()

static ControlParameters nfd::makeUpdateFaceResponse ( const Face face)
static

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

◆ matchFilter()

static bool nfd::matchFilter ( const ndn::nfd::FaceQueryFilter &  filter,
const Face face 
)
static

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

◆ NDN_CXX_ASSERT_FORWARD_ITERATOR()

nfd::NDN_CXX_ASSERT_FORWARD_ITERATOR ( FaceTable::const_iterator  )

◆ operator<<() [1/3]

std::ostream& nfd::operator<< ( std::ostream &  os,
const FaceEndpoint fe 
)
inline

Definition at line 51 of file face-endpoint.hpp.

◆ operator<<() [2/3]

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

Definition at line 79 of file network.cpp.

◆ operator<<() [3/3]

std::ostream & nfd::operator<< ( std::ostream &  os,
RibManager::SlAnnounceResult  res 
)

Definition at line 325 of file rib-manager.cpp.

◆ operator>>()

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

Definition at line 85 of file network.cpp.

◆ printLogModules()

static void nfd::printLogModules ( std::ostream &  os)
static

Definition at line 236 of file main.cpp.

◆ printUsage()

static void nfd::printUsage ( std::ostream &  os,
const char *  programName,
const po::options_description &  opts 
)
static

Definition at line 226 of file main.cpp.

◆ runOnMainIoService()

void nfd::runOnMainIoService ( const std::function< void()> &  f)

Run a function on the main io_service instance.

Definition at line 89 of file global.cpp.

◆ runOnRibIoService()

void nfd::runOnRibIoService ( const std::function< void()> &  f)

Run a function on the RIB io_service instance.

Definition at line 95 of file global.cpp.

◆ setMainIoService()

void nfd::setMainIoService ( boost::asio::io_service *  mainIo)

Definition at line 77 of file global.cpp.

◆ setRibIoService()

void nfd::setRibIoService ( boost::asio::io_service *  ribIo)

Definition at line 83 of file global.cpp.

◆ STATUS_FRESHNESS()

static const time::milliseconds nfd::STATUS_FRESHNESS ( 5000  )
static

◆ updateLinkServiceOptions()

static void nfd::updateLinkServiceOptions ( Face face,
const ControlParameters &  parameters 
)
static

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

Variable Documentation

◆ ACTIVE_FACE_FETCH_INTERVAL

const time::seconds nfd::ACTIVE_FACE_FETCH_INTERVAL = 5_min
static

Definition at line 47 of file rib-manager.cpp.

◆ g_ioService

thread_local unique_ptr<boost::asio::io_service> nfd::g_ioService
static

Definition at line 30 of file global.cpp.

◆ g_mainIoService

boost::asio::io_service* nfd::g_mainIoService = nullptr
static

Definition at line 32 of file global.cpp.

◆ g_ribIoService

boost::asio::io_service* nfd::g_ribIoService = nullptr
static

Definition at line 33 of file global.cpp.

◆ g_scheduler

thread_local unique_ptr<Scheduler> nfd::g_scheduler
static

Definition at line 31 of file global.cpp.

◆ LOCALHOST_TOP_PREFIX

const Name nfd::LOCALHOST_TOP_PREFIX = "/localhost/nfd"
static

Definition at line 46 of file rib-manager.cpp.

◆ MGMT_MODULE_NAME

const std::string nfd::MGMT_MODULE_NAME = "rib"
static

Definition at line 45 of file rib-manager.cpp.