client-to-nlsr-readvertise-policy.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
27 
28 namespace nfd {
29 namespace rib {
30 
31 ndn::optional<ReadvertiseAction>
33 {
34  if (ribRoute.route->origin == ndn::nfd::ROUTE_ORIGIN_CLIENT) {
35  return ReadvertiseAction{ribRoute.entry->getName(), ndn::security::SigningInfo()};
36  }
37  else {
38  return ndn::nullopt;
39  }
40 }
41 
42 time::milliseconds
44 {
45  return time::seconds(3600);
46 }
47 
48 } // namespace rib
49 } // namespace nfd
references a route
Definition: rib.hpp:43
a decision made by readvertise policy
ndn::optional< ReadvertiseAction > handleNewRoute(const RibRouteRef &ribRoute) const override
advertise if the route&#39;s origin is client
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Definition: algorithm.hpp:32
RibEntry::const_iterator route
Definition: rib.hpp:46
shared_ptr< RibEntry > entry
Definition: rib.hpp:45
time::milliseconds getRefreshInterval() const override