ndn-embeds 0.1.0
Lightweight NDN protocol stack for embedded systems
Loading...
Searching...
No Matches
forwarder.hpp File Reference

NDN Forwarder. More...

#include "ndn/common.hpp"
#include "ndn/cs.hpp"
#include "ndn/data.hpp"
#include "ndn/face.hpp"
#include "ndn/fib.hpp"
#include "ndn/interest.hpp"
#include "ndn/pit.hpp"

Go to the source code of this file.

Classes

class  ndn::Forwarder
 NDN Forwarder. More...
 
struct  ndn::Forwarder::Stats
 Forwarder statistics. More...
 

Typedefs

using ndn::InterestCallback = std::function< void(const Interest &, FaceId)>
 Interest receive callback.
 
using ndn::DataCallback = std::function< void(const Data &)>
 Data receive callback.
 
using ndn::TimeoutCallback = std::function< void(const Interest &)>
 Timeout callback.
 

Variables

constexpr size_t ndn::FORWARDER_MAX_FACES = 8
 Maximum number of Faces the Forwarder can manage.
 
constexpr size_t ndn::FORWARDER_MAX_PREFIXES = 16
 Maximum number of registerable prefixes.
 

Detailed Description

NDN Forwarder.

The Forwarder is the central component of the NDN protocol stack. It integrates PIT, CS, and FIB to forward Interest and Data packets. It also provides application APIs for sending Interests and registering prefixes.

See also
https://named-data.net/doc/NFD/current/

Definition in file forwarder.hpp.

Typedef Documentation

◆ DataCallback

using ndn::DataCallback = typedef std::function<void(const Data&)>

Data receive callback.

Called when Data is received for an Interest sent via expressInterest().

Parameters
dataReceived Data

Definition at line 41 of file forwarder.hpp.

◆ InterestCallback

using ndn::InterestCallback = typedef std::function<void(const Interest&, FaceId)>

Interest receive callback.

Called when an Interest matching a registered prefix is received.

Parameters
interestReceived Interest
faceIdID of the Face that received it

Definition at line 32 of file forwarder.hpp.

◆ TimeoutCallback

using ndn::TimeoutCallback = typedef std::function<void(const Interest&)>

Timeout callback.

Called when an Interest sent via expressInterest() times out.

Parameters
interestTimed-out Interest

Definition at line 50 of file forwarder.hpp.

Variable Documentation

◆ FORWARDER_MAX_FACES

constexpr size_t ndn::FORWARDER_MAX_FACES = 8
constexpr

Maximum number of Faces the Forwarder can manage.

Definition at line 53 of file forwarder.hpp.

◆ FORWARDER_MAX_PREFIXES

constexpr size_t ndn::FORWARDER_MAX_PREFIXES = 16
constexpr

Maximum number of registerable prefixes.

Definition at line 56 of file forwarder.hpp.