26 #ifndef NFD_RIB_ROUTE_HPP 27 #define NFD_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> 35 #include <type_traits> 42 class Route :
public ndn::nfd::RouteFlagsTraits<Route>
53 Route(
const ndn::PrefixAnnouncement& ann, uint64_t
faceId);
58 m_expirationEvent = eid;
64 return m_expirationEvent;
67 std::underlying_type<ndn::nfd::RouteFlags>::type
75 ndn::nfd::RouteOrigin
origin = ndn::nfd::ROUTE_ORIGIN_APP;
77 std::underlying_type<ndn::nfd::RouteFlags>::type
flags = ndn::nfd::ROUTE_FLAGS_NONE;
78 optional<time::steady_clock::TimePoint>
expires;
106 return !(lhs == rhs);
118 return (route.
faceId == faceId);
127 #endif // NFD_RIB_ROUTE_HPP
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.
bool compareFaceIdAndOrigin(const Route &lhs, const Route &rhs)
bool operator!=(const Route &lhs, const Route &rhs)
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.
ndn::nfd::RouteOrigin origin
void setExpirationEvent(const scheduler::EventId eid)
represents a route for a name prefix
const scheduler::EventId & getExpirationEvent() const
Route()=default
default constructor
bool compareFaceId(const Route &route, const uint64_t faceId)
Opaque handle for a scheduled event.
std::underlying_type< ndn::nfd::RouteFlags >::type getFlags() const
std::underlying_type< ndn::nfd::RouteFlags >::type flags