nfd::rib::Route Class Reference

represents a route for a name prefix More...

#include <daemon/rib/route.hpp>

+ Inheritance diagram for nfd::rib::Route:
+ Collaboration diagram for nfd::rib::Route:

Public Member Functions

 Route ()=default
 default constructor More...
 Route (const ndn::PrefixAnnouncement &ann, uint64_t faceId)
 construct from a prefix announcement More...
void cancelExpirationEvent ()
const scheduler::EventId & getExpirationEvent () const
std::underlying_type_t< ndn::nfd::RouteFlags > getFlags () const
void setExpirationEvent (const scheduler::EventId &eid)

Public Attributes

time::steady_clock::TimePoint annExpires
 Expiration time of the prefix announcement. More...
optional< ndn::PrefixAnnouncement > announcement
 The prefix announcement that caused the creation of this route. More...
uint64_t cost = 0
optional< time::steady_clock::TimePoint > expires
uint64_t faceId = 0
std::underlying_type_t< ndn::nfd::RouteFlags > flags = ndn::nfd::ROUTE_FLAGS_NONE
ndn::nfd::RouteOrigin origin = ndn::nfd::ROUTE_ORIGIN_APP

Detailed Description

represents a route for a name prefix

Definition at line 43 of file route.hpp.

Constructor & Destructor Documentation

◆ Route() [1/2]

nfd::rib::Route::Route ( )

default constructor

◆ Route() [2/2]

nfd::rib::Route::Route ( const ndn::PrefixAnnouncement &  ann,
uint64_t  faceId 

construct from a prefix announcement

anna prefix announcement that has passed verification
faceIdthe face on which ann arrived

Definition at line 51 of file route.cpp.

Member Function Documentation

◆ cancelExpirationEvent()

void nfd::rib::Route::cancelExpirationEvent ( )

Definition at line 69 of file route.hpp.

◆ getExpirationEvent()

const scheduler::EventId& nfd::rib::Route::getExpirationEvent ( ) const

Definition at line 57 of file route.hpp.

◆ getFlags()

std::underlying_type_t<ndn::nfd::RouteFlags> nfd::rib::Route::getFlags ( ) const

Definition at line 75 of file route.hpp.

◆ setExpirationEvent()

void nfd::rib::Route::setExpirationEvent ( const scheduler::EventId &  eid)

Definition at line 63 of file route.hpp.

Member Data Documentation

◆ annExpires

time::steady_clock::TimePoint nfd::rib::Route::annExpires

Expiration time of the prefix announcement.

Valid only if announcement is not nullopt.

If this field is before or equal the current time, it indicates the prefix announcement is not yet valid or has expired. In this case, the exact value of this field does not matter. If this field is after the current time, it indicates when the prefix announcement expires.

Definition at line 101 of file route.hpp.

◆ announcement

optional<ndn::PrefixAnnouncement> nfd::rib::Route::announcement

The prefix announcement that caused the creation of this route.

This is nullopt if this route is not created by a prefix announcement.

Definition at line 91 of file route.hpp.

◆ cost

uint64_t nfd::rib::Route::cost = 0

Definition at line 83 of file route.hpp.

◆ expires

optional<time::steady_clock::TimePoint> nfd::rib::Route::expires

Definition at line 85 of file route.hpp.

◆ faceId

uint64_t nfd::rib::Route::faceId = 0

Definition at line 81 of file route.hpp.

◆ flags

std::underlying_type_t<ndn::nfd::RouteFlags> nfd::rib::Route::flags = ndn::nfd::ROUTE_FLAGS_NONE

Definition at line 84 of file route.hpp.

◆ origin

ndn::nfd::RouteOrigin nfd::rib::Route::origin = ndn::nfd::ROUTE_ORIGIN_APP

Definition at line 82 of file route.hpp.