nfd::rib::Route Class Reference

represents a route for a name prefix More...

#include <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...
 
const scheduler::EventIdgetExpirationEvent () const
 
std::underlying_type< ndn::nfd::RouteFlags >::type 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< ndn::nfd::RouteFlags >::type 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 42 of file route.hpp.

Constructor & Destructor Documentation

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

default constructor

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

construct from a prefix announcement

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

Definition at line 51 of file route.cpp.

Member Function Documentation

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

Definition at line 62 of file route.hpp.

std::underlying_type<ndn::nfd::RouteFlags>::type nfd::rib::Route::getFlags ( ) const
inline

Definition at line 68 of file route.hpp.

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

Definition at line 56 of file route.hpp.

Member Data Documentation

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 94 of file route.hpp.

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 84 of file route.hpp.

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

Definition at line 76 of file route.hpp.

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

Definition at line 78 of file route.hpp.

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

Definition at line 74 of file route.hpp.

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

Definition at line 77 of file route.hpp.

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

Definition at line 75 of file route.hpp.