26 #ifndef NFD_DAEMON_RIB_ROUTE_HPP
27 #define NFD_DAEMON_RIB_ROUTE_HPP
31 #include <ndn-cxx/encoding/nfd-constants.hpp>
32 #include <ndn-cxx/mgmt/nfd/route-flags-traits.hpp>
33 #include <ndn-cxx/prefix-announcement.hpp>
34 #include <ndn-cxx/util/scheduler.hpp>
36 #include <type_traits>
43 class Route :
public ndn::nfd::RouteFlagsTraits<Route>,
private boost::equality_comparable<Route>
54 Route(
const ndn::PrefixAnnouncement& ann, uint64_t
faceId);
56 const ndn::scheduler::EventId&
59 return m_expirationEvent;
65 m_expirationEvent = eid;
71 m_expirationEvent.cancel();
74 std::underlying_type_t<ndn::nfd::RouteFlags>
94 ndn::nfd::RouteOrigin
origin = ndn::nfd::ROUTE_ORIGIN_APP;
96 std::underlying_type_t<ndn::nfd::RouteFlags>
flags = ndn::nfd::ROUTE_FLAGS_NONE;
97 std::optional<time::steady_clock::time_point>
expires;
116 ndn::scheduler::EventId m_expirationEvent;
Represents a route for a name prefix.
const ndn::scheduler::EventId & getExpirationEvent() const
ndn::nfd::RouteOrigin origin
std::underlying_type_t< ndn::nfd::RouteFlags > getFlags() const
void setExpirationEvent(const ndn::scheduler::EventId &eid)
Route()
Default constructor.
std::underlying_type_t< ndn::nfd::RouteFlags > flags
time::steady_clock::time_point annExpires
Expiration time of the prefix announcement.
std::optional< time::steady_clock::time_point > expires
void cancelExpirationEvent()
std::optional< ndn::PrefixAnnouncement > announcement
The prefix announcement that caused the creation of this route.
friend bool operator==(const Route &lhs, const Route &rhs)
std::ostream & operator<<(std::ostream &os, const FibUpdate &update)