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>
54 Route(
const ndn::PrefixAnnouncement& ann, uint64_t
faceId);
56 const scheduler::EventId&
59 return m_expirationEvent;
65 m_expirationEvent = eid;
71 m_expirationEvent.cancel();
74 std::underlying_type_t<ndn::nfd::RouteFlags>
82 ndn::nfd::RouteOrigin
origin = ndn::nfd::ROUTE_ORIGIN_APP;
84 std::underlying_type_t<ndn::nfd::RouteFlags>
flags = ndn::nfd::ROUTE_FLAGS_NONE;
85 optional<time::steady_clock::TimePoint>
expires;
104 scheduler::EventId m_expirationEvent;
113 return !(lhs == rhs);
125 return (route.
faceId == faceId);
134 #endif // NFD_DAEMON_RIB_ROUTE_HPP std::underlying_type_t< ndn::nfd::RouteFlags > getFlags() const
bool operator==(const Route &lhs, const Route &rhs)
std::ostream & operator<<(std::ostream &os, const FibUpdate &update)
optional< ndn::PrefixAnnouncement > announcement
The prefix announcement that caused the creation of this route.
void cancelExpirationEvent()
bool compareFaceIdAndOrigin(const Route &lhs, const Route &rhs)
bool operator!=(const Route &lhs, const Route &rhs)
void setExpirationEvent(const scheduler::EventId &eid)
optional< time::steady_clock::TimePoint > expires
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
time::steady_clock::TimePoint annExpires
Expiration time of the prefix announcement.
const scheduler::EventId & getExpirationEvent() const
ndn::nfd::RouteOrigin origin
represents a route for a name prefix
Route()=default
default constructor
bool compareFaceId(const Route &route, const uint64_t faceId)
std::underlying_type_t< ndn::nfd::RouteFlags > flags