NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::rib::Route Class Reference

represents a route for a name prefix More...

#include <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
 
void setExpirationEvent (const scheduler::EventId &eid)
 
void cancelExpirationEvent ()
 
std::underlying_type_t< ndn::nfd::RouteFlagsgetFlags () const
 
- Public Member Functions inherited from ndn::nfd::RouteFlagsTraits< Route >
bool isChildInherit () const
 
bool isRibCapture () const
 

Public Attributes

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

Additional Inherited Members

- Protected Member Functions inherited from ndn::nfd::RouteFlagsTraits< Route >
 RouteFlagsTraits ()=default
 

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

default constructor

◆ Route() [2/2]

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

◆ getExpirationEvent()

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

Definition at line 57 of file route.hpp.

◆ setExpirationEvent()

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

Definition at line 63 of file route.hpp.

◆ cancelExpirationEvent()

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

Definition at line 69 of file route.hpp.

References ndn::detail::CancelHandle::cancel().

◆ getFlags()

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

Definition at line 75 of file route.hpp.

References flags.

Member Data Documentation

◆ faceId

◆ origin

◆ cost

◆ flags

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

◆ expires

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

Referenced by nfd::rib::RibEntry::getPrefixAnnouncement(), nfd::rib::operator<<(), nfd::rib::operator==(), and nfd::RibManager::slRenew().

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

Referenced by nfd::RibManager::slRenew().


The documentation for this class was generated from the following files: